diff options
author | Camm Maguire <camm@debian.org> | 2014-04-21 13:29:36 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014-04-21 15:08:02 +0000 |
commit | 5327ab870664710ce02bc5ca2ff850cf2ac5f8d6 (patch) | |
tree | 379527a2887fc670ccba9147fce05270728ed1df | |
parent | 1f33263bbfc5f637f0a412f7404c14c9303f9c1b (diff) | |
download | gcl-5327ab870664710ce02bc5ca2ff850cf2ac5f8d6.tar.gz |
cleanup dlopen linker option
-rwxr-xr-x | gcl/configure | 56 | ||||
-rw-r--r-- | gcl/configure.in | 1 | ||||
-rw-r--r-- | gcl/h/protoize.h | 3 | ||||
-rwxr-xr-x | gcl/o/sfasl.c | 2 |
4 files changed, 53 insertions, 9 deletions
diff --git a/gcl/configure b/gcl/configure index 605b361b..9738f950 100755 --- a/gcl/configure +++ b/gcl/configure @@ -5177,10 +5177,8 @@ $as_echo_n "checking for CFLAG $TMPF... " >&6; } CFLAGS_ORI=$CFLAGS CFLAGS="$CFLAGS $TMPF" if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6367,6 +6365,7 @@ else fi TLIBS="$TLIBS -ldl -rdynamic" + TCFLAGS="-fPIC $TCFLAGS" $as_echo "#define USE_DLOPEN 1" >>confdefs.h @@ -8711,6 +8710,54 @@ fi + +for ac_header in dirent.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRENT_H 1 +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type" >&5 +$as_echo_n "checking for d_type... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <dirent.h> + +int +main () +{ + + struct dirent d; + return d.d_type=0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +$as_echo "#define HAVE_D_TYPE 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +done + + # readline # Check whether --enable-readline was given. if test "${enable_readline+set}" = set; then : @@ -9993,7 +10040,6 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - for ac_func in sigaltstack do : ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack" diff --git a/gcl/configure.in b/gcl/configure.in index ebb01fa0..5a16e29f 100644 --- a/gcl/configure.in +++ b/gcl/configure.in @@ -953,6 +953,7 @@ if test "$enable_dlopen" = "yes" ; then AC_CHECK_LIB(dl,dlopen,have_dl=1,AC_MSG_ERROR([Cannot find dlopen in -dl])) TLIBS="$TLIBS -ldl -rdynamic" + TCFLAGS="-fPIC $TCFLAGS" AC_DEFINE(USE_DLOPEN,1,[link compiled objects via libdl]) fi diff --git a/gcl/h/protoize.h b/gcl/h/protoize.h index e43ad034..f8d10f94 100644 --- a/gcl/h/protoize.h +++ b/gcl/h/protoize.h @@ -1131,9 +1131,6 @@ read_special_symbols(char *); #endif void -unlink_loaded_files(void); - -void FEpackage_error(object,const char *s); void diff --git a/gcl/o/sfasl.c b/gcl/o/sfasl.c index 38702403..da75d8eb 100755 --- a/gcl/o/sfasl.c +++ b/gcl/o/sfasl.c @@ -37,7 +37,7 @@ via #include "../c/sfasl.c" /* #endif */ -#ifdef SPECIAL_RSYM +#if defined(SPECIAL_RSYM) && !defined(USE_DLOPEN) #include <string.h> |