92
92
CFLAGS="-no-cpp-precomp $CFLAGS"
93
93
AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
97
# Shared libraries in cygwin/Win32 must never contain
100
LDFLAGS="$LDFLAGS -no-undefined"
101
AC_MSG_RESULT(CygWin GCC - added -no-undefined to LDFLAGS)
104
96
AC_MSG_RESULT(none needed)
103
# Add any platform-specific linker flags needed.
105
AC_MSG_CHECKING(for platform-specific linker flags)
109
# Add -Wl,-single_module to the LDFLAGS used with shared
110
# libraries, to fix some error that show up in some cases;
111
# some Apple documentation recommends it for most shared
114
LDFLAGS_SHAREDLIB="-Wl,-single_module"
116
# Add -Wl,-search_paths_first to make sure that if we search
117
# directories A and B, in that order, for a given library, a
118
# non-shared version in directory A, rather than a shared
119
# version in directory B, is chosen (so we can use
120
# --with-pcap=/usr/local to force all programs to be linked
121
# with a static version installed in /usr/local/lib rather than
122
# the system version in /usr/lib).
124
LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
125
AC_MSG_RESULT(Apple linker - added -Wl,-single_module and -Wl,-search_paths_first)
129
# Shared libraries in cygwin/Win32 must never contain
132
LDFLAGS="$LDFLAGS -no-undefined"
133
AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
136
AC_MSG_RESULT(none needed)
139
AC_SUBST(LDFLAGS_SHAREDLIB)
109
141
AC_ARG_ENABLE(profile-build,
110
142
[ --enable-profile-build build profile-ready binaries. [default=no]],enable_profile_build=$enableval,enable_profile_build=no)
111
143
AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)