Ticket #43231: patch-configure.ac.diff
File patch-configure.ac.diff, 3.3 KB (added by jul_bsd@…, 10 years ago) |
---|
-
configure.ac
old new 517 517 LIBS=$old_LIBS 518 518 519 519 dnl *************************************************************************** 520 dnl linker properties 521 dnl *************************************************************************** 522 523 ac_save_LDFLAGS=$LDFLAGS 524 AC_CACHE_CHECK(whether $LD supports --whole-archive, 525 ac_cv_prog_ld_whole_archive, 526 [ac_cv_prog_ld_whole_archive=no 527 LDFLAGS="$LDFLAGS -Wl,--whole-archive -Wl,--no-whole-archive" 528 _AC_LINK_IFELSE([AC_LANG_PROGRAM()], 529 [ac_cv_prog_ld_whole_archive=yes], []) 530 dnl AC_TRY_LINK(, [return 0], [ac_cv_prog_ld_whole_archive=yes], []) 531 ]) 532 LDFLAGS=$ac_save_LDFLAGS 533 534 if test "x$ac_cv_prog_ld_whole_archive" = "xno"; then 535 AC_CACHE_CHECK(whether $LD supports -all_libs, 536 ac_cv_prog_ld_all_libs, 537 [ac_cv_prog_ld_all_libs=no 538 LDFLAGS="$LDFLAGS -Wl,-all_libs" 539 _AC_LINK_IFELSE([AC_LANG_PROGRAM()], 540 [ac_cv_prog_ld_all_libs=yes], []) 541 ]) 542 LDFLAGS=$ac_save_LDFLAGS 543 fi 544 545 if test "x$ac_cv_prog_ld_whole_archive" = "xyes"; then 546 LD_WHOLE_ARCHIVE="-Wl,--whole-archive" 547 LD_NO_WHOLE_ARCHIVE="-Wl,--no-whole-archive" 548 fi 549 550 if test "x$ac_cv_prog_ld_all_libs" = "xyes"; then 551 LD_WHOLE_ARCHIVE="-Wl,-all_libs" 552 LD_NO_WHOLE_ARCHIVE="" 553 fi 554 555 dnl *************************************************************************** 520 556 dnl libevtlog headers/libraries 521 557 dnl *************************************************************************** 522 558 PKG_CHECK_MODULES(EVTLOG, eventlog >= $EVTLOG_MIN_VERSION,,) … … 813 849 # these can only be used in lib as it assumes 814 850 # the current directory just one below ivykis 815 851 816 IVYKIS_LIBS=" -Wl,--whole-archive -L\$(top_builddir)/lib/ivykis/src -livykis -Wl,--no-whole-archive"852 IVYKIS_LIBS="${LD_WHOLE_ARCHIVE} -L\$(top_builddir)/lib/ivykis/src -livykis ${LD_NO_WHOLE_ARCHIVE}" 817 853 IVYKIS_CFLAGS="-I\$(top_srcdir)/lib/ivykis/src/include -I\$(top_builddir)/lib/ivykis/src/include" 818 854 IVYKIS_SUBDIRS=lib/ivykis 819 855 INTERNAL_IVYKIS_CFLAGS="-I\${includedir}/syslog-ng/ivykis" 820 856 821 857 # LIBS to use when libtool is not applicable (when linking the main syslog-ng executable in mixed linking mode) 822 IVYKIS_NO_LIBTOOL_LIBS=" -Wl,--whole-archive -L\$(top_builddir)/lib/ivykis/src/.libs -livykis -Wl,--no-whole-archive"858 IVYKIS_NO_LIBTOOL_LIBS="${LD_WHOLE_ARCHIVE} -L\$(top_builddir)/lib/ivykis/src/.libs -livykis ${LD_NO_WHOLE_ARCHIVE}" 823 859 else 824 860 AC_MSG_ERROR([Internal ivykis sources not found in lib/ivykis. This is a hard dependency, unable to build syslog-ng without them.]) 825 861 fi … … 1156 1192 SYSLOGNG_LINK='$(LINK)' 1157 1193 else 1158 1194 SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $LD_START_STATIC -Wl,--whole-archive $GLIB_LIBS $EVTLOG_LIBS $PCRE_LIBS $REGEX_LIBS -Wl,--no-whole-archive $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS " 1195 SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $LD_START_STATIC ${LD_WHOLE_ARCHIVE} $GLIB_LIBS $EVTLOG_LIBS $PCRE_LIBS $REGEX_LIBS ${LD_NO_WHOLE_ARCHIVE} $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS " 1159 1196 TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $IVYKIS_LIBS $DL_LIBS" 1160 1197 CORE_DEPS_LIBS="" 1161 1198