diff --git a/auxdir/x_ac_bluegene.m4 b/auxdir/x_ac_bluegene.m4 index 4e7670cb54916dcb252f61463aac9289993a68cc..8afcddb971510cbea6467138ae569384f6b7fc37 100644 --- a/auxdir/x_ac_bluegene.m4 +++ b/auxdir/x_ac_bluegene.m4 @@ -87,7 +87,7 @@ AC_DEFUN([X_AC_BGL], if test ! -z "$have_bg_files" ; then BG_INCLUDES="$bg_includes" - test "$GCC" = yes && CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system]) AC_DEFINE(HAVE_BGL, 1, [Define to 1 if emulating or running on Blue Gene/L system]) @@ -168,7 +168,7 @@ AC_DEFUN([X_AC_BGP], if test ! -z "$have_bgp_files" ; then BG_INCLUDES="$bg_includes" - test "$GCC" = yes && CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system]) AC_DEFINE(HAVE_BGP, 1, [Define to 1 if emulating or running on Blue Gene/P system]) diff --git a/configure b/configure index 15a9b1ffff0e4e70c1b477617913e4330a247621..e4dc90a42b604b97f5621605f99a7225b313ccc9 100755 --- a/configure +++ b/configure @@ -852,13 +852,6 @@ am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT -CMD_LDFLAGS -LIB_LDFLAGS -SO_LDFLAGS -HAVE_AIX_TRUE -HAVE_AIX_FALSE -HAVE_AIX -PROCTRACKDIR CC CFLAGS LDFLAGS @@ -875,6 +868,17 @@ AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE +BG_INCLUDES +BLUEGENE_LOADED_TRUE +BLUEGENE_LOADED_FALSE +BLUEGENE_LOADED +CMD_LDFLAGS +LIB_LDFLAGS +SO_LDFLAGS +HAVE_AIX_TRUE +HAVE_AIX_FALSE +HAVE_AIX +PROCTRACKDIR CPP GREP EGREP @@ -915,10 +919,6 @@ HAVE_UNSETENV_FALSE PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS -BG_INCLUDES -BLUEGENE_LOADED_TRUE -BLUEGENE_LOADED_FALSE -BLUEGENE_LOADED SEMAPHORE_SOURCES SEMAPHORE_LIBS NCURSES @@ -1566,8 +1566,12 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-bluegene-emulation + deprecated use --enable-bgl-emulation + --enable-bgl-emulation Run SLURM in BGL mode on a non-bluegene system --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-bgp-emulation Run SLURM in BG/P mode on a non-bluegene system --disable-largefile omit support for large files --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] @@ -1580,10 +1584,6 @@ Optional Features: --enable-load-env-no-login enable --get-user-env option to load user environment without .login - --enable-bluegene-emulation - deprecated use --enable-bgl-emulation - --enable-bgl-emulation Run SLURM in BGL mode on a non-bluegene system - --enable-bgp-emulation Run SLURM in BG/P mode on a non-bluegene system --enable-cray-xt enable Cray XT system support --enable-sun-const enable Sun Constellation system support --enable-debug enable debugging code for development @@ -1596,6 +1596,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-db2-dir=PATH Specify path to parent directory of DB2 library + --with-bg-serial=NAME set BG_SERIAL value + --with-proctrack=PATH Specify path to proctrack sources --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use @@ -1603,9 +1606,6 @@ Optional Packages: --with-tags[=TAGS] include additional configurations [automatic] --with-cpusetdir=PATH specify path to cpuset directory default is /dev/cpuset - --with-db2-dir=PATH Specify path to parent directory of DB2 library - --with-bg-serial=NAME set BG_SERIAL value - --with-apbasil=PATH Specify path to apbasil command --with-xcpu=PATH specify path to XCPU directory --with-pkg-config=PATH Specify path to pkg-config binary @@ -3927,136 +3927,532 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= + + ac_bluegene_loaded=no + + +# Check whether --with-db2-dir was given. +if test "${with_db2_dir+set}" = set; then + withval=$with_db2_dir; trydb2dir=$withval fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + + # test for bluegene emulation mode + + # Check whether --enable-bluegene-emulation was given. +if test "${enable_bluegene_emulation+set}" = set; then + enableval=$enable_bluegene_emulation; case "$enableval" in + yes) bluegene_emulation=yes ;; + no) bluegene_emulation=no ;; + *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bluegene-emulation" >&5 +echo "$as_me: error: bad value \"$enableval\" for --enable-bluegene-emulation" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + + + # Check whether --enable-bgl-emulation was given. +if test "${enable_bgl_emulation+set}" = set; then + enableval=$enable_bgl_emulation; case "$enableval" in + yes) bgl_emulation=yes ;; + no) bgl_emulation=no ;; + *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bgl-emulation" >&5 +echo "$as_me: error: bad value \"$enableval\" for --enable-bgl-emulation" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + + + if test "x$bluegene_emulation" = "xyes" -o "x$bgl_emulation" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3D 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext +cat >>confdefs.h <<\_ACEOF +#define HAVE_BGL 1 +_ACEOF - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FRONT_END 1 +_ACEOF + + { echo "$as_me:$LINENO: Running in BG/L emulation mode" >&5 +echo "$as_me: Running in BG/L emulation mode" >&6;} + bg_default_dirs="" + #define ac_bluegene_loaded so we don't load another bluegene conf + ac_bluegene_loaded=yes + else + bg_default_dirs="/bgl/BlueLight/ppcfloor/bglsys /opt/IBM/db2/V8.1 /u/bgdb2cli/sqllib /home/bgdb2cli/sqllib" + fi + + for bg_dir in $trydb2dir "" $bg_default_dirs; do + # Skip directories that don't exist + if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then + continue; + fi + + # Search for required BG API libraries in the directory + if test -z "$have_bg_ar" -a -f "$bg_dir/lib64/libbglbridge.so" ; then + have_bg_ar=yes + bg_bridge_so="$bg_dir/lib64/libbglbridge.so" + bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -lbglbridge -lbgldb -ltableapi -lbglmachine -lexpat -lsaymessage" + fi + + # Search for required DB2 library in the directory + if test -z "$have_db2" -a -f "$bg_dir/lib64/libdb2.so" ; then + have_db2=yes + bg_db2_so="$bg_dir/lib64/libdb2.so" + bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2" + fi + + # Search for headers in the directory + if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then + have_bg_hdr=yes + bg_includes="-I$bg_dir/include" + fi + done + + if test ! -z "$have_bg_ar" -a ! -z "$have_bg_hdr" -a ! -z "$have_db2" ; then + # ac_with_readline="no" + # Test to make sure the api is good + have_bg_files=yes + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <ac_nonexistent.h> + int rm_set_serial(char *); +int +main () +{ + rm_set_serial(""); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.er1 + (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); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + have_bg_files=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break + { { echo "$as_me:$LINENO: error: There is a problem linking to the BG/L api." >&5 +echo "$as_me: error: There is a problem linking to the BG/L api." >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$saved_LDFLAGS" + fi -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi + if test ! -z "$have_bg_files" ; then + BG_INCLUDES="$bg_includes" + CFLAGS="$CFLAGS -m64" - done - ac_cv_prog_CPP=$CPP +cat >>confdefs.h <<\_ACEOF +#define HAVE_3D 1 +_ACEOF -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BGL 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FRONT_END 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG_FILES 1 +_ACEOF + + + +cat >>confdefs.h <<_ACEOF +#define BG_BRIDGE_SO "$bg_bridge_so" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BG_DB2_SO "$bg_db2_so" +_ACEOF + + { echo "$as_me:$LINENO: checking for BG serial value" >&5 +echo $ECHO_N "checking for BG serial value... $ECHO_C" >&6; } + bg_serial="BGL" + +# Check whether --with-bg-serial was given. +if test "${with_bg_serial+set}" = set; then + withval=$with_bg_serial; bg_serial="$withval" +fi + + { echo "$as_me:$LINENO: result: $bg_serial" >&5 +echo "${ECHO_T}$bg_serial" >&6; } + +cat >>confdefs.h <<_ACEOF +#define BG_SERIAL "$bg_serial" +_ACEOF + + #define ac_bluegene_loaded so we don't load another bluegene conf + ac_bluegene_loaded=yes + fi + + + + + # test for bluegene emulation mode + # Check whether --enable-bgp-emulation was given. +if test "${enable_bgp_emulation+set}" = set; then + enableval=$enable_bgp_emulation; case "$enableval" in + yes) bgp_emulation=yes ;; + no) bgp_emulation=no ;; + *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bgp-emulation" >&5 +echo "$as_me: error: bad value \"$enableval\" for --enable-bgp-emulation" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + + + # Skip if already set + if test "x$ac_bluegene_loaded" = "xyes" ; then + bg_default_dirs="" + elif test "x$bgp_emulation" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3D 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BGP 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FRONT_END 1 +_ACEOF + + { echo "$as_me:$LINENO: Running in BG/P emulation mode" >&5 +echo "$as_me: Running in BG/P emulation mode" >&6;} + bg_default_dirs="" + #define ac_bluegene_loaded so we don't load another bluegene conf + ac_bluegene_loaded=yes + else + bg_default_dirs="/bgsys/drivers/ppcfloor" + fi + + libname=bgpbridge + + for bg_dir in $trydb2dir "" $bg_default_dirs; do + # Skip directories that don't exist + if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then + continue; + fi + + soloc=$bg_dir/lib64/lib$libname.so + # Search for required BG API libraries in the directory + if test -z "$have_bg_ar" -a -f "$soloc" ; then + have_bgp_ar=yes + bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname" + fi + + # Search for headers in the directory + if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then + have_bgp_hdr=yes + bg_includes="-I$bg_dir/include" + fi + done + + if test ! -z "$have_bgp_ar" -a ! -z "$have_bgp_hdr" ; then + # ac_with_readline="no" + # Test to make sure the api is good + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + int rm_set_serial(char *); +int +main () +{ + rm_set_serial(""); + ; + 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 + have_bgp_files=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { echo "$as_me:$LINENO: error: There is a problem linking to the BG/P api." >&5 +echo "$as_me: error: There is a problem linking to the BG/P api." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$saved_LDFLAGS" + fi + + if test ! -z "$have_bgp_files" ; then + BG_INCLUDES="$bg_includes" + CFLAGS="$CFLAGS -m64" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3D 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BGP 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FRONT_END 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BG_FILES 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BG_BRIDGE_SO "$soloc" +_ACEOF + + + { echo "$as_me:$LINENO: checking for BG serial value" >&5 +echo $ECHO_N "checking for BG serial value... $ECHO_C" >&6; } + bg_serial="BGP" + +# Check whether --with-bg-serial was given. +if test "${with_bg_serial+set}" = set; then + withval=$with_bg_serial; bg_serial="$withval" +fi + + { echo "$as_me:$LINENO: result: $bg_serial" >&5 +echo "${ECHO_T}$bg_serial" >&6; } + +cat >>confdefs.h <<_ACEOF +#define BG_SERIAL "$bg_serial" +_ACEOF + + #define ac_bluegene_loaded so we don't load another bluegene conf + ac_bluegene_loaded=yes + fi + + + + if test "x$ac_bluegene_loaded" = "xyes"; then + BLUEGENE_LOADED_TRUE= + BLUEGENE_LOADED_FALSE='#' +else + BLUEGENE_LOADED_TRUE='#' + BLUEGENE_LOADED_FALSE= +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF @@ -7133,7 +7529,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7136 "configure"' > conftest.$ac_ext + echo '#line 7532 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9239,11 +9635,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9242: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9638: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9246: \$? = $ac_status" >&5 + echo "$as_me:9642: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9529,11 +9925,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9532: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9928: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9536: \$? = $ac_status" >&5 + echo "$as_me:9932: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9633,11 +10029,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9636: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10032: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9640: \$? = $ac_status" >&5 + echo "$as_me:10036: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12010,7 +12406,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12013 "configure" +#line 12409 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12110,7 +12506,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12113 "configure" +#line 12509 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14511,11 +14907,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14514: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14910: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14518: \$? = $ac_status" >&5 + echo "$as_me:14914: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14615,11 +15011,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14618: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15014: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14622: \$? = $ac_status" >&5 + echo "$as_me:15018: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16213,11 +16609,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16216: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16612: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16220: \$? = $ac_status" >&5 + echo "$as_me:16616: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16317,11 +16713,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16320: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16716: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16324: \$? = $ac_status" >&5 + echo "$as_me:16720: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18537,11 +18933,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18540: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18936: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18544: \$? = $ac_status" >&5 + echo "$as_me:18940: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18827,11 +19223,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18830: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19226: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18834: \$? = $ac_status" >&5 + echo "$as_me:19230: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18931,11 +19327,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18934: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19330: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18938: \$? = $ac_status" >&5 + echo "$as_me:19334: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23655,262 +24051,17 @@ cat >>confdefs.h <<_ACEOF _ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R 0 -_ACEOF - - -fi - - - -for ac_func in strerror_r -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - 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 - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 -echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; } -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext; then - ac_cv_func_strerror_r_char_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - extern char *strerror_r (); -int -main () -{ -char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - return ! isalpha (x); - ; - return 0; -} -_ACEOF -rm -f 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>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_strerror_r_char_p=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 -echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } -if test $ac_cv_func_strerror_r_char_p = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STRERROR_R_CHAR_P 1 -_ACEOF - -fi - - - - - - - - - - +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R 0 +_ACEOF +fi -for ac_func in \ - fdatasync \ - hstrerror \ - strerror \ - mtrace \ - strndup \ - strlcpy \ - strsignal \ - inet_aton \ - inet_ntop \ - inet_pton \ - setproctitle \ - sysctlbyname \ +for ac_func in strerror_r do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -24003,13 +24154,15 @@ _ACEOF fi done - -{ echo "$as_me:$LINENO: checking whether hstrerror is declared" >&5 -echo $ECHO_N "checking whether hstrerror is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_hstrerror+set}" = set; then +{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 +echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; } +if test "${ac_cv_func_strerror_r_char_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -24019,9 +24172,11 @@ $ac_includes_default int main () { -#ifndef hstrerror - (void) hstrerror; -#endif + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; ; return 0; @@ -24044,36 +24199,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_hstrerror=yes + ac_cv_func_strerror_r_char_p=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_hstrerror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_hstrerror" >&5 -echo "${ECHO_T}$ac_cv_have_decl_hstrerror" >&6; } -if test $ac_cv_have_decl_hstrerror = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HSTRERROR 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HSTRERROR 0 -_ACEOF - -fi -{ echo "$as_me:$LINENO: checking whether strsignal is declared" >&5 -echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_strsignal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # strerror_r is not declared. Choose between + # systems that have relatively inaccessible declarations for the + # function. BeOS and DEC UNIX 4.0 fall in this category, but the + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24082,131 +24225,88 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + extern char *strerror_r (); int main () { -#ifndef strsignal - (void) strsignal; -#endif - +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f 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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 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_objext; then - ac_cv_have_decl_strsignal=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (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_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strerror_r_char_p=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_strsignal=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5 -echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6; } -if test $ac_cv_have_decl_strsignal = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 +echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRSIGNAL 1 +cat >>confdefs.h <<\_ACEOF +#define STRERROR_R_CHAR_P 1 _ACEOF +fi -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRSIGNAL 0 -_ACEOF -fi -{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 -echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_sys_siglist+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef sys_siglist - (void) sys_siglist; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext; then - ac_cv_have_decl_sys_siglist=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_sys_siglist=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 -echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; } -if test $ac_cv_have_decl_sys_siglist = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_SIGLIST 1 -_ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_SIGLIST 0 -_ACEOF -fi +for ac_func in \ + fdatasync \ + hstrerror \ + strerror \ + mtrace \ + strndup \ + strlcpy \ + strsignal \ + inet_aton \ + inet_ntop \ + inet_pton \ + setproctitle \ + sysctlbyname \ -for ac_func in unsetenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -24295,74 +24395,42 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - have_unsetenv=yes -fi -done - if test "x$have_unsetenv" = "xyes"; then - HAVE_UNSETENV_TRUE= - HAVE_UNSETENV_FALSE='#' -else - HAVE_UNSETENV_TRUE='#' - HAVE_UNSETENV_FALSE= fi +done - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF +{ echo "$as_me:$LINENO: checking whether hstrerror is declared" >&5 +echo $ECHO_N "checking whether hstrerror is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_hstrerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); +$ac_includes_default int main () { -return pthread_join (); +#ifndef hstrerror + (void) hstrerror; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" 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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -24371,133 +24439,64 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 - acx_pthread_ok=yes + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_hstrerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_have_decl_hstrerror=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_hstrerror" >&5 +echo "${ECHO_T}$ac_cv_have_decl_hstrerror" >&6; } +if test $ac_cv_have_decl_hstrerror = yes; then -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 -echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } - ;; +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_HSTRERROR 1 +_ACEOF - -*) - { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 -echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } - PTHREAD_CFLAGS="$flag" - ;; - *) - { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 -echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_HSTRERROR 0 +_ACEOF - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat >conftest.$ac_ext <<_ACEOF +fi +{ echo "$as_me:$LINENO: checking whether strsignal is declared" >&5 +echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_strsignal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <pthread.h> +$ac_includes_default int main () { -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); +#ifndef strsignal + (void) strsignal; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" 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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -24506,67 +24505,64 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 - acx_pthread_ok=yes + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strsignal=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_have_decl_strsignal=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6; } +if test $ac_cv_have_decl_strsignal = yes; then - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSIGNAL 1 +_ACEOF - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then - break; - fi - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSIGNAL 0 +_ACEOF -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 -echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF +fi +{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 +echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_sys_siglist+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <pthread.h> +$ac_includes_default int main () { -int attr=PTHREAD_CREATE_JOINABLE; +#ifndef sys_siglist + (void) sys_siglist; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" 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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -24575,30 +24571,86 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 - ok=PTHREAD_CREATE_JOINABLE + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ok=unknown -fi + ac_cv_have_decl_sys_siglist=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 +echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; } +if test $ac_cv_have_decl_sys_siglist = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 0 +_ACEOF + + +fi + + + + +for ac_func in unsetenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if test x"$ok" = xunknown; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <pthread.h> int main () { -int attr=PTHREAD_CREATE_UNDETACHED; +return $ac_func (); ; return 0; } @@ -24621,236 +24673,80 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ok=PTHREAD_CREATE_UNDETACHED + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ok=unknown + eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - fi - if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<\_ACEOF -#define PTHREAD_CREATE_JOINABLE $ok -_ACEOF - - fi - { echo "$as_me:$LINENO: result: ${ok}" >&5 -echo "${ECHO_T}${ok}" >&6; } - if test x"$ok" = xunknown; then - { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 -echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} - fi - - { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 -echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; - *solaris* | alpha*-osf*) flag="-D_REENTRANT";; - esac - { echo "$as_me:$LINENO: result: ${flag}" >&5 -echo "${ECHO_T}${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with cc_r - # Extract the first word of "cc_r", so it can be a program name with args. -set dummy cc_r; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PTHREAD_CC="cc_r" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_unsetenv=yes fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 -echo "${ECHO_T}$PTHREAD_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - +done + if test "x$have_unsetenv" = "xyes"; then + HAVE_UNSETENV_TRUE= + HAVE_UNSETENV_FALSE='#' else - PTHREAD_CC="$CC" + HAVE_UNSETENV_TRUE='#' + HAVE_UNSETENV_FALSE= fi -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD 1 -_ACEOF - - : -else - acx_pthread_ok=no - { { echo "$as_me:$LINENO: error: Error: Cannot figure out how to use pthreads!" >&5 -echo "$as_me: error: Error: Cannot figure out how to use pthreads!" >&2;} - { (exit 1); exit 1; }; } -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +acx_pthread_ok=no +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. -# Always define WITH_PTHREADS if we make it this far - -cat >>confdefs.h <<\_ACEOF -#define WITH_PTHREADS 1 -_ACEOF - -LDFLAGS="$LDFLAGS " -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -LIBS="$PTHREAD_LIBS $LIBS" - - - ac_bluegene_loaded=no - - -# Check whether --with-db2-dir was given. -if test "${with_db2_dir+set}" = set; then - withval=$with_db2_dir; trydb2dir=$withval -fi - - - # test for bluegene emulation mode - - # Check whether --enable-bluegene-emulation was given. -if test "${enable_bluegene_emulation+set}" = set; then - enableval=$enable_bluegene_emulation; case "$enableval" in - yes) bluegene_emulation=yes ;; - no) bluegene_emulation=no ;; - *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bluegene-emulation" >&5 -echo "$as_me: error: bad value \"$enableval\" for --enable-bluegene-emulation" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - - - # Check whether --enable-bgl-emulation was given. -if test "${enable_bgl_emulation+set}" = set; then - enableval=$enable_bgl_emulation; case "$enableval" in - yes) bgl_emulation=yes ;; - no) bgl_emulation=no ;; - *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bgl-emulation" >&5 -echo "$as_me: error: bad value \"$enableval\" for --enable-bgl-emulation" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - - - if test "x$bluegene_emulation" = "xyes" -o "x$bgl_emulation" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3D 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BGL 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FRONT_END 1 -_ACEOF - - { echo "$as_me:$LINENO: Running in BG/L emulation mode" >&5 -echo "$as_me: Running in BG/L emulation mode" >&6;} - bg_default_dirs="" - #define ac_bluegene_loaded so we don't load another bluegene conf - ac_bluegene_loaded=yes - else - bg_default_dirs="/bgl/BlueLight/ppcfloor/bglsys /opt/IBM/db2/V8.1 /u/bgdb2cli/sqllib /home/bgdb2cli/sqllib" - fi - - for bg_dir in $trydb2dir "" $bg_default_dirs; do - # Skip directories that don't exist - if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; - fi - - # Search for required BG API libraries in the directory - if test -z "$have_bg_ar" -a -f "$bg_dir/lib64/libbglbridge.so" ; then - have_bg_ar=yes - bg_bridge_so="$bg_dir/lib64/libbglbridge.so" - bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -lbglbridge -lbgldb -ltableapi -lbglmachine -lexpat -lsaymessage" - fi - - # Search for required DB2 library in the directory - if test -z "$have_db2" -a -f "$bg_dir/lib64/libdb2.so" ; then - have_db2=yes - bg_db2_so="$bg_dir/lib64/libdb2.so" - bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2" - fi - - # Search for headers in the directory - if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bg_hdr=yes - bg_includes="-I$bg_dir/include" - fi - done - - if test ! -z "$have_bg_ar" -a ! -z "$have_bg_hdr" -a ! -z "$have_db2" ; then - # ac_with_readline="no" - # Test to make sure the api is good - have_bg_files=yes - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - cat >conftest.$ac_ext <<_ACEOF +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - int rm_set_serial(char *); + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); int main () { - rm_set_serial(""); +return pthread_join (); ; return 0; } @@ -24873,167 +24769,188 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - have_bg_files=yes + acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: There is a problem linking to the BG/L api." >&5 -echo "$as_me: error: There is a problem linking to the BG/L api." >&2;} - { (exit 1); exit 1; }; } + fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$saved_LDFLAGS" - fi - - if test ! -z "$have_bg_files" ; then - BG_INCLUDES="$bg_includes" - test "$GCC" = yes && CFLAGS="$CFLAGS -m64" + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_3D 1 -_ACEOF +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG 1 -_ACEOF +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: -cat >>confdefs.h <<\_ACEOF -#define HAVE_BGL 1 -_ACEOF +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +case "${host_cpu}-${host_os}" in + *solaris*) -cat >>confdefs.h <<\_ACEOF -#define HAVE_FRONT_END 1 -_ACEOF + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG_FILES 1 -_ACEOF +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + case $flag in + none) + { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 +echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } + ;; + -*) + { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 +echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } + PTHREAD_CFLAGS="$flag" + ;; -cat >>confdefs.h <<_ACEOF -#define BG_BRIDGE_SO "$bg_bridge_so" -_ACEOF + *) + { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 +echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -cat >>confdefs.h <<_ACEOF -#define BG_DB2_SO "$bg_db2_so" + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - { echo "$as_me:$LINENO: checking for BG serial value" >&5 -echo $ECHO_N "checking for BG serial value... $ECHO_C" >&6; } - bg_serial="BGL" - -# Check whether --with-bg-serial was given. -if test "${with_bg_serial+set}" = set; then - withval=$with_bg_serial; bg_serial="$withval" -fi - - { echo "$as_me:$LINENO: result: $bg_serial" >&5 -echo "${ECHO_T}$bg_serial" >&6; } - -cat >>confdefs.h <<_ACEOF -#define BG_SERIAL "$bg_serial" +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} _ACEOF - - #define ac_bluegene_loaded so we don't load another bluegene conf - ac_bluegene_loaded=yes - fi - - +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 + acx_pthread_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # test for bluegene emulation mode - # Check whether --enable-bgp-emulation was given. -if test "${enable_bgp_emulation+set}" = set; then - enableval=$enable_bgp_emulation; case "$enableval" in - yes) bgp_emulation=yes ;; - no) bgp_emulation=no ;; - *) { { echo "$as_me:$LINENO: error: bad value \"$enableval\" for --enable-bgp-emulation" >&5 -echo "$as_me: error: bad value \"$enableval\" for --enable-bgp-emulation" >&2;} - { (exit 1); exit 1; }; } ;; - esac fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext - # Skip if already set - if test "x$ac_bluegene_loaded" = "xyes" ; then - bg_default_dirs="" - elif test "x$bgp_emulation" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3D 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BGP 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FRONT_END 1 -_ACEOF - - { echo "$as_me:$LINENO: Running in BG/P emulation mode" >&5 -echo "$as_me: Running in BG/P emulation mode" >&6;} - bg_default_dirs="" - #define ac_bluegene_loaded so we don't load another bluegene conf - ac_bluegene_loaded=yes - else - bg_default_dirs="/bgsys/drivers/ppcfloor" - fi - - libname=bgpbridge + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" - for bg_dir in $trydb2dir "" $bg_default_dirs; do - # Skip directories that don't exist - if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; - fi + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test "x$acx_pthread_ok" = xyes; then + break; + fi - soloc=$bg_dir/lib64/lib$libname.so - # Search for required BG API libraries in the directory - if test -z "$have_bg_ar" -a -f "$soloc" ; then - have_bgp_ar=yes - bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname" - fi + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi - # Search for headers in the directory - if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bgp_hdr=yes - bg_includes="-I$bg_dir/include" - fi - done +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - if test ! -z "$have_bgp_ar" -a ! -z "$have_bgp_hdr" ; then - # ac_with_readline="no" - # Test to make sure the api is good - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - cat >conftest.$ac_ext <<_ACEOF + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 +echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - int rm_set_serial(char *); +#include <pthread.h> int main () { - rm_set_serial(""); +int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } @@ -25056,86 +24973,169 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - have_bgp_files=yes + ok=PTHREAD_CREATE_JOINABLE else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: There is a problem linking to the BG/P api." >&5 -echo "$as_me: error: There is a problem linking to the BG/P api." >&2;} - { (exit 1); exit 1; }; } + ok=unknown fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$saved_LDFLAGS" - fi - - if test ! -z "$have_bgp_files" ; then - BG_INCLUDES="$bg_includes" - test "$GCC" = yes && CFLAGS="$CFLAGS -m64" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3D 1 + if test x"$ok" = xunknown; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG 1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +int attr=PTHREAD_CREATE_UNDETACHED; + ; + 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 + ok=PTHREAD_CREATE_UNDETACHED +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ok=unknown +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BGP 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<\_ACEOF -#define HAVE_FRONT_END 1 +#define PTHREAD_CREATE_JOINABLE $ok _ACEOF + fi + { echo "$as_me:$LINENO: result: ${ok}" >&5 +echo "${ECHO_T}${ok}" >&6; } + if test x"$ok" = xunknown; then + { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 +echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} + fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BG_FILES 1 -_ACEOF + { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 +echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | alpha*-osf*) flag="-D_REENTRANT";; + esac + { echo "$as_me:$LINENO: result: ${flag}" >&5 +echo "${ECHO_T}${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" -cat >>confdefs.h <<_ACEOF -#define BG_BRIDGE_SO "$soloc" -_ACEOF + # More AIX lossage: must compile with cc_r + # Extract the first word of "cc_r", so it can be a program name with args. +set dummy cc_r; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PTHREAD_CC="cc_r" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 +echo "${ECHO_T}$PTHREAD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi - { echo "$as_me:$LINENO: checking for BG serial value" >&5 -echo $ECHO_N "checking for BG serial value... $ECHO_C" >&6; } - bg_serial="BGP" -# Check whether --with-bg-serial was given. -if test "${with_bg_serial+set}" = set; then - withval=$with_bg_serial; bg_serial="$withval" +else + PTHREAD_CC="$CC" fi - { echo "$as_me:$LINENO: result: $bg_serial" >&5 -echo "${ECHO_T}$bg_serial" >&6; } -cat >>confdefs.h <<_ACEOF -#define BG_SERIAL "$bg_serial" -_ACEOF - #define ac_bluegene_loaded so we don't load another bluegene conf - ac_bluegene_loaded=yes - fi +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then - if test "x$ac_bluegene_loaded" = "xyes"; then - BLUEGENE_LOADED_TRUE= - BLUEGENE_LOADED_FALSE='#' +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD 1 +_ACEOF + + : else - BLUEGENE_LOADED_TRUE='#' - BLUEGENE_LOADED_FALSE= + acx_pthread_ok=no + { { echo "$as_me:$LINENO: error: Error: Cannot figure out how to use pthreads!" >&5 +echo "$as_me: error: Error: Cannot figure out how to use pthreads!" >&2;} + { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Always define WITH_PTHREADS if we make it this far + +cat >>confdefs.h <<\_ACEOF +#define WITH_PTHREADS 1 +_ACEOF +LDFLAGS="$LDFLAGS " +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +LIBS="$PTHREAD_LIBS $LIBS" { echo "$as_me:$LINENO: checking for Cray XT" >&5 @@ -27751,13 +27751,6 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${HAVE_AIX_TRUE}" && test -z "${HAVE_AIX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_AIX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_AIX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -27772,6 +27765,20 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${BLUEGENE_LOADED_TRUE}" && test -z "${BLUEGENE_LOADED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BLUEGENE_LOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BLUEGENE_LOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_AIX_TRUE}" && test -z "${HAVE_AIX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${HAVE_AIX_PROCTRACK_TRUE}" && test -z "${HAVE_AIX_PROCTRACK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_AIX_PROCTRACK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -27828,13 +27835,6 @@ echo "$as_me: error: conditional \"HAVE_UNSETENV\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BLUEGENE_LOADED_TRUE}" && test -z "${BLUEGENE_LOADED_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BLUEGENE_LOADED\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BLUEGENE_LOADED\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${HAVE_SOME_CURSES_TRUE}" && test -z "${HAVE_SOME_CURSES_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_SOME_CURSES\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -28633,18 +28633,18 @@ am__untar!$am__untar$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim -CMD_LDFLAGS!$CMD_LDFLAGS$ac_delim -LIB_LDFLAGS!$LIB_LDFLAGS$ac_delim -SO_LDFLAGS!$SO_LDFLAGS$ac_delim -HAVE_AIX_TRUE!$HAVE_AIX_TRUE$ac_delim -HAVE_AIX_FALSE!$HAVE_AIX_FALSE$ac_delim -HAVE_AIX!$HAVE_AIX$ac_delim -PROCTRACKDIR!$PROCTRACKDIR$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -28686,17 +28686,21 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +BG_INCLUDES!$BG_INCLUDES$ac_delim +BLUEGENE_LOADED_TRUE!$BLUEGENE_LOADED_TRUE$ac_delim +BLUEGENE_LOADED_FALSE!$BLUEGENE_LOADED_FALSE$ac_delim +BLUEGENE_LOADED!$BLUEGENE_LOADED$ac_delim +CMD_LDFLAGS!$CMD_LDFLAGS$ac_delim +LIB_LDFLAGS!$LIB_LDFLAGS$ac_delim +SO_LDFLAGS!$SO_LDFLAGS$ac_delim +HAVE_AIX_TRUE!$HAVE_AIX_TRUE$ac_delim +HAVE_AIX_FALSE!$HAVE_AIX_FALSE$ac_delim +HAVE_AIX!$HAVE_AIX$ac_delim +PROCTRACKDIR!$PROCTRACKDIR$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim @@ -28737,10 +28741,6 @@ HAVE_UNSETENV_FALSE!$HAVE_UNSETENV_FALSE$ac_delim PTHREAD_CC!$PTHREAD_CC$ac_delim PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim -BG_INCLUDES!$BG_INCLUDES$ac_delim -BLUEGENE_LOADED_TRUE!$BLUEGENE_LOADED_TRUE$ac_delim -BLUEGENE_LOADED_FALSE!$BLUEGENE_LOADED_FALSE$ac_delim -BLUEGENE_LOADED!$BLUEGENE_LOADED$ac_delim SEMAPHORE_SOURCES!$SEMAPHORE_SOURCES$ac_delim SEMAPHORE_LIBS!$SEMAPHORE_LIBS$ac_delim NCURSES!$NCURSES$ac_delim diff --git a/configure.ac b/configure.ac index 065d62d76a7e9fc46640d91b310ec2623f3d580e..2cda861a2c81c8333416d519893ff09c60f3ba71 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,12 @@ AM_MAINTAINER_MODE AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([slurm/slurm.h]) +dnl This needs to be close to the front to set CFLAGS=-m64 +X_AC_BGL +X_AC_BGP +AM_CONDITIONAL(BLUEGENE_LOADED, test "x$ac_bluegene_loaded" = "xyes") +AC_SUBST(BLUEGENE_LOADED) + X_AC_AIX dnl @@ -141,11 +147,6 @@ LDFLAGS="$LDFLAGS " CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" -X_AC_BGL -X_AC_BGP -AM_CONDITIONAL(BLUEGENE_LOADED, test "x$ac_bluegene_loaded" = "xyes") -AC_SUBST(BLUEGENE_LOADED) - X_AC_CRAY X_AC_SUN_CONST diff --git a/doc/man/man1/sreport.1 b/doc/man/man1/sreport.1 index 62178e0b73021b7ccb52451042af7e69ea214a89..7ee21cf18d799f042ef242333e5b3466054f87e4 100644 --- a/doc/man/man1/sreport.1 +++ b/doc/man/man1/sreport.1 @@ -199,6 +199,9 @@ COMMON FOR ALL TYPES .B All_Clusters Use all monitored clusters. Default is local cluster. .TP +.B Clusters=<OPT> +List of clusters to include in report. Default is local cluster. +.TP .B End=<OPT> Period ending for report. Default is 23:59:59 of previous day. .TP @@ -213,12 +216,22 @@ Period start for report. Default is 00:00:00 of previous day. CLUSTER .RS .TP -.B Names=<OPT> -List of clusters to include in report. Default is local cluster. +.B Accounts=<OPT> +When used with the UserUtilizationByAccount, or +AccountUtilizationByUser, List of accounts to include in report. +Default is all. .TP .B Tree When used with the AccountUtilizationByUser report will span the accounts as they are in the hierarchy. +.TP +.B Users=<OPT> +When used with any report other than Utilization, List of users to +include in report. Default is all. +.TP +.B Wckeys=<OPT> +When used with the UserUtilizationByWckey or WCKeyUtilizationByUser, +List of wckeys to include in report. Default is all. .RE .TP @@ -226,10 +239,11 @@ JOB .RS .TP .B Accounts=<OPT> -List of accounts to use for the report. Default is all. -.TP -.B Clusters=<OPT> -List of clusters to include in report. Default is local cluster. +List of accounts to use for the report Default is all. The Sizes +report only displays 1 hierarchical level. If accounts are specified +the next layer of accounts under those specified will be displayed, +not the accounts specified. In the Sizes reports the default for +accounts is root. .TP .B GID=<OPT> List of group ids to include in report. Default is all. @@ -258,11 +272,9 @@ USER .B Accounts=<OPT> List of accounts to use for the report. Default is all. .TP -.B Clusters=<OPT> -List of clusters to include in report. Default is local cluster. -.TP .B Group -Group all accounts together for each user. Default is a separate entry for each user and account reference. +Group all accounts together for each user. Default is a separate +entry for each user and account reference. .TP .B TopCount=<OPT> Used in the TopUsage report. Change the number of users displayed. diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.c b/src/plugins/select/bluegene/block_allocator/block_allocator.c index ec65675d20417dd29e15a87c0fc48167220c8614..41eaa82b5f3d65e55ad60011608799eb8d6c45ef 100644 --- a/src/plugins/select/bluegene/block_allocator/block_allocator.c +++ b/src/plugins/select/bluegene/block_allocator/block_allocator.c @@ -1049,7 +1049,7 @@ node_info_error: if (have_db2) { verbose("Attempting to contact MMCS"); if ((rc = bridge_get_bg(&bg)) != STATUS_OK) { - error("bridge_get_BG(): %d", rc); + fatal("bridge_get_BG(): %d", rc); return; } diff --git a/src/sreport/sreport.c b/src/sreport/sreport.c index 71a3f2188ad92c336b99020afb570104e087a76c..08b7857835b9cd1513335a7672149cd9646169b4 100644 --- a/src/sreport/sreport.c +++ b/src/sreport/sreport.c @@ -643,15 +643,21 @@ sreport [<OPTION>] [<COMMAND>] \n\ - Users=<OPT> - When used with any report other than \n\ Utilization, List of users to include in \n\ report. Default is all. \n\ - - Wckeys=<OPT> - When used with the UserUtilizationByWckey,\n\ + - Wckeys=<OPT> - When used with the UserUtilizationByWckey\n\ or WCKeyUtilizationByUser, List of wckeys\n\ to include in report. Default is all. \n\ \n\ job - Accounts=<OPT> - List of accounts to use for the report \n\ - Default is all. \n\ + Default is all. The Sizes report only \n\ + displays 1 hierarchical level. If \n\ + accounts are specified the next layer of \n\ + accounts under those specified will be \n\ + displayed, not the accounts specified. \n\ + In the Sizes reports the default for \n\ + accounts is root. \n\ - Clusters=<OPT> - List of clusters to include in report. \n\ Default is local cluster. \n\ - - GID=<OPT> - List of group ids to include in report \n\ + - GID=<OPT> - List of group ids to include in report. \n\ Default is all. \n\ - Grouping=<OPT> - Comma separated list of size groupings. \n\ (i.e. 50,100,150 would group job cpu count\n\