* acinclude.m4 (GUILE_NAMED_CHECK_FUNC): New macro: Tagged test,

so that test for the same function can be performed multiple
times.

* configure.in (AC_CHECK_HEADERS): Test for rxposix.h,
rx/rxposix.h.  Add library rx only if regcomp can't be found
without it.
This commit is contained in:
Mikael Djurfeldt 1997-08-24 18:16:25 +00:00
commit 0b89e78ee7
5 changed files with 194 additions and 104 deletions

View file

@ -1,5 +1,9 @@
Sun Aug 24 15:51:12 1997 Mikael Djurfeldt <mdj@kenneth>
* acinclude.m4 (GUILE_NAMED_CHECK_FUNC): New macro: Tagged test,
so that test for the same function can be performed multiple
times.
* configure.in (AC_CHECK_HEADERS): Test for rxposix.h,
rx/rxposix.h. Add library rx only if regcomp can't be found
without it.

View file

@ -57,3 +57,48 @@ AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
fi
]
)
dnl This is needed when we want to check for the same function repeatedly
dnl with other parameters, such as libraries, varying.
dnl
dnl GUILE_NAMED_CHECK_FUNC(FUNCTION, TESTNAME,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(GUILE_NAMED_CHECK_FUNC,
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(ac_cv_func_$1_$2,
[AC_TRY_LINK(
dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
dnl which includes <sys/select.h> which contains a prototype for
dnl select. Similarly for bzero.
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $1();
], [
/* 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_$1) || defined (__stub___$1)
choke me
#else
$1();
#endif
], eval "ac_cv_func_$1_$2=yes", eval "ac_cv_func_$1_$2=no")])
if eval "test \"`echo '$ac_cv_func_'$1'_'$2`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$3], , :, [$3])
else
AC_MSG_RESULT(no)
ifelse([$4], , , [$4
])dnl
fi
])

45
aclocal.m4 vendored
View file

@ -60,6 +60,51 @@ AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
]
)
dnl This is needed when we want to check for the same function repeatedly
dnl with other parameters, such as libraries, varying.
dnl
dnl GUILE_NAMED_CHECK_FUNC(FUNCTION, TESTNAME,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(GUILE_NAMED_CHECK_FUNC,
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(ac_cv_func_$1_$2,
[AC_TRY_LINK(
dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
dnl which includes <sys/select.h> which contains a prototype for
dnl select. Similarly for bzero.
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $1();
], [
/* 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_$1) || defined (__stub___$1)
choke me
#else
$1();
#endif
], eval "ac_cv_func_$1_$2=yes", eval "ac_cv_func_$1_$2=no")])
if eval "test \"`echo '$ac_cv_func_'$1'_'$2`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$3], , :, [$3])
else
AC_MSG_RESULT(no)
ifelse([$4], , , [$4
])dnl
fi
])
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.

190
configure vendored
View file

@ -2672,14 +2672,13 @@ fi
if test "$ac_cv_header_regex_h" = yes ||
test "$ac_cv_header_rxposix_h" = yes ||
test "$ac_cv_header_rx_rxposix_h" = yes; then
ac_cv_func_regcomp=
echo $ac_n "checking for regcomp""... $ac_c" 1>&6
echo "configure:2678: checking for regcomp" >&5
if eval "test \"`echo '$''{'ac_cv_func_regcomp'+set}'`\" = set"; then
echo "configure:2677: checking for regcomp" >&5
if eval "test \"`echo '$''{'ac_cv_func_regcomp_norx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2683 "configure"
#line 2682 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char regcomp(); below. */
@ -2702,28 +2701,25 @@ regcomp();
; return 0; }
EOF
if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_regcomp=yes"
eval "ac_cv_func_regcomp_norx=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_regcomp=no"
eval "ac_cv_func_regcomp_norx=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
if eval "test \"`echo '$ac_cv_func_'regcomp'_'norx`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBOBJS="regex-posix.o $LIBOBJS"
else
echo "$ac_t""no" 1>&6
fi
if test "$ac_cv_func_regcomp" != yes; then
echo $ac_n "checking for main in -lrx""... $ac_c" 1>&6
echo "configure:2727: checking for main in -lrx" >&5
echo $ac_n "checking for main in -lrx""... $ac_c" 1>&6
echo "configure:2723: checking for main in -lrx" >&5
ac_lib_var=`echo rx'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2731,14 +2727,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2735 "configure"
#line 2731 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2765,14 +2761,13 @@ else
echo "$ac_t""no" 1>&6
fi
ac_cv_func_regcomp=
echo $ac_n "checking for regcomp""... $ac_c" 1>&6
echo "configure:2771: checking for regcomp" >&5
if eval "test \"`echo '$''{'ac_cv_func_regcomp'+set}'`\" = set"; then
echo $ac_n "checking for regcomp""... $ac_c" 1>&6
echo "configure:2766: checking for regcomp" >&5
if eval "test \"`echo '$''{'ac_cv_func_regcomp_rx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2776 "configure"
#line 2771 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char regcomp(); below. */
@ -2795,27 +2790,30 @@ regcomp();
; return 0; }
EOF
if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_regcomp=yes"
eval "ac_cv_func_regcomp_rx=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_regcomp=no"
eval "ac_cv_func_regcomp_rx=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
if eval "test \"`echo '$ac_cv_func_'regcomp'_'rx`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBOBJS="regex-posix.o $LIBOBJS"
else
echo "$ac_t""no" 1>&6
fi
fi
if test "$ac_cv_func_regcomp" = yes; then
fi
if test "$ac_cv_func_regcomp_norx" = yes ||
test "$ac_cv_func_regcomp_rx" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_REGCOMP 1
EOF
@ -2826,12 +2824,12 @@ fi
for ac_func in inet_aton putenv strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2830: checking for $ac_func" >&5
echo "configure:2828: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2835 "configure"
#line 2833 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2854,7 +2852,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2887,19 +2885,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:2891: checking for working alloca.h" >&5
echo "configure:2889: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2896 "configure"
#line 2894 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@ -2920,12 +2918,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:2924: checking for alloca" >&5
echo "configure:2922: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2929 "configure"
#line 2927 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@ -2948,7 +2946,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@ -2980,12 +2978,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:2984: checking whether alloca needs Cray hooks" >&5
echo "configure:2982: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2989 "configure"
#line 2987 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@ -3010,12 +3008,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3014: checking for $ac_func" >&5
echo "configure:3012: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3019 "configure"
#line 3017 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3038,7 +3036,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3065,7 +3063,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:3069: checking stack direction for C alloca" >&5
echo "configure:3067: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3073,7 +3071,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 3077 "configure"
#line 3075 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@ -3092,7 +3090,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@ -3116,12 +3114,12 @@ fi
if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
echo "configure:3120: checking for st_rdev in struct stat" >&5
echo "configure:3118: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3125 "configure"
#line 3123 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -3129,7 +3127,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@ -3150,12 +3148,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:3154: checking for st_blksize in struct stat" >&5
echo "configure:3152: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3159 "configure"
#line 3157 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -3163,7 +3161,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:3167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@ -3187,12 +3185,12 @@ fi
# We could use AC_STRUCT_ST_BLOCKS here, but that adds fileblocks.o to
# LIBOBJS, which we don't need. This seems more direct.
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
echo "configure:3191: checking for st_blocks in struct stat" >&5
echo "configure:3189: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3196 "configure"
#line 3194 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -3200,7 +3198,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
if { (eval echo configure:3204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@ -3221,12 +3219,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:3225: checking whether struct tm is in sys/time.h or time.h" >&5
echo "configure:3223: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3230 "configure"
#line 3228 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@ -3234,7 +3232,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@ -3255,12 +3253,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
echo "configure:3259: checking for tm_zone in struct tm" >&5
echo "configure:3257: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3264 "configure"
#line 3262 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@ -3268,7 +3266,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@ -3288,12 +3286,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
echo "configure:3292: checking for tzname" >&5
echo "configure:3290: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3297 "configure"
#line 3295 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@ -3303,7 +3301,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@ -3326,12 +3324,12 @@ fi
echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
echo "configure:3330: checking whether we need POSIX to get struct utimbuf" >&5
echo "configure:3328: checking whether we need POSIX to get struct utimbuf" >&5
if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3335 "configure"
#line 3333 "configure"
#include "confdefs.h"
#ifdef __EMX__
@ -3343,7 +3341,7 @@ struct utime blah;
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3376,13 +3374,13 @@ if test "$cross_compiling" = yes; then
echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
else
cat > conftest.$ac_ext <<EOF
#line 3380 "configure"
#line 3378 "configure"
#include "confdefs.h"
aux (l) unsigned long l;
{ int x; exit (l >= ((unsigned long)&x)); }
main () { int q; aux((unsigned long)&q); }
EOF
if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define SCM_STACK_GROWS_UP 1
@ -3405,11 +3403,11 @@ EOF
echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
else
cat > conftest.$ac_ext <<EOF
#line 3409 "configure"
#line 3407 "configure"
#include "confdefs.h"
main () { exit (sizeof(float) != sizeof(long)); }
EOF
if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define SCM_SINGLES 1
@ -3424,12 +3422,12 @@ fi
echo $ac_n "checking for struct linger""... $ac_c" 1>&6
echo "configure:3428: checking for struct linger" >&5
echo "configure:3426: checking for struct linger" >&5
if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3433 "configure"
#line 3431 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3438,7 +3436,7 @@ int main() {
struct linger lgr; lgr.l_linger = 100
; return 0; }
EOF
if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_linger="yes"
else
@ -3465,19 +3463,19 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6
echo "configure:3469: checking how to set a stream file descriptor" >&5
echo "configure:3467: checking how to set a stream file descriptor" >&5
if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3474 "configure"
#line 3472 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
stdout->_file = 1
; return 0; }
EOF
if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_fd_setter="_file"
else
@ -3485,14 +3483,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 3489 "configure"
#line 3487 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
stdout->_fileno = 1
; return 0; }
EOF
if { (eval echo configure:3496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_fd_setter="_fileno"
else
@ -3530,19 +3528,19 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
echo "configure:3534: checking how to get buffer char count from FILE structure" >&5
echo "configure:3532: checking how to get buffer char count from FILE structure" >&5
if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3539 "configure"
#line 3537 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0
; return 0; }
EOF
if { (eval echo configure:3546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_cnt"
else
@ -3550,14 +3548,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 3554 "configure"
#line 3552 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0
; return 0; }
EOF
if { (eval echo configure:3561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_r"
else
@ -3565,14 +3563,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 3569 "configure"
#line 3567 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0
; return 0; }
EOF
if { (eval echo configure:3576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="readCount"
else
@ -3599,14 +3597,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3603 "configure"
#line 3601 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_gptr = f->egptr;
; return 0; }
EOF
if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_gptr=1
else
@ -3629,14 +3627,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3633 "configure"
#line 3631 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
; return 0; }
EOF
if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_readptr=1
else
@ -3666,7 +3664,7 @@ fi
echo $ac_n "checking "threads package type"""... $ac_c" 1>&6
echo "configure:3670: checking "threads package type"" >&5
echo "configure:3668: checking "threads package type"" >&5
if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3725,7 +3723,7 @@ if test "$use_threads" != no; then
LDFLAGS="-L$use_threads/lib"
LIBS="-lgthreads -lmalloc"
cat > conftest.$ac_ext <<EOF
#line 3729 "configure"
#line 3727 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@ -3734,7 +3732,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=FSU
else
@ -3746,7 +3744,7 @@ rm -f conftest*
if test "$threads_package" = unknown; then
LIBS="-lpthread"
cat > conftest.$ac_ext <<EOF
#line 3750 "configure"
#line 3748 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@ -3755,7 +3753,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=MIT
else
@ -3767,7 +3765,7 @@ rm -f conftest*
if test "$threads_package" = unknown; then
LIBS="-lpthreads"
cat > conftest.$ac_ext <<EOF
#line 3771 "configure"
#line 3769 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@ -3776,7 +3774,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=PCthreads
else
@ -3856,7 +3854,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3860: checking for $ac_word" >&5
echo "configure:3858: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3915,7 +3913,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:3919: checking host system type" >&5
echo "configure:3917: checking host system type" >&5
host_alias=$host
case "$host_alias" in

View file

@ -139,16 +139,14 @@ fi
if test "$ac_cv_header_regex_h" = yes ||
test "$ac_cv_header_rxposix_h" = yes ||
test "$ac_cv_header_rx_rxposix_h" = yes; then
ac_cv_func_regcomp=
AC_CHECK_FUNC(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"])
if test "$ac_cv_func_regcomp" != yes; then
AC_CHECK_LIB(rx, main)
ac_cv_func_regcomp=
AC_CHECK_FUNC(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"])
fi
GUILE_NAMED_CHECK_FUNC(regcomp, norx, [LIBOBJS="regex-posix.o $LIBOBJS"],
[AC_CHECK_LIB(rx, main)
GUILE_NAMED_CHECK_FUNC(regcomp, rx, [LIBOBJS="regex-posix.o $LIBOBJS"])]
)
dnl The following should not be necessary, but for some reason
dnl autoheader misses it if we don't include it!
if test "$ac_cv_func_regcomp" = yes; then
if test "$ac_cv_func_regcomp_norx" = yes ||
test "$ac_cv_func_regcomp_rx" = yes; then
AC_DEFINE(HAVE_REGCOMP)
fi
fi