* configure.ac: Add option to disable bfd. Add check for

Solaris libs socket and nsl.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26009 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2008-01-28 19:45:23 +00:00
parent dc6da4e2f4
commit 02764f3ec6
3 changed files with 169 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-01-28 Adam Fedor <fedor@gnu.org>
* configure.ac: Add option to disable bfd. Add check for
Solaris libs socket and nsl.
2008-01-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSXMLParser.m: Implement reporting of namespace

147
configure vendored
View file

@ -1348,6 +1348,7 @@ Optional Features:
--disable-importing-config-file
Disable importing of an existing GNUstep config
file and use inbuilt defaults instead.
--disable-bfd Don't use bfd functions (stack traces, etc)
--enable-procfs Use /proc filesystem (default)
--enable-procfs-psinfo Use /proc/%pid% to get info
--enable-pass-arguments Force user main call to NSProcessInfo initialize
@ -11113,6 +11114,16 @@ done
#--------------------------------------------------------------------
# These headers/functions needed for stacktrace in NSException.m
#--------------------------------------------------------------------
PASS_ARG=yes
# Check whether --enable-bfd was given.
if test "${enable_bfd+set}" = set; then
enableval=$enable_bfd;
else
enable_bfd=$PASS_ARG
fi
if test $enable_bfd = yes; then
for ac_header in bfd.h
do
@ -11395,6 +11406,7 @@ _ACEOF
fi
fi
#--------------------------------------------------------------------
# These headers/functions needed by NSLog.m
@ -13671,6 +13683,141 @@ fi
#--------------------------------------------------------------------
# Solaris needs this for internet functions. It's already in
# gnustep-make, which should be deprecated.
#--------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; }
if test "${ac_cv_lib_nsl_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_nsl_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_nsl_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; }
if test $ac_cv_lib_nsl_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF
LIBS="-lnsl $LIBS"
fi
{ echo "$as_me:$LINENO: checking for main in -lsocket" >&5
echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; }
if test "${ac_cv_lib_socket_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_socket_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_socket_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; }
if test $ac_cv_lib_socket_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF
LIBS="-lsocket $LIBS"
fi
#--------------------------------------------------------------------
# These used by GSFileHandle.m and distributed objects
#--------------------------------------------------------------------

View file

@ -1370,9 +1370,16 @@ dnl AC_REPLACE_FUNCS(recvfrom)
#--------------------------------------------------------------------
# These headers/functions needed for stacktrace in NSException.m
#--------------------------------------------------------------------
AC_CHECK_HEADERS(bfd.h)
AC_CHECK_LIB(iberty, dyn_string_append)
AC_CHECK_LIB(bfd, bfd_openr)
PASS_ARG=yes
AC_ARG_ENABLE(bfd,
[ --disable-bfd Don't use bfd functions (stack traces, etc)],,
enable_bfd=$PASS_ARG)
if test $enable_bfd = yes; then
AC_CHECK_HEADERS(bfd.h)
AC_CHECK_LIB(iberty, dyn_string_append)
AC_CHECK_LIB(bfd, bfd_openr)
fi
#--------------------------------------------------------------------
# These headers/functions needed by NSLog.m
@ -1544,6 +1551,13 @@ AC_SUBST(DEFINE_UINT64_T)
AC_SUBST(DEFINE_INTPTR_T)
AC_SUBST(DEFINE_UINTPTR_T)
#--------------------------------------------------------------------
# Solaris needs this for internet functions. It's already in
# gnustep-make, which should be deprecated.
#--------------------------------------------------------------------
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(socket, main)
#--------------------------------------------------------------------
# These used by GSFileHandle.m and distributed objects
#--------------------------------------------------------------------