Skip to content

Commit 171e0c2

Browse files
committed
Changes to configure/config.h.in to check for:
sigprocmask, setsid and waitpid Especially for nextstep systems Awaiting for a context diff from Gregor to complete changes for the nextstep port
1 parent ad6bfe6 commit 171e0c2

File tree

3 files changed

+83
-18
lines changed

3 files changed

+83
-18
lines changed

src/configure

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,13 +2950,68 @@ else
29502950
fi
29512951
done
29522952

2953+
for ac_func in sigprocmask waitpid setsid
2954+
do
2955+
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2956+
echo "configure:2957: checking for $ac_func" >&5
2957+
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2958+
echo $ac_n "(cached) $ac_c" 1>&6
2959+
else
2960+
cat > conftest.$ac_ext <<EOF
2961+
#line 2962 "configure"
2962+
#include "confdefs.h"
2963+
/* System header to define __stub macros and hopefully few prototypes,
2964+
which can conflict with char $ac_func(); below. */
2965+
#include <assert.h>
2966+
/* Override any gcc2 internal prototype to avoid an error. */
2967+
/* We use char because int might match the return type of a gcc2
2968+
builtin and then its argument prototype would still apply. */
2969+
char $ac_func();
2970+
2971+
int main() {
2972+
2973+
/* The GNU C library defines this for functions which it implements
2974+
to always fail with ENOSYS. Some functions are actually named
2975+
something starting with __ and the normal name is an alias. */
2976+
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2977+
choke me
2978+
#else
2979+
$ac_func();
2980+
#endif
2981+
2982+
; return 0; }
2983+
EOF
2984+
if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2985+
rm -rf conftest*
2986+
eval "ac_cv_func_$ac_func=yes"
2987+
else
2988+
echo "configure: failed program was:" >&5
2989+
cat conftest.$ac_ext >&5
2990+
rm -rf conftest*
2991+
eval "ac_cv_func_$ac_func=no"
2992+
fi
2993+
rm -f conftest*
2994+
fi
2995+
2996+
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2997+
echo "$ac_t""yes" 1>&6
2998+
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2999+
cat >> confdefs.h <<EOF
3000+
#define $ac_tr_func 1
3001+
EOF
3002+
3003+
else
3004+
echo "$ac_t""no" 1>&6
3005+
fi
3006+
done
3007+
29533008
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
2954-
echo "configure:2955: checking for inet_aton" >&5
3009+
echo "configure:3010: checking for inet_aton" >&5
29553010
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
29563011
echo $ac_n "(cached) $ac_c" 1>&6
29573012
else
29583013
cat > conftest.$ac_ext <<EOF
2959-
#line 2960 "configure"
3014+
#line 3015 "configure"
29603015
#include "confdefs.h"
29613016
/* System header to define __stub macros and hopefully few prototypes,
29623017
which can conflict with char inet_aton(); below. */
@@ -2979,7 +3034,7 @@ inet_aton();
29793034
29803035
; return 0; }
29813036
EOF
2982-
if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3037+
if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
29833038
rm -rf conftest*
29843039
eval "ac_cv_func_inet_aton=yes"
29853040
else
@@ -3003,12 +3058,12 @@ INET_ATON='inet_aton.o'
30033058
fi
30043059

30053060
echo $ac_n "checking for strdup""... $ac_c" 1>&6
3006-
echo "configure:3007: checking for strdup" >&5
3061+
echo "configure:3062: checking for strdup" >&5
30073062
if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
30083063
echo $ac_n "(cached) $ac_c" 1>&6
30093064
else
30103065
cat > conftest.$ac_ext <<EOF
3011-
#line 3012 "configure"
3066+
#line 3067 "configure"
30123067
#include "confdefs.h"
30133068
/* System header to define __stub macros and hopefully few prototypes,
30143069
which can conflict with char strdup(); below. */
@@ -3031,7 +3086,7 @@ strdup();
30313086
30323087
; return 0; }
30333088
EOF
3034-
if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3089+
if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
30353090
rm -rf conftest*
30363091
eval "ac_cv_func_strdup=yes"
30373092
else
@@ -3053,12 +3108,12 @@ fi
30533108

30543109

30553110
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
3056-
echo "configure:3057: checking for cbrt" >&5
3111+
echo "configure:3112: checking for cbrt" >&5
30573112
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
30583113
echo $ac_n "(cached) $ac_c" 1>&6
30593114
else
30603115
cat > conftest.$ac_ext <<EOF
3061-
#line 3062 "configure"
3116+
#line 3117 "configure"
30623117
#include "confdefs.h"
30633118
/* System header to define __stub macros and hopefully few prototypes,
30643119
which can conflict with char cbrt(); below. */
@@ -3081,7 +3136,7 @@ cbrt();
30813136
30823137
; return 0; }
30833138
EOF
3084-
if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3139+
if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
30853140
rm -rf conftest*
30863141
eval "ac_cv_func_cbrt=yes"
30873142
else
@@ -3102,15 +3157,15 @@ EOF
31023157
else
31033158
echo "$ac_t""no" 1>&6
31043159
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
3105-
echo "configure:3106: checking for cbrt in -lm" >&5
3160+
echo "configure:3161: checking for cbrt in -lm" >&5
31063161
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
31073162
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
31083163
echo $ac_n "(cached) $ac_c" 1>&6
31093164
else
31103165
ac_save_LIBS="$LIBS"
31113166
LIBS="-lm $LIBS"
31123167
cat > conftest.$ac_ext <<EOF
3113-
#line 3114 "configure"
3168+
#line 3169 "configure"
31143169
#include "confdefs.h"
31153170
/* Override any gcc2 internal prototype to avoid an error. */
31163171
/* We use char because int might match the return type of a gcc2
@@ -3121,7 +3176,7 @@ int main() {
31213176
cbrt()
31223177
; return 0; }
31233178
EOF
3124-
if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3179+
if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
31253180
rm -rf conftest*
31263181
eval "ac_cv_lib_$ac_lib_var=yes"
31273182
else
@@ -3147,12 +3202,12 @@ fi
31473202
fi
31483203

31493204
echo $ac_n "checking for rint""... $ac_c" 1>&6
3150-
echo "configure:3151: checking for rint" >&5
3205+
echo "configure:3206: checking for rint" >&5
31513206
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
31523207
echo $ac_n "(cached) $ac_c" 1>&6
31533208
else
31543209
cat > conftest.$ac_ext <<EOF
3155-
#line 3156 "configure"
3210+
#line 3211 "configure"
31563211
#include "confdefs.h"
31573212
/* System header to define __stub macros and hopefully few prototypes,
31583213
which can conflict with char rint(); below. */
@@ -3175,7 +3230,7 @@ rint();
31753230
31763231
; return 0; }
31773232
EOF
3178-
if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3233+
if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
31793234
rm -rf conftest*
31803235
eval "ac_cv_func_rint=yes"
31813236
else
@@ -3196,15 +3251,15 @@ EOF
31963251
else
31973252
echo "$ac_t""no" 1>&6
31983253
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
3199-
echo "configure:3200: checking for rint in -lm" >&5
3254+
echo "configure:3255: checking for rint in -lm" >&5
32003255
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
32013256
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
32023257
echo $ac_n "(cached) $ac_c" 1>&6
32033258
else
32043259
ac_save_LIBS="$LIBS"
32053260
LIBS="-lm $LIBS"
32063261
cat > conftest.$ac_ext <<EOF
3207-
#line 3208 "configure"
3262+
#line 3263 "configure"
32083263
#include "confdefs.h"
32093264
/* Override any gcc2 internal prototype to avoid an error. */
32103265
/* We use char because int might match the return type of a gcc2
@@ -3215,7 +3270,7 @@ int main() {
32153270
rint()
32163271
; return 0; }
32173272
EOF
3218-
if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3273+
if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
32193274
rm -rf conftest*
32203275
eval "ac_cv_lib_$ac_lib_var=yes"
32213276
else

src/configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ AC_FUNC_MEMCMP
155155
AC_TYPE_SIGNAL
156156
AC_FUNC_VPRINTF
157157
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
158+
AC_CHECK_FUNCS(sigprocmask waitpid setsid)
158159
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
159160
AC_CHECK_FUNC(strdup, STRDUP='../../utils/strdup.o')
160161
AC_SUBST(INET_ATON)

src/include/config.h.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@
7171
/* Set to 1 if you have getrusage() */
7272
#undef HAVE_GETRUSAGE
7373

74+
/* Set to 1 if you have waitpid() */
75+
#undef HAVE_WAITPID
76+
77+
/* Set to 1 if you have setsid() */
78+
#undef HAVE_SETSID
79+
80+
/* Set to 1 if you have sigprocmask() */
81+
#undef HAVE_SIGPROCMASK
82+
7483
/* Set to 1 if you have libreadline.a */
7584
#undef HAVE_LIBREADLINE
7685

0 commit comments

Comments
 (0)