pike.git / src / configure.in

version» Context lines:

pike.git/src/configure.in:2552:    has_it="yes"    break    fi    done    IFS="$ac_save_ifs"       if test "$has_it" = "yes"; then   cat >conftest.y<<\EOF   %pure_parser   %{ + #include <stdlib.h>   void parse();   void yyerror(char *);   %}   %%   all: foo bar   foo: 'f' 'o' 'o' { parse(); } ;   bar: 'b' 'a' 'r' ;   %%   int context;   
pike.git/src/configure.in:2665:    case 2: return 'o';    default: return 0;    }   }      int errors=0;   void yyerror(char *fel) { errors++; }   EOF    if $YACC -d conftest.y 1>&AC_FD_CC 2>&AC_FD_CC; then    AC_TRY_COMPILE([ + #include <stdlib.h>   #include "y.tab.c"   ],[   yyparse();   exit(errors);   ],ok=yes,ok=no)    if test "$ok" = "yes"; then    pike_cv_short_use=$short_use    break    fi    fi
pike.git/src/configure.in:2726:   foo: 'f' 'o' 'o' { fprintf(stderr, "foo\\n"); } ;   bar: 'b' 'a' 'r' ;   %%   int yylex(void *yylval) { return 'f'; }   void yyerror(char *err) { fprintf(stderr, "ERR: %s\\n", err); }   EOF    echo conftest.y: 1>&AC_FD_CC    cat conftest.y 1>&AC_FD_CC    if $YACC -d conftest.y 1>&AC_FD_CC 2>&AC_FD_CC; then    AC_TRY_LINK([ + #include <stdlib.h>   #include "y.tab.c"    ], [    yyparse();    exit(0);    ], [    pike_cv___yy_memcpy_count_type=$count_type    pike_cv___yy_memcpy_from_const="$from_const"    break    ])    fi
pike.git/src/configure.in:3552:    pthread_cond_reltimedwait_np pthread_mach_thread_np)       AC_MSG_CHECKING(posix threads)       AC_CACHE_VAL(pike_cv_posix_threads, [    AC_TRY_RUN([   #define _REENTRANT   #define _THREAD_SAFE   #define _MIT_POSIX_THREADS 1    + #include <stdlib.h>   #include <pthread.h>      void *foo(void *bar) { pthread_exit(0); return 0; }   pthread_mutexattr_t attr;   pthread_mutex_t tmp;   pthread_t gazonk;      int main()   {    void *sune;
pike.git/src/configure.in:3582:    pthread_create(&gazonk,0,foo,0);    pthread_join(gazonk,&sune);    exit(0);   }    ], [ pike_cv_posix_threads=yes ], [ pike_cv_posix_threads=no ], [    AC_TRY_LINK([   #define _REENTRANT   #define _THREAD_SAFE   #define _MIT_POSIX_THREADS 1    + #include <stdlib.h>   #include <pthread.h>      void *foo(void *bar) { pthread_exit(0); return 0; }   pthread_mutexattr_t attr;   pthread_mutex_t tmp;   pthread_t gazonk;       ], [   {    void *sune;
pike.git/src/configure.in:3795:    Linux*)    # Since 2.6 it is not actually very likely to be broken,    # since LinuxThreads is not used unless you patch the    # kernel source and build your own kernel.    AC_MSG_CHECKING([If threads are broken ...]);    AC_TRY_RUN([   #define _REENTRANT   #define _THREAD_SAFE   #define _MIT_POSIX_THREADS 1    + #include <stdlib.h>   #include <pthread.h>      void *foo(void *bar) { return (void *)getpid(); }   pthread_mutexattr_t attr;   pthread_mutex_t tmp;   pthread_t gazonk;      int main()   {    void *sune;
pike.git/src/configure.in:3871:    *)    LIBS="${LIBS} -lthread"    ;;    esac       AC_CACHE_VAL(pike_cv_unix_threads, [    AC_TRY_RUN([   #define _REENTRANT   #define _THREAD_SAFE   #define _MIT_POSIX_THREADS 1 + #include <stdlib.h>   #include <thread.h>   #ifdef _UNIXWARE_THREADS_   #include <synch.h>   #endif      void *foo(void *bar) { thr_exit(0); return 0; }   mutex_t tmp;   thread_t gazonk;      int main()
pike.git/src/configure.in:3944:   fi      if test "x$pike_cv_sys_os" = "xWindows_NT" -o "x$pike_cv_sys_os" = "xAmigaOS"; then :; else    AC_MSG_CHECKING(initial stack limit)    AC_CACHE_VAL(pike_cv_initial_stack_size,[    old_core_limit=`ulimit -c`    ulimit -Sc 0    rm -f confdefs.out.2 >/dev/null 2>&1 || :    AC_TRY_RUN([   #include <stdio.h> + #include <stdlib.h>       static int depth=0;    FILE *f;       void save_depth(void);       void use_stack(void *page)    {    void *X[8190];    X[0]=page;
pike.git/src/configure.in:4612:    fi   ])      fi      #############################################################################   # isfinite() is a macro on at least OS X and Linux which doesn't play well   # with AC_CHECK_FUNCS().   MY_CHECK_FUNCTION(isfinite,   [ + #include <stdlib.h>   #include <math.h>   ], [    int t = isfinite(0.0);    exit(0);   ])   #############################################################################      # FreeBSD 3.0 has broken F_SETFD when running with threads.      AC_MSG_CHECKING(whether F_SETFD exists and works)      AC_CACHE_VAL(pike_cv_broken_f_setfd, [    AC_TRY_RUN([   #include <sys/types.h>   #include <sys/stat.h>   #ifdef HAVE_FCNTL_H   #include <fcntl.h>   #endif /* HAVE_FCNTL_H */   #include <stdio.h> -  + #include <stdlib.h>   #ifndef FD_CLOEXEC   #define FD_CLOEXEC 1   #endif /* FD_CLOEXEC */   int main(int argc, char **argv)   {    int fd = 0;    if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) {    exit(1);    }    if (fcntl(fd, F_GETFD) != FD_CLOEXEC) {
pike.git/src/configure.in:5150:   fi            ########################################################################   AC_MSG_CHECKING(stack direction)   AC_CACHE_VAL(pike_cv_hardware_stack_direction,   [    AC_TRY_RUN([   #include <stdio.h> + #include <stdlib.h>   static int find_stack_direction(void *foo, int cnt)   {    if (cnt) return 1*find_stack_direction(foo, cnt>>1);    if (((void *)&foo) > foo) {    return 1;    } else {    return -1;    }   }   
pike.git/src/configure.in:5561:   }   ],[pike_cv_have_rdtsc=yes],[pike_cv_have_rdtsc=no],[pike_cv_have_rdtsc="possibly not"])])   AC_MSG_RESULT($pike_cv_have_rdtsc)   if test "$pike_cv_have_rdtsc" = yes; then    AC_DEFINE(HAVE_RDTSC)   fi      ########################################################################   MY_CHECK_FUNCTION(fork,   [ + #include <stdlib.h>   #include <sys/types.h>   #ifdef HAVE_UNISTD_H   #include <unistd.h>   #endif   ], [    exit(fork()==-1);   ])      ########################################################################   MY_CHECK_FUNCTION(fpsetmask,   [ -  + #include <stdlib.h>   #include <math.h>   #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif   ], [    fpsetmask(0);    exit(0);   ])   ########################################################################   MY_CHECK_FUNCTION(fpsetround,   [ -  + #include <stdlib.h>   #include <math.h>   #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif      #ifndef FP_RN   #define FP_RN 0   #endif /* FP_RN */   ], [    fpsetround(FP_RN);    exit(0);   ])   ########################################################################   MY_CHECK_FUNCTION(isless,   [ -  + #include <stdlib.h>   #include <math.h>   #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif      ], [    int t = isless(0.0, 0.0);    exit(0);   ])   ########################################################################   MY_CHECK_FUNCTION(isunordered,   [ -  + #include <stdlib.h>   #include <math.h>   #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif      ], [    int t = isunordered(0.0, 0.0);    exit(0);   ])      ########################################################################   MY_CHECK_FUNCTION(dlopen,   [ -  + #include <stdlib.h>   #include <dlfcn.h>   ], [    dlopen(0, 0);    exit(0);   ])      ########################################################################   MY_CHECK_FUNCTION(rint,   [ -  + #include <stdlib.h>   #include <math.h>   #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif /* HAVE_IEEEFP_H */   ], [   #ifdef HAVE_FPSETROUND
pike.git/src/configure.in:5672:    fpsetround(FP_RN);   #endif /* HAVE_FPSETROUND */    if(rint(0.1) != 0.0 ||    rint(0.6) != 1.0) exit(1);    exit(0);   ])      #############################################################################   MY_CHECK_FUNCTION(GetSystemTimeAsFileTime,   [ + #include <stdlib.h>   #ifdef HAVE_WINDOWS_H   #include <windows.h>   #endif   #ifdef HAVE_WINBASE_H   #include <winbase.h>   #endif   ], [    FILETIME f;    GetSystemTimeAsFileTime(&f);    exit(0);   ])   #############################################################################   MY_CHECK_FUNCTION(gethostname,   [ -  + #include <stdlib.h>   #ifdef HAVE_UNISTD_H   #include <unistd.h>   #endif   #ifdef HAVE_WINSOCK2_H   #include <winsock2.h>   #elif defined(HAVE_WINSOCK_H)   #include <winsock.h>   #endif   ], [    char buffer[10000];
pike.git/src/configure.in:5720:      AC_MSG_RESULT($pike_cv_declare_environ)   if test "x$pike_cv_declare_environ" = xyes ; then    AC_DEFINE(DECLARE_ENVIRON)   fi      #############################################################################      AC_MSG_CHECKING([for union wait (old BSD convention)])   AC_CACHE_VAL(pike_cv_union_wait, [ AC_TRY_COMPILE([ + #include <stdlib.h>   #ifdef HAVE_SYS_WAIT_H   #include <sys/wait.h>   #endif /* HAVE_SYS_WAIT_H */   ], [    union wait status;    exit(0);   ], pike_cv_union_wait=yes, pike_cv_union_wait=no)   ])      AC_MSG_RESULT($pike_cv_union_wait)
pike.git/src/configure.in:5753:    AC_DEFINE(HAVE_UNION_WAIT)    else :; fi   else :; fi      #############################################################################      AC_MSG_CHECKING(how to extract an unsigned char)   AC_CACHE_VAL(pike_cv_method_extract_uchar,   [   AC_TRY_RUN([ + #include <stdlib.h>   int main()   {    char i,*p;    i=-10;    p=&i;    if(*(unsigned char *)(p)!= 0x100 - 10) exit(1);    exit(0);   }   ],pike_cv_method_extract_uchar=by_cast,   pike_cv_method_extract_uchar=not_by_cast,
pike.git/src/configure.in:5778:   else    AC_MSG_RESULT(not by cast)   fi      ########################################################################      AC_MSG_CHECKING(how to extract a signed char)   AC_CACHE_VAL(pike_cv_method_extract_char,   [   AC_TRY_RUN([ + #include <stdlib.h>   int main()   {    char i,*p;    i=-10;    p=&i;    if(*(signed char *)(p)!= -10) exit(1);    exit(0);   }   ],pike_cv_method_extract_char=by_cast,   pike_cv_method_extract_char=not_by_cast,
pike.git/src/configure.in:5802:    AC_DEFINE(EXTRACT_CHAR_BY_CAST)   else    AC_MSG_RESULT(not by cast)   fi         AC_MSG_CHECKING(if float conversion can cause SIGFPE)   AC_CACHE_VAL(pike_cv_sys_idiot_sigfpe,   [    AC_TRY_RUN([ + #include <stdlib.h>   #include <math.h>      #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif   
pike.git/src/configure.in:5850:    fi    TEST_IGNORE_SIGFPE=yes       if test $IEEE_FLAG = yes; then    AC_MSG_CHECKING(if float conversion is still broken)    AC_CACHE_VAL(pike_cv_sys_idiot_sigfpe_with_ieee,   [    OLD_CFLAGS="$CFLAGS"    CFLAGS="$CFLAGS $OPTIMIZE"    AC_TRY_RUN([ + #include <stdlib.h>   #include <math.h>      #ifdef HAVE_FLOATINGPOINT_H   #include <floatingpoint.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif   
pike.git/src/configure.in:5896:    fi   fi # IEEE_FLAG      if test $TEST_IGNORE_SIGFPE = yes; then    AC_MSG_CHECKING(if ignoring SIGFPE helps)    AC_CACHE_VAL(pike_cv_sys_ignore_sigfpe,   [    OLD_CFLAGS="$CFLAGS"    CFLAGS="$CFLAGS $OPTIMIZE"   AC_TRY_RUN([ + #include <stdlib.h>   #include <signal.h>   #include <math.h>   int counter=0;   RETSIGTYPE func(void)   {    if(counter++>10) exit(7);    signal(SIGFPE,func);   }      float foo_float = 0.0;
pike.git/src/configure.in:5939:   fi   fi # TEST_IGNORE_SIGFPE      else    AC_MSG_RESULT(no)   fi # pike_cv_sys_idiot_sigfpe      #############################################################################      define(float_check, [[ + #include <stdlib.h>   #include <math.h>   #define TY $1   #define TEST_$1   #define TEST_$2   #define EXPECTED_SIZE_float 4   #define EXPECTED_SIZE_double 8   void check(TY n, char *pf, char *pd)   {    int i;    char *p, *p2 = (char*)&n;
pike.git/src/configure.in:6244:   #   # __func__ is new in ISO C 9x   #   # It should expand to the name of the current function, and is   # useful for debug.      AC_MSG_CHECKING(if __func__ exists and works)   AC_CACHE_VAL(pike_cv_have_working___func__,   [    AC_TRY_RUN([ + #include <stdlib.h>   #include <string.h>   int main()   {    exit(strcmp("main", __func__));   }    ], pike_cv_have_working___func__=yes, pike_cv_have_working___func__=no,    pike_cv_have_working___func__=no)   ])   AC_MSG_RESULT($pike_cv_have_working___func__)   if test "$pike_cv_have_working___func__" = yes; then    AC_DEFINE(HAVE_WORKING___FUNC__)   else :; fi      # gcc has __FUNCTION__ instead.      AC_MSG_CHECKING(if __FUNCTION__ exists and works)   AC_CACHE_VAL(pike_cv_have_working___FUNCTION__,   [    AC_TRY_RUN([ -  + #include <stdlib.h>   #include <string.h>   int main()   {    exit(strcmp("main", __FUNCTION__));   }    ], pike_cv_have_working___FUNCTION__=yes,    pike_cv_have_working___FUNCTION__=no,    pike_cv_have_working___FUNCTION__=no)   ])   AC_MSG_RESULT($pike_cv_have_working___FUNCTION__)
pike.git/src/configure.in:6293:    AC_DEFINE(PIKE_BYTECODE_METHOD, PIKE_BYTECODE_DEFAULT)    byte_code_format="virtual machine"   fi      #############################################################################      AC_MSG_CHECKING(for lc __declspec)   AC_CACHE_VAL(pike_cv_lc___declspec,   [    AC_TRY_RUN([ + #include <stdlib.h>   #include <stdarg.h>   __declspec(noreturn) void fatal(char *foo,...);      __declspec(noreturn) void fatal(char *foo,...)   {    va_list args;    va_start(foo,args);    printf(foo,args);    va_end(args);    exit(2);   }      int main() { exit(0); }       ], pike_cv_lc___declspec=yes, pike_cv_lc___declspec=no, [    echo $ac_n "crosscompiling... $ac_c" 1>&6    AC_TRY_LINK([ -  + #include <stdlib.h>   #include <stdarg.h>   __declspec(noreturn) void fatal(char *foo,...);      __declspec(noreturn) void fatal(char *foo,...)   {    va_list args;    va_start(foo,args);    printf(foo,args);    va_end(args);    exit(2);
pike.git/src/configure.in:6993:   ])    exit 1   fi      #############################################################################      AC_MSG_CHECKING(if gettimeofday takes two arguments)   AC_CACHE_VAL(pike_cv_func_gettimeofday_has_two_args,   [    AC_TRY_RUN([ + #include <stdlib.h>   #if TIME_WITH_SYS_TIME   # include <sys/time.h>   # include <time.h>   #else   # if HAVE_SYS_TIME_H   # include <sys/time.h>   # else   # include <time.h>   # endif   #endif
pike.git/src/configure.in:7021:      int main() {    struct timeval tv;    gettimeofday(&tv,(void *)0);    exit(0);   }    ], [ pike_cv_func_gettimeofday_has_two_args=yes    ], [ pike_cv_func_gettimeofday_has_two_args=no    ], [    AC_TRY_LINK([ + #include <stdlib.h>   #if TIME_WITH_SYS_TIME   # include <sys/time.h>   # include <time.h>   #else   # if HAVE_SYS_TIME_H   # include <sys/time.h>   # else   # include <time.h>   # endif   #endif
pike.git/src/configure.in:7512:    # symbol really_free_svalue: value 0x28001ca5b2d does not fit    # if the module is compiled with the default model.    AC_SYS_COMPILER_FLAG(-xmodel=medium, xmodel_medium, CCSHARED)    ;;    Windows_NT*) CCSHARED="-shared" ;;    esac    fi    fi    OLD_CFLAGS="$CFLAGS"    CFLAGS="$CFLAGS $CCSHARED" -  AC_TRY_COMPILE([], [exit(0);], +  AC_TRY_COMPILE([#include <stdlib.h> +  ], [exit(0);],    pike_cv_sys_ccshared="$CCSHARED", pike_cv_sys_ccshared='')    CFLAGS="$OLD_CFLAGS"   ])   CCSHARED="$pike_cv_sys_ccshared"   AC_MSG_RESULT($CCSHARED)      AC_MSG_CHECKING(LINKFORSHARED)      AC_CACHE_VAL(pike_cv_sys_linkforshared,[   # LINKFORSHARED are the flags passed to the $(CC) command that links
pike.git/src/configure.in:7555:    ;;    GNU*) LINKFORSHARED="-rdynamic";;    NetBSD*) LINKFORSHARED="-Wl,-E";;    OpenBSD*) LINKFORSHARED="-Wl,-E";;    next*) LINKFORSHARED="-u libsys_s";;    SCO_SV*) LINKFORSHARED="-fpic -Wl,-Bexport";;    # What about UNIX_SV?    UnixWare*|OpenUNIX*) LINKFORSHARED="-fpic -Wl,-Bexport";;       FreeBSD*) -  AC_TRY_RUN([int main(){exit( +  AC_TRY_RUN([#include <stdlib.h> + int main(){exit(   #ifdef __ELF__    0   #else    1   #endif   );}    ],LINKFORSHARED=-rdynamic)    ;;    esac    else
pike.git/src/configure.in:7578:    Darwin*) LINKFORSHARED="-dynamic";;    hp*|HP*) LINKFORSHARED="-Wl,-E";;    Linux*) LINKFORSHARED="-rdynamic";;    GNU*) LINKFORSHARED="-rdynamic";;    next*) LINKFORSHARED="-u libsys_s";;    SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;    # What about UNIX_SV?    UnixWare*|OpenUNIX*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;       FreeBSD*) -  AC_TRY_RUN([int main(){exit( +  AC_TRY_RUN([#include <stdlib.h> + int main(){exit(   #ifdef __ELF__    0   #else    1   #endif   );}    ],LINKFORSHARED=-rdynamic)    ;;    esac    fi   fi          OLD_CFLAGS="$CFLAGS"    CFLAGS="$CFLAGS $LINKFORSHARED" -  AC_TRY_RUN([int main() { exit(0); }], +  AC_TRY_RUN([#include <stdlib.h> + int main() { exit(0); }],    pike_cv_sys_linkforshared="$LINKFORSHARED", pike_cv_sys_linkforshared='', pike_cv_sys_linkforshared='')    CFLAGS="$OLD_CFLAGS"   ])      LINKFORSHARED="$pike_cv_sys_linkforshared"      AC_MSG_RESULT($LINKFORSHARED)      #############################################################################   
pike.git/src/configure.in:7651:    OLD_CFLAGS="$CFLAGS"       CFLAGS="$CFLAGS $LINKFORSHARED"    OLD_CC="$CC"    case "$LD" in    *shlicc)    CC="$BINDIR/smartlink shlicc"    ;;    esac    AC_TRY_RUN([ + #include <stdlib.h>   #define TESTING   #include "dynamic_load.c"   #if __GNUC__ >= 4   __attribute__ ((visibility("default")))   # endif   void testfunc2(void) { exit(0); }   ], pike_cv_sys_dynamic_loading=yes, pike_cv_sys_dynamic_loading=no, pike_cv_sys_dynamic_loading=no)    CFLAGS="$OLD_CFLAGS"    CC="$OLD_CC"    else