pluginlibs=
if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
- export_sym_check="$gcc_cv_nm -g"
- ;;
- *)
- export_sym_check="$gcc_cv_objdump -T"
- ;;
- esac
AC_MSG_CHECKING([for exported symbols])
echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
- if $export_sym_check conftest | grep foobar > /dev/null; then
+ if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
: # No need to use a flag
else
AC_MSG_CHECKING([for -rdynamic])
${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
- if $export_sym_check conftest | grep foobar > /dev/null; then
+ if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
plugin_rdynamic=yes
pluginlibs="-rdynamic"
else
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
- case "${host}" in
- *-*-darwin*)
- LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
- ;;
- *)
- LDFLAGS="$LDFLAGS -fPIC -shared"
- ;;
- esac
+ LDFLAGS="$LDFLAGS -fPIC -shared"
AC_MSG_CHECKING([for -fPIC -shared])
AC_TRY_LINK(
[extern int X;],[return X == 0;],