aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-01-05 07:36:30 +0000
committerGuy Harris <guy@alum.mit.edu>2007-01-05 07:36:30 +0000
commit4189374651220e6487289da4b44f3804da3177f3 (patch)
tree498aa1d3f6cb727a3a0c5ff021668ab93850e7a0 /wiretap
parentdee9a1745aef39814d9314b932bfe527de277f62 (diff)
When Mr. Genius added the SHAREDLIB_LDFLAGS stuff, he forgot that
Wiretap has its own configuration file. Do to its configuration file what was done to the top-level configuration file. svn path=/trunk/; revision=20326
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/configure.in48
1 files changed, 40 insertions, 8 deletions
diff --git a/wiretap/configure.in b/wiretap/configure.in
index a6628aac84..a143d2be58 100644
--- a/wiretap/configure.in
+++ b/wiretap/configure.in
@@ -92,20 +92,52 @@ else
CFLAGS="-no-cpp-precomp $CFLAGS"
AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
;;
- cygwin*)
- #
- # Shared libraries in cygwin/Win32 must never contain
- # undefined symbols.
- #
- LDFLAGS="$LDFLAGS -no-undefined"
- AC_MSG_RESULT(CygWin GCC - added -no-undefined to LDFLAGS)
- ;;
*)
AC_MSG_RESULT(none needed)
;;
esac
fi
+
+#
+# Add any platform-specific linker flags needed.
+#
+AC_MSG_CHECKING(for platform-specific linker flags)
+case "$host_os" in
+darwin*)
+ #
+ # Add -Wl,-single_module to the LDFLAGS used with shared
+ # libraries, to fix some error that show up in some cases;
+ # some Apple documentation recommends it for most shared
+ # libraries.
+ #
+ SHAREDLIB_LDFLAGS="-Wl,-single_module"
+ #
+ # Add -Wl,-search_paths_first to make sure that if we search
+ # directories A and B, in that order, for a given library, a
+ # non-shared version in directory A, rather than a shared
+ # version in directory B, is chosen (so we can use
+ # --with-pcap=/usr/local to force all programs to be linked
+ # with a static version installed in /usr/local/lib rather than
+ # the system version in /usr/lib).
+ #
+ LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
+ AC_MSG_RESULT(Apple linker - added -Wl,-single_module and -Wl,-search_paths_first)
+ ;;
+cygwin*)
+ #
+ # Shared libraries in cygwin/Win32 must never contain
+ # undefined symbols.
+ #
+ LDFLAGS="$LDFLAGS -no-undefined"
+ AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
+ ;;
+*)
+ AC_MSG_RESULT(none needed)
+ ;;
+esac
+AC_SUBST(SHAREDLIB_LDFLAGS)
+
AC_ARG_ENABLE(profile-build,
[ --enable-profile-build build profile-ready binaries. [default=no]],enable_profile_build=$enableval,enable_profile_build=no)
AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)