| @@ -8779,26 +8779,580 @@ fi | | | @@ -8779,26 +8779,580 @@ fi |
8779 | fi | | 8779 | fi |
8780 | | | 8780 | |
8781 | fi | | 8781 | fi |
8782 | { echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 | | 8782 | { echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 |
8783 | echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } | | 8783 | echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } |
8784 | if test $ac_cv_func_strerror_r_char_p = yes; then | | 8784 | if test $ac_cv_func_strerror_r_char_p = yes; then |
8785 | | | 8785 | |
8786 | cat >>confdefs.h <<\_ACEOF | | 8786 | cat >>confdefs.h <<\_ACEOF |
8787 | #define STRERROR_R_CHAR_P 1 | | 8787 | #define STRERROR_R_CHAR_P 1 |
8788 | _ACEOF | | 8788 | _ACEOF |
8789 | | | 8789 | |
8790 | fi | | 8790 | fi |
8791 | | | 8791 | |
| | | 8792 | { echo "$as_me:$LINENO: checking for pid_t" >&5 |
| | | 8793 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } |
| | | 8794 | if test "${ac_cv_type_pid_t+set}" = set; then |
| | | 8795 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 8796 | else |
| | | 8797 | cat >conftest.$ac_ext <<_ACEOF |
| | | 8798 | /* confdefs.h. */ |
| | | 8799 | _ACEOF |
| | | 8800 | cat confdefs.h >>conftest.$ac_ext |
| | | 8801 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 8802 | /* end confdefs.h. */ |
| | | 8803 | $ac_includes_default |
| | | 8804 | typedef pid_t ac__type_new_; |
| | | 8805 | int |
| | | 8806 | main () |
| | | 8807 | { |
| | | 8808 | if ((ac__type_new_ *) 0) |
| | | 8809 | return 0; |
| | | 8810 | if (sizeof (ac__type_new_)) |
| | | 8811 | return 0; |
| | | 8812 | ; |
| | | 8813 | return 0; |
| | | 8814 | } |
| | | 8815 | _ACEOF |
| | | 8816 | rm -f conftest.$ac_objext |
| | | 8817 | if { (ac_try="$ac_compile" |
| | | 8818 | case "(($ac_try" in |
| | | 8819 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 8820 | *) ac_try_echo=$ac_try;; |
| | | 8821 | esac |
| | | 8822 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 8823 | (eval "$ac_compile") 2>conftest.er1 |
| | | 8824 | ac_status=$? |
| | | 8825 | grep -v '^ *+' conftest.er1 >conftest.err |
| | | 8826 | rm -f conftest.er1 |
| | | 8827 | cat conftest.err >&5 |
| | | 8828 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 8829 | (exit $ac_status); } && { |
| | | 8830 | test -z "$ac_c_werror_flag" || |
| | | 8831 | test ! -s conftest.err |
| | | 8832 | } && test -s conftest.$ac_objext; then |
| | | 8833 | ac_cv_type_pid_t=yes |
| | | 8834 | else |
| | | 8835 | echo "$as_me: failed program was:" >&5 |
| | | 8836 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 8837 | |
| | | 8838 | ac_cv_type_pid_t=no |
| | | 8839 | fi |
| | | 8840 | |
| | | 8841 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| | | 8842 | fi |
| | | 8843 | { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
| | | 8844 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } |
| | | 8845 | if test $ac_cv_type_pid_t = yes; then |
| | | 8846 | : |
| | | 8847 | else |
| | | 8848 | |
| | | 8849 | cat >>confdefs.h <<_ACEOF |
| | | 8850 | #define pid_t int |
| | | 8851 | _ACEOF |
| | | 8852 | |
| | | 8853 | fi |
| | | 8854 | |
| | | 8855 | |
| | | 8856 | for ac_header in vfork.h |
| | | 8857 | do |
| | | 8858 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| | | 8859 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then |
| | | 8860 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
| | | 8861 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } |
| | | 8862 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then |
| | | 8863 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 8864 | fi |
| | | 8865 | ac_res=`eval echo '${'$as_ac_Header'}'` |
| | | 8866 | { echo "$as_me:$LINENO: result: $ac_res" >&5 |
| | | 8867 | echo "${ECHO_T}$ac_res" >&6; } |
| | | 8868 | else |
| | | 8869 | # Is the header compilable? |
| | | 8870 | { echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
| | | 8871 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } |
| | | 8872 | cat >conftest.$ac_ext <<_ACEOF |
| | | 8873 | /* confdefs.h. */ |
| | | 8874 | _ACEOF |
| | | 8875 | cat confdefs.h >>conftest.$ac_ext |
| | | 8876 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 8877 | /* end confdefs.h. */ |
| | | 8878 | $ac_includes_default |
| | | 8879 | #include <$ac_header> |
| | | 8880 | _ACEOF |
| | | 8881 | rm -f conftest.$ac_objext |
| | | 8882 | if { (ac_try="$ac_compile" |
| | | 8883 | case "(($ac_try" in |
| | | 8884 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 8885 | *) ac_try_echo=$ac_try;; |
| | | 8886 | esac |
| | | 8887 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 8888 | (eval "$ac_compile") 2>conftest.er1 |
| | | 8889 | ac_status=$? |
| | | 8890 | grep -v '^ *+' conftest.er1 >conftest.err |
| | | 8891 | rm -f conftest.er1 |
| | | 8892 | cat conftest.err >&5 |
| | | 8893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 8894 | (exit $ac_status); } && { |
| | | 8895 | test -z "$ac_c_werror_flag" || |
| | | 8896 | test ! -s conftest.err |
| | | 8897 | } && test -s conftest.$ac_objext; then |
| | | 8898 | ac_header_compiler=yes |
| | | 8899 | else |
| | | 8900 | echo "$as_me: failed program was:" >&5 |
| | | 8901 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 8902 | |
| | | 8903 | ac_header_compiler=no |
| | | 8904 | fi |
| | | 8905 | |
| | | 8906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| | | 8907 | { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
| | | 8908 | echo "${ECHO_T}$ac_header_compiler" >&6; } |
| | | 8909 | |
| | | 8910 | # Is the header present? |
| | | 8911 | { echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
| | | 8912 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } |
| | | 8913 | cat >conftest.$ac_ext <<_ACEOF |
| | | 8914 | /* confdefs.h. */ |
| | | 8915 | _ACEOF |
| | | 8916 | cat confdefs.h >>conftest.$ac_ext |
| | | 8917 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 8918 | /* end confdefs.h. */ |
| | | 8919 | #include <$ac_header> |
| | | 8920 | _ACEOF |
| | | 8921 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
| | | 8922 | case "(($ac_try" in |
| | | 8923 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 8924 | *) ac_try_echo=$ac_try;; |
| | | 8925 | esac |
| | | 8926 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 8927 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 |
| | | 8928 | ac_status=$? |
| | | 8929 | grep -v '^ *+' conftest.er1 >conftest.err |
| | | 8930 | rm -f conftest.er1 |
| | | 8931 | cat conftest.err >&5 |
| | | 8932 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 8933 | (exit $ac_status); } >/dev/null && { |
| | | 8934 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| | | 8935 | test ! -s conftest.err |
| | | 8936 | }; then |
| | | 8937 | ac_header_preproc=yes |
| | | 8938 | else |
| | | 8939 | echo "$as_me: failed program was:" >&5 |
| | | 8940 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 8941 | |
| | | 8942 | ac_header_preproc=no |
| | | 8943 | fi |
| | | 8944 | |
| | | 8945 | rm -f conftest.err conftest.$ac_ext |
| | | 8946 | { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
| | | 8947 | echo "${ECHO_T}$ac_header_preproc" >&6; } |
| | | 8948 | |
| | | 8949 | # So? What about this header? |
| | | 8950 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
| | | 8951 | yes:no: ) |
| | | 8952 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 |
| | | 8953 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} |
| | | 8954 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 |
| | | 8955 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} |
| | | 8956 | ac_header_preproc=yes |
| | | 8957 | ;; |
| | | 8958 | no:yes:* ) |
| | | 8959 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 |
| | | 8960 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} |
| | | 8961 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 |
| | | 8962 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} |
| | | 8963 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 |
| | | 8964 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} |
| | | 8965 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 |
| | | 8966 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} |
| | | 8967 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 |
| | | 8968 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} |
| | | 8969 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 |
| | | 8970 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} |
| | | 8971 | ( cat <<\_ASBOX |
| | | 8972 | ## ------------------------------- ## |
| | | 8973 | ## Report this to grant@NetBSD.org ## |
| | | 8974 | ## ------------------------------- ## |
| | | 8975 | _ASBOX |
| | | 8976 | ) | sed "s/^/$as_me: WARNING: /" >&2 |
| | | 8977 | ;; |
| | | 8978 | esac |
| | | 8979 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
| | | 8980 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } |
| | | 8981 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then |
| | | 8982 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 8983 | else |
| | | 8984 | eval "$as_ac_Header=\$ac_header_preproc" |
| | | 8985 | fi |
| | | 8986 | ac_res=`eval echo '${'$as_ac_Header'}'` |
| | | 8987 | { echo "$as_me:$LINENO: result: $ac_res" >&5 |
| | | 8988 | echo "${ECHO_T}$ac_res" >&6; } |
| | | 8989 | |
| | | 8990 | fi |
| | | 8991 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
| | | 8992 | cat >>confdefs.h <<_ACEOF |
| | | 8993 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| | | 8994 | _ACEOF |
| | | 8995 | |
| | | 8996 | fi |
| | | 8997 | |
| | | 8998 | done |
| | | 8999 | |
| | | 9000 | |
| | | 9001 | |
| | | 9002 | for ac_func in fork vfork |
| | | 9003 | do |
| | | 9004 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| | | 9005 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
| | | 9006 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } |
| | | 9007 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then |
| | | 9008 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 9009 | else |
| | | 9010 | cat >conftest.$ac_ext <<_ACEOF |
| | | 9011 | /* confdefs.h. */ |
| | | 9012 | _ACEOF |
| | | 9013 | cat confdefs.h >>conftest.$ac_ext |
| | | 9014 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 9015 | /* end confdefs.h. */ |
| | | 9016 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
| | | 9017 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| | | 9018 | #define $ac_func innocuous_$ac_func |
| | | 9019 | |
| | | 9020 | /* System header to define __stub macros and hopefully few prototypes, |
| | | 9021 | which can conflict with char $ac_func (); below. |
| | | 9022 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| | | 9023 | <limits.h> exists even on freestanding compilers. */ |
| | | 9024 | |
| | | 9025 | #ifdef __STDC__ |
| | | 9026 | # include <limits.h> |
| | | 9027 | #else |
| | | 9028 | # include <assert.h> |
| | | 9029 | #endif |
| | | 9030 | |
| | | 9031 | #undef $ac_func |
| | | 9032 | |
| | | 9033 | /* Override any GCC internal prototype to avoid an error. |
| | | 9034 | Use char because int might match the return type of a GCC |
| | | 9035 | builtin and then its argument prototype would still apply. */ |
| | | 9036 | #ifdef __cplusplus |
| | | 9037 | extern "C" |
| | | 9038 | #endif |
| | | 9039 | char $ac_func (); |
| | | 9040 | /* The GNU C library defines this for functions which it implements |
| | | 9041 | to always fail with ENOSYS. Some functions are actually named |
| | | 9042 | something starting with __ and the normal name is an alias. */ |
| | | 9043 | #if defined __stub_$ac_func || defined __stub___$ac_func |
| | | 9044 | choke me |
| | | 9045 | #endif |
| | | 9046 | |
| | | 9047 | int |
| | | 9048 | main () |
| | | 9049 | { |
| | | 9050 | return $ac_func (); |
| | | 9051 | ; |
| | | 9052 | return 0; |
| | | 9053 | } |
| | | 9054 | _ACEOF |
| | | 9055 | rm -f conftest.$ac_objext conftest$ac_exeext |
| | | 9056 | if { (ac_try="$ac_link" |
| | | 9057 | case "(($ac_try" in |
| | | 9058 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 9059 | *) ac_try_echo=$ac_try;; |
| | | 9060 | esac |
| | | 9061 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 9062 | (eval "$ac_link") 2>conftest.er1 |
| | | 9063 | ac_status=$? |
| | | 9064 | grep -v '^ *+' conftest.er1 >conftest.err |
| | | 9065 | rm -f conftest.er1 |
| | | 9066 | cat conftest.err >&5 |
| | | 9067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 9068 | (exit $ac_status); } && { |
| | | 9069 | test -z "$ac_c_werror_flag" || |
| | | 9070 | test ! -s conftest.err |
| | | 9071 | } && test -s conftest$ac_exeext && |
| | | 9072 | $as_test_x conftest$ac_exeext; then |
| | | 9073 | eval "$as_ac_var=yes" |
| | | 9074 | else |
| | | 9075 | echo "$as_me: failed program was:" >&5 |
| | | 9076 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 9077 | |
| | | 9078 | eval "$as_ac_var=no" |
| | | 9079 | fi |
| | | 9080 | |
| | | 9081 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
| | | 9082 | conftest$ac_exeext conftest.$ac_ext |
| | | 9083 | fi |
| | | 9084 | ac_res=`eval echo '${'$as_ac_var'}'` |
| | | 9085 | { echo "$as_me:$LINENO: result: $ac_res" >&5 |
| | | 9086 | echo "${ECHO_T}$ac_res" >&6; } |
| | | 9087 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
| | | 9088 | cat >>confdefs.h <<_ACEOF |
| | | 9089 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| | | 9090 | _ACEOF |
| | | 9091 | |
| | | 9092 | fi |
| | | 9093 | done |
| | | 9094 | |
| | | 9095 | if test "x$ac_cv_func_fork" = xyes; then |
| | | 9096 | { echo "$as_me:$LINENO: checking for working fork" >&5 |
| | | 9097 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } |
| | | 9098 | if test "${ac_cv_func_fork_works+set}" = set; then |
| | | 9099 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 9100 | else |
| | | 9101 | if test "$cross_compiling" = yes; then |
| | | 9102 | ac_cv_func_fork_works=cross |
| | | 9103 | else |
| | | 9104 | cat >conftest.$ac_ext <<_ACEOF |
| | | 9105 | /* confdefs.h. */ |
| | | 9106 | _ACEOF |
| | | 9107 | cat confdefs.h >>conftest.$ac_ext |
| | | 9108 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 9109 | /* end confdefs.h. */ |
| | | 9110 | $ac_includes_default |
| | | 9111 | int |
| | | 9112 | main () |
| | | 9113 | { |
| | | 9114 | |
| | | 9115 | /* By Ruediger Kuhlmann. */ |
| | | 9116 | return fork () < 0; |
| | | 9117 | |
| | | 9118 | ; |
| | | 9119 | return 0; |
| | | 9120 | } |
| | | 9121 | _ACEOF |
| | | 9122 | rm -f conftest$ac_exeext |
| | | 9123 | if { (ac_try="$ac_link" |
| | | 9124 | case "(($ac_try" in |
| | | 9125 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 9126 | *) ac_try_echo=$ac_try;; |
| | | 9127 | esac |
| | | 9128 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 9129 | (eval "$ac_link") 2>&5 |
| | | 9130 | ac_status=$? |
| | | 9131 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 9132 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
| | | 9133 | { (case "(($ac_try" in |
| | | 9134 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 9135 | *) ac_try_echo=$ac_try;; |
| | | 9136 | esac |
| | | 9137 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 9138 | (eval "$ac_try") 2>&5 |
| | | 9139 | ac_status=$? |
| | | 9140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 9141 | (exit $ac_status); }; }; then |
| | | 9142 | ac_cv_func_fork_works=yes |
| | | 9143 | else |
| | | 9144 | echo "$as_me: program exited with status $ac_status" >&5 |
| | | 9145 | echo "$as_me: failed program was:" >&5 |
| | | 9146 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 9147 | |
| | | 9148 | ( exit $ac_status ) |
| | | 9149 | ac_cv_func_fork_works=no |
| | | 9150 | fi |
| | | 9151 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
| | | 9152 | fi |
| | | 9153 | |
| | | 9154 | |
| | | 9155 | fi |
| | | 9156 | { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 |
| | | 9157 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } |
| | | 9158 | |
| | | 9159 | else |
| | | 9160 | ac_cv_func_fork_works=$ac_cv_func_fork |
| | | 9161 | fi |
| | | 9162 | if test "x$ac_cv_func_fork_works" = xcross; then |
| | | 9163 | case $host in |
| | | 9164 | *-*-amigaos* | *-*-msdosdjgpp*) |
| | | 9165 | # Override, as these systems have only a dummy fork() stub |
| | | 9166 | ac_cv_func_fork_works=no |
| | | 9167 | ;; |
| | | 9168 | *) |
| | | 9169 | ac_cv_func_fork_works=yes |
| | | 9170 | ;; |
| | | 9171 | esac |
| | | 9172 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
| | | 9173 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} |
| | | 9174 | fi |
| | | 9175 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
| | | 9176 | if test "x$ac_cv_func_vfork" = xyes; then |
| | | 9177 | { echo "$as_me:$LINENO: checking for working vfork" >&5 |
| | | 9178 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } |
| | | 9179 | if test "${ac_cv_func_vfork_works+set}" = set; then |
| | | 9180 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
| | | 9181 | else |
| | | 9182 | if test "$cross_compiling" = yes; then |
| | | 9183 | ac_cv_func_vfork_works=cross |
| | | 9184 | else |
| | | 9185 | cat >conftest.$ac_ext <<_ACEOF |
| | | 9186 | /* confdefs.h. */ |
| | | 9187 | _ACEOF |
| | | 9188 | cat confdefs.h >>conftest.$ac_ext |
| | | 9189 | cat >>conftest.$ac_ext <<_ACEOF |
| | | 9190 | /* end confdefs.h. */ |
| | | 9191 | /* Thanks to Paul Eggert for this test. */ |
| | | 9192 | $ac_includes_default |
| | | 9193 | #include <sys/wait.h> |
| | | 9194 | #ifdef HAVE_VFORK_H |
| | | 9195 | # include <vfork.h> |
| | | 9196 | #endif |
| | | 9197 | /* On some sparc systems, changes by the child to local and incoming |
| | | 9198 | argument registers are propagated back to the parent. The compiler |
| | | 9199 | is told about this with #include <vfork.h>, but some compilers |
| | | 9200 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a |
| | | 9201 | static variable whose address is put into a register that is |
| | | 9202 | clobbered by the vfork. */ |
| | | 9203 | static void |
| | | 9204 | #ifdef __cplusplus |
| | | 9205 | sparc_address_test (int arg) |
| | | 9206 | # else |
| | | 9207 | sparc_address_test (arg) int arg; |
| | | 9208 | #endif |
| | | 9209 | { |
| | | 9210 | static pid_t child; |
| | | 9211 | if (!child) { |
| | | 9212 | child = vfork (); |
| | | 9213 | if (child < 0) { |
| | | 9214 | perror ("vfork"); |
| | | 9215 | _exit(2); |
| | | 9216 | } |
| | | 9217 | if (!child) { |
| | | 9218 | arg = getpid(); |
| | | 9219 | write(-1, "", 0); |
| | | 9220 | _exit (arg); |
| | | 9221 | } |
| | | 9222 | } |
| | | 9223 | } |
| | | 9224 | |
| | | 9225 | int |
| | | 9226 | main () |
| | | 9227 | { |
| | | 9228 | pid_t parent = getpid (); |
| | | 9229 | pid_t child; |
| | | 9230 | |
| | | 9231 | sparc_address_test (0); |
| | | 9232 | |
| | | 9233 | child = vfork (); |
| | | 9234 | |
| | | 9235 | if (child == 0) { |
| | | 9236 | /* Here is another test for sparc vfork register problems. This |
| | | 9237 | test uses lots of local variables, at least as many local |
| | | 9238 | variables as main has allocated so far including compiler |
| | | 9239 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris |
| | | 9240 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should |
| | | 9241 | reuse the register of parent for one of the local variables, |
| | | 9242 | since it will think that parent can't possibly be used any more |
| | | 9243 | in this routine. Assigning to the local variable will thus |
| | | 9244 | munge parent in the parent process. */ |
| | | 9245 | pid_t |
| | | 9246 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), |
| | | 9247 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); |
| | | 9248 | /* Convince the compiler that p..p7 are live; otherwise, it might |
| | | 9249 | use the same hardware register for all 8 local variables. */ |
| | | 9250 | if (p != p1 || p != p2 || p != p3 || p != p4 |
| | | 9251 | || p != p5 || p != p6 || p != p7) |
| | | 9252 | _exit(1); |
| | | 9253 | |
| | | 9254 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
| | | 9255 | from child file descriptors. If the child closes a descriptor |
| | | 9256 | before it execs or exits, this munges the parent's descriptor |
| | | 9257 | as well. Test for this by closing stdout in the child. */ |
| | | 9258 | _exit(close(fileno(stdout)) != 0); |
| | | 9259 | } else { |
| | | 9260 | int status; |
| | | 9261 | struct stat st; |
| | | 9262 | |
| | | 9263 | while (wait(&status) != child) |
| | | 9264 | ; |
| | | 9265 | return ( |
| | | 9266 | /* Was there some problem with vforking? */ |
| | | 9267 | child < 0 |
| | | 9268 | |
| | | 9269 | /* Did the child fail? (This shouldn't happen.) */ |
| | | 9270 | || status |
| | | 9271 | |
| | | 9272 | /* Did the vfork/compiler bug occur? */ |
| | | 9273 | || parent != getpid() |
| | | 9274 | |
| | | 9275 | /* Did the file descriptor bug occur? */ |
| | | 9276 | || fstat(fileno(stdout), &st) != 0 |
| | | 9277 | ); |
| | | 9278 | } |
| | | 9279 | } |
| | | 9280 | _ACEOF |
| | | 9281 | rm -f conftest$ac_exeext |
| | | 9282 | if { (ac_try="$ac_link" |
| | | 9283 | case "(($ac_try" in |
| | | 9284 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 9285 | *) ac_try_echo=$ac_try;; |
| | | 9286 | esac |
| | | 9287 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 9288 | (eval "$ac_link") 2>&5 |
| | | 9289 | ac_status=$? |
| | | 9290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 9291 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
| | | 9292 | { (case "(($ac_try" in |
| | | 9293 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| | | 9294 | *) ac_try_echo=$ac_try;; |
| | | 9295 | esac |
| | | 9296 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| | | 9297 | (eval "$ac_try") 2>&5 |
| | | 9298 | ac_status=$? |
| | | 9299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| | | 9300 | (exit $ac_status); }; }; then |
| | | 9301 | ac_cv_func_vfork_works=yes |
| | | 9302 | else |
| | | 9303 | echo "$as_me: program exited with status $ac_status" >&5 |
| | | 9304 | echo "$as_me: failed program was:" >&5 |
| | | 9305 | sed 's/^/| /' conftest.$ac_ext >&5 |
| | | 9306 | |
| | | 9307 | ( exit $ac_status ) |
| | | 9308 | ac_cv_func_vfork_works=no |
| | | 9309 | fi |
| | | 9310 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
| | | 9311 | fi |
| | | 9312 | |
| | | 9313 | |
| | | 9314 | fi |
| | | 9315 | { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
| | | 9316 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } |
| | | 9317 | |
| | | 9318 | fi; |
| | | 9319 | if test "x$ac_cv_func_fork_works" = xcross; then |
| | | 9320 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
| | | 9321 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
| | | 9322 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} |
| | | 9323 | fi |
| | | 9324 | |
| | | 9325 | if test "x$ac_cv_func_vfork_works" = xyes; then |
| | | 9326 | |
| | | 9327 | cat >>confdefs.h <<\_ACEOF |
| | | 9328 | #define HAVE_WORKING_VFORK 1 |
| | | 9329 | _ACEOF |
| | | 9330 | |
| | | 9331 | else |
| | | 9332 | |
| | | 9333 | cat >>confdefs.h <<\_ACEOF |
| | | 9334 | #define vfork fork |
| | | 9335 | _ACEOF |
| | | 9336 | |
| | | 9337 | fi |
| | | 9338 | if test "x$ac_cv_func_fork_works" = xyes; then |
| | | 9339 | |
| | | 9340 | cat >>confdefs.h <<\_ACEOF |
| | | 9341 | #define HAVE_WORKING_FORK 1 |
| | | 9342 | _ACEOF |
| | | 9343 | |
| | | 9344 | fi |
| | | 9345 | |
8792 | | | 9346 | |
8793 | for ac_func in vprintf | | 9347 | for ac_func in vprintf |
8794 | do | | 9348 | do |
8795 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | | 9349 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
8796 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 | | 9350 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
8797 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } | | 9351 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } |
8798 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then | | 9352 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then |
8799 | echo $ECHO_N "(cached) $ECHO_C" >&6 | | 9353 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
8800 | else | | 9354 | else |
8801 | cat >conftest.$ac_ext <<_ACEOF | | 9355 | cat >conftest.$ac_ext <<_ACEOF |
8802 | /* confdefs.h. */ | | 9356 | /* confdefs.h. */ |
8803 | _ACEOF | | 9357 | _ACEOF |
8804 | cat confdefs.h >>conftest.$ac_ext | | 9358 | cat confdefs.h >>conftest.$ac_ext |