diff --git a/ChangeLog b/ChangeLog index cf9221236..cdd7b1796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-21 Adam Fedor + + * configure.ac: Check for libkvm. + * configure, Headers/gnustep/base/config.h.in: Regen. + 2003-06-20 Adam Fedor * Documentation/Makefile.postamble (after-clean): Remove Base diff --git a/Headers/gnustep/base/config.h.in b/Headers/gnustep/base/config.h.in index 880d4be9b..80bdc4e99 100644 --- a/Headers/gnustep/base/config.h.in +++ b/Headers/gnustep/base/config.h.in @@ -6,7 +6,7 @@ /* Define if SO_REUSEADDR is broken on this system */ #undef BROKEN_SO_REUSEADDR -/* Define if your system terminates the final argument in /proc/$$/cmdline */ +/* Define if your system terminates the final argument in /proc/28891/cmdline */ #undef CMDLINE_TERMINATED /* Define if constructors are automatically loaded */ @@ -28,9 +28,6 @@ */ #undef HAVE_DIRENT_H -/* Define if you have dladdr */ -#undef HAVE_DLADDR - /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H @@ -82,12 +79,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBC_H +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + /* Define to 1 if you have the `giconv' library (-lgiconv). */ #undef HAVE_LIBGICONV /* Define to 1 if you have the `iconv' library (-liconv). */ #undef HAVE_LIBICONV +/* Define to 1 if you have the `kvm' library (-lkvm). */ +#undef HAVE_LIBKVM + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM diff --git a/configure b/configure index f667c74d7..016e3849a 100755 --- a/configure +++ b/configure @@ -10546,6 +10546,53 @@ fi done +#-------------------------------------------------------------------- +# Check if short and int values need to be word aligned +#-------------------------------------------------------------------- +echo "$as_me:$LINENO: checking short/int needs to be word aligned" >&5 +echo $ECHO_N "checking short/int needs to be word aligned... $ECHO_C" >&6 +if test "$cross_compiling" = yes; then + NEED_WORD_ALIGNMENT=1 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include "$srcdir/config/config.align.c" +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + NEED_WORD_ALIGNMENT=0 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +NEED_WORD_ALIGNMENT=1 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +cat >>confdefs.h <<_ACEOF +#define NEED_WORD_ALIGNMENT $NEED_WORD_ALIGNMENT +_ACEOF + +if test $NEED_WORD_ALIGNMENT = 1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + #-------------------------------------------------------------------- # This function needed by NSString for handling of %@ printf directive. #-------------------------------------------------------------------- @@ -10929,52 +10976,74 @@ echo "${ECHO_T}no" >&6 fi #-------------------------------------------------------------------- -# Check if short and int values need to be word aligned +# If /proc doesn't work, try kvm (on FreeBSD, for instance) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking short/int needs to be word aligned" >&5 -echo $ECHO_N "checking short/int needs to be word aligned... $ECHO_C" >&6 -if test "$cross_compiling" = yes; then - NEED_WORD_ALIGNMENT=1 + +echo "$as_me:$LINENO: checking for kvm_getenvv in -lkvm" >&5 +echo $ECHO_N "checking for kvm_getenvv in -lkvm... $ECHO_C" >&6 +if test "${ac_cv_lib_kvm_kvm_getenvv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkvm $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include "$srcdir/config/config.align.c" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char kvm_getenvv (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +kvm_getenvv (); + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - NEED_WORD_ALIGNMENT=0 + ac_cv_lib_kvm_kvm_getenvv=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -( exit $ac_status ) -NEED_WORD_ALIGNMENT=1 +ac_cv_lib_kvm_kvm_getenvv=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -cat >>confdefs.h <<_ACEOF -#define NEED_WORD_ALIGNMENT $NEED_WORD_ALIGNMENT +echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_getenvv" >&5 +echo "${ECHO_T}$ac_cv_lib_kvm_kvm_getenvv" >&6 +if test $ac_cv_lib_kvm_kvm_getenvv = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKVM 1 _ACEOF -if test $NEED_WORD_ALIGNMENT = 1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + LIBS="-lkvm $LIBS" + fi + #-------------------------------------------------------------------- # Include redefinition of main () only if needed. # On some systems - force redefinition to be used as the /proc stuff diff --git a/configure.ac b/configure.ac index e658b95ec..6312129fe 100644 --- a/configure.ac +++ b/configure.ac @@ -703,6 +703,22 @@ else fi AC_CHECK_HEADERS(wchar.h) +#-------------------------------------------------------------------- +# Check if short and int values need to be word aligned +#-------------------------------------------------------------------- +AC_MSG_CHECKING(short/int needs to be word aligned) +AC_TRY_RUN([#include "$srcdir/config/config.align.c"], + NEED_WORD_ALIGNMENT=0, + NEED_WORD_ALIGNMENT=1, + NEED_WORD_ALIGNMENT=1) +AC_DEFINE_UNQUOTED(NEED_WORD_ALIGNMENT, $NEED_WORD_ALIGNMENT, + [Define if your system needs to have short/int word aligned]) +if test $NEED_WORD_ALIGNMENT = 1; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + #-------------------------------------------------------------------- # This function needed by NSString for handling of %@ printf directive. #-------------------------------------------------------------------- @@ -770,20 +786,9 @@ else fi #-------------------------------------------------------------------- -# Check if short and int values need to be word aligned +# If /proc doesn't work, try kvm (on FreeBSD, for instance) #-------------------------------------------------------------------- -AC_MSG_CHECKING(short/int needs to be word aligned) -AC_TRY_RUN([#include "$srcdir/config/config.align.c"], - NEED_WORD_ALIGNMENT=0, - NEED_WORD_ALIGNMENT=1, - NEED_WORD_ALIGNMENT=1) -AC_DEFINE_UNQUOTED(NEED_WORD_ALIGNMENT, $NEED_WORD_ALIGNMENT, - [Define if your system needs to have short/int word aligned]) -if test $NEED_WORD_ALIGNMENT = 1; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi +AC_CHECK_LIB(kvm, kvm_getenvv) #-------------------------------------------------------------------- # Include redefinition of main () only if needed.