cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | AC_REVISION("$Id: configure.in,v 1.454 2001/01/19 13:49:55 grubba Exp $")
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_INIT(interpret.c)
|
af5647 | 1996-12-03 | Fredrik Hübinette (Hubbe) | | AC_CONFIG_HEADER(machine.h)
|
51bd9e | 1996-10-09 | Fredrik Hübinette (Hubbe) | |
|
ea2406 | 1997-04-01 | Henrik Grubbström (Grubba) | | # We want an absolute path to the source-dir.
case "$srcdir" in
/*)
;;
*)
oldsrcdir="$srcdir"
srcdir="`cd \"$srcdir\";pwd`"
AC_MSG_WARN([ Converted $oldsrcdir to $srcdir,
If this does not work, please use an absolute path to the configure script. ])
;;
esac
|
48ae53 | 1996-10-09 | Fredrik Hübinette (Hubbe) | | if test "x${CFLAGS-}" = x ; then
|
51bd9e | 1996-10-09 | Fredrik Hübinette (Hubbe) | | cflags_is_set=no
|
48ae53 | 1996-10-09 | Fredrik Hübinette (Hubbe) | | else
cflags_is_set=yes
|
51bd9e | 1996-10-09 | Fredrik Hübinette (Hubbe) | | fi
|
c67b69 | 1996-11-16 | Fredrik Hübinette (Hubbe) | | if test "x${CPPFLAGS-}" = x ; then
cppflags_is_set=no
else
cppflags_is_set=yes
fi
if test "x${LDFLAGS-}" = x ; then
ldflags_is_set=no
else
ldflags_is_set=yes
fi
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
AC_MSG_WARN([You are using a site file to initialize configure, please
note that this can lead to problems if anything in
$ac_site_file is not correct. If Pike does not compile, or
does not run, please try this to compile Pike again:
rm ./config.cache ; CONFIG_SITE=x ./configure ; make])
fi
done
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | if test ! -z "$pike_cv_prog_CC_save" -a ! -z "$CC" -a "$CC" != "$pike_cv_prog_CC_save"
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | then
|
562566 | 1997-04-15 | Fredrik Hübinette (Hubbe) | | AC_MSG_WARN([CC is different than last time Pike was compiled,
It is probably best to delete ./config.cache before proceeding])
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | fi
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | pike_cv_prog_CC_save="$CC"
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | |
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | # MY_AC_PROG_CC
# The above has problems if the smartlink binary is removed. /grubba
AC_PROG_CC
|
2ed72c | 2000-09-17 | Henrik Grubbström (Grubba) | | AC_PROG_CPP
#############################################################################
AC_ISC_POSIX
AC_AIX
AC_MINIX
#############################################################################
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | |
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | # option, cache_name, variable
AC_DEFUN(AC_SYS_COMPILER_FLAG,
[
AC_MSG_CHECKING($1)
AC_CACHE_VAL(pike_cv_option_$2,
[
OLD_CFLAGS="[$]CFLAGS"
CFLAGS="[$]OLD_CFLAGS $1"
AC_TRY_RUN([int foo; int main(){exit(0);}],
pike_cv_option_$2=yes,
pike_cv_option_$2=no, [
AC_TRY_LINK([], [], pike_cv_option_$2=yes, pike_cv_option_$2=no)
])
CFLAGS="[$]OLD_CFLAGS"
])
if test x"[$]pike_cv_option_$2" = "xyes" ; then
$3="[$]$3 $1"
case "$3" in
OPTIMIZE)
CFLAGS="[$]CFLAGS $1"
;;
esac
AC_MSG_RESULT(yes)
$5
else
AC_MSG_RESULT(no)
$4
fi
])
# arch, option, cache_name, variable
AC_DEFUN(AC_SYS_CPU_COMPILER_FLAG,
[
if test "`uname -m 2>/dev/null`" = "$1" ; then
AC_SYS_COMPILER_FLAG($2,$3,$4,$5,$6)
$7
fi
])
# os, option, cache_name, variable
AC_DEFUN(AC_SYS_OS_COMPILER_FLAG,
[
if test "x$pike_cv_sys_os" = "x$1" ; then
AC_SYS_COMPILER_FLAG($2,$3,$4,$5,$6)
$7
fi
])
define([DO_IF_OS],
[
if test "x$pike_cv_sys_os" = "x$1" ; then
$2
fi
])
define([DO_IF_CPU],
[
if test "`uname -m 2>/dev/null`" = "$1" ; then
$2
fi
])
#############################################################################
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | | if test "x$GCC" = "xno" -a "x$TCC" = "xno"; then
#
# We want 64bit mode if possible.
#
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-q64, q64, CFLAGS)
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | |
if test "x$ac_cv_prog_cc_cross" = "xyes"; then
# The AIX 5L/cc beta can't generate working binaries without a
# data-segment...
AC_MSG_CHECKING([if we're really using a cross-compiler])
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | |
|
7fcd07 | 2000-09-16 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_datasegment_required, [
ac_cv_prog_cc_cross=no;
AC_TRY_RUN([int foo;main(){return(0);}], [
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | | pike_cv_datasegment_required=yes
|
7fcd07 | 2000-09-16 | Henrik Grubbström (Grubba) | | ], [
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | | pike_cv_datasegment_required=no
|
7fcd07 | 2000-09-16 | Henrik Grubbström (Grubba) | | ac_cv_prog_cc_cross=yes
], [
pike_cv_datasegment_required=no
ac_cv_prog_cc_cross=yes
])
|
482797 | 2000-09-16 | Henrik Grubbström (Grubba) | | ])
if test "x$pike_cv_datasegment_required" = "xyes"; then
AC_MSG_RESULT([no -- Applying data-segment kludge])
ac_cv_prog_cc_cross=no
cat >conftest.c <<EOF
static int foo;
EOF
pike_cv_datasegemnt_file=no
if AC_TRY_EVAL(ac_compile); then
if test -f "conftest.$ac_objext"; then
rm -f "data-segment.$ac_objext"
if mv "conftest.$ac_objext" "data-segment.$ac_objext"; then
if test -f "`pwd`/data-segment.$ac_objext"; then
pike_cv_datasegemnt_file="`pwd`/data-segment.$ac_objext"
else
AC_MSG_WARN(Lost track of data-segment kludge-file.)
fi
else
AC_MSG_WARN(Failed to rename data-segment kludge-file.)
fi
else
AC_MSG_WARN(Can not find data-segment kludgefile.)
fi
else
AC_MSG_WARN(Failed to compile data-segment kludge.)
fi
if test "x$pike_cv_datasegment_file" = "xno"; then
AC_MSG_WARN(Some tests may yield false results.)
else
LIBS="$pike_cv_datasegment_file $LIBS"
export LIBS
AC_MSG_WARN(Data-segment kludge applied.)
fi
else
AC_MSG_RESULT(yes)
fi
fi
fi
|
67039b | 2000-08-07 | Henrik Grubbström (Grubba) | | #
# Some cross-compilation support
#
CROSS="$ac_cv_prog_cc_cross"
|
5fdd8c | 2000-08-02 | Henrik Grubbström (Grubba) | | AC_SUBST(CROSS)
|
67039b | 2000-08-07 | Henrik Grubbström (Grubba) | | if test "x$ac_cv_prog_cc_cross" = "xyes"; then
RUNTPIKE="USE_PIKE"
else
RUNTPIKE="USE_TPIKE"
fi
AC_SUBST(RUNTPIKE)
AC_PATH_PROG(pike_prog,pike,no)
PIKE="$ac_cv_path_pike_prog"
AC_SUBST(PIKE)
|
18be80 | 2000-03-02 | Fredrik Hübinette (Hubbe) | | #############################################################################
#
# The purpose of this test is to check that there is no filesystem
# caching preventing pike from compiling correctly.
#
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | AC_MSG_CHECKING([filesystem synchronization])
|
18be80 | 2000-03-02 | Fredrik Hübinette (Hubbe) | |
AC_CACHE_VAL(pike_cv_filesystem_syncronization,
[
pike_cv_filesystem_syncronization=working
AC_EGREP_CPP(true, [ true ], , pike_cv_filesystem_syncronization=broken)
AC_EGREP_CPP(false, [ false ], , pike_cv_filesystem_syncronization=broken)
AC_EGREP_CPP(yes, [ yes ], , pike_cv_filesystem_syncronization=broken)
AC_EGREP_CPP(no, [ no ], , pike_cv_filesystem_syncronization=broken)
AC_EGREP_CPP(near, [ far ], pike_cv_filesystem_syncronization=broken, )
AC_EGREP_CPP(up, [ up ], , pike_cv_filesystem_syncronization=broken)
AC_EGREP_CPP(down, [ down], , pike_cv_filesystem_syncronization=broken)
])
AC_MSG_RESULT($pike_cv_filesystem_syncronization)
if test "x$pike_cv_filesystem_syncronization" = xbroken ; then
AC_MSG_ERROR([Filesystem caching is too aggressive. If you are using
Samba, make sure to have the following line in your smb.conf:
oplocks = False
])
exit 1
fi
|
690098 | 1999-05-07 | Fredrik Hübinette (Hubbe) | | #############################################################################
AC_CHECK_HEADERS(fnord/fnord/fnord.h)
|
54be21 | 1999-05-12 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING([if CHECK_HEADERS works])
|
690098 | 1999-05-07 | Fredrik Hübinette (Hubbe) | | if test "x$ac_cv_header_fnord_fnord_fnord_h" = xyes ; then
|
54be21 | 1999-05-12 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT(no)
|
690098 | 1999-05-07 | Fredrik Hübinette (Hubbe) | | exit 1
fi
|
54be21 | 1999-05-12 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT(yes)
|
613bc5 | 2000-08-28 | Henrik Grubbström (Grubba) | |
#############################################################################
|
8cf37d | 1997-01-27 | Per Hedbor | |
|
e48c38 | 1998-07-29 | Marcus Comstedt | | if test $ac_cv_prog_gcc = yes; then
AC_MSG_CHECKING(for libgcc file name)
AC_CACHE_VAL(pike_cv_libgcc_filename,
[
pike_cv_libgcc_filename="`${CC-cc} -print-libgcc-file-name`"
if test -z "$pike_cv_libgcc_filename"; then
pike_cv_libgcc_filename=no
else
if test -f "$pike_cv_libgcc_filename"; then
:
else
pike_cv_libgcc_filename=no
fi
fi
])
AC_MSG_RESULT($pike_cv_libgcc_filename)
if test x"$pike_cv_libgcc_filename" = xno; then
LIBGCC=""
else
LIBGCC="$pike_cv_libgcc_filename"
fi
else
LIBGCC=""
fi
AC_SUBST(LIBGCC)
|
2565f4 | 1997-02-26 | Fredrik Hübinette (Hubbe) | | #############################################################################
LIBDIR=`(cd $srcdir/../lib ; pwd)`
BINDIR=`(cd $srcdir/../bin ; pwd)`
BUILDDIR=`pwd`
AC_SUBST(LIBDIR)
AC_SUBST(BINDIR)
AC_SUBST(BUILDDIR)
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | #############################################################################
## Build smartlink
|
af5ef8 | 1999-05-28 | Henrik Grubbström (Grubba) | | AC_CHECK_HEADERS(stdlib.h string.h unistd.h sys/stat.h sys/types.h sys/errno.h)
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | |
if test -x /usr/bin/uname 2>/dev/null; then
UNAME=`/usr/bin/uname -sr`
elif test -x /bin/uname 2>/dev/null; then
UNAME=`/bin/uname -sr`
else
UNAME=unknown
fi
|
613bc5 | 2000-08-28 | Henrik Grubbström (Grubba) | | # We need some special hacks when running slowaris
AC_PATH_PROG(uname_prog,uname,no)
AC_MSG_CHECKING(operating system)
AC_CACHE_VAL(pike_cv_sys_os,
[
if test "$uname_prog" != "no"; then
pike_cv_sys_os="`uname`"
case "$pike_cv_sys_os" in
SunOS)
case "`uname -r`" in
5.*) pike_cv_sys_os="Solaris" ;;
esac
;;
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | Monterey64)
# According to the release notes, the string "Monterey64"
# will be changed to "AIX" in the final release.
# (Monterey 64 is also known as AIX 5L).
pike_cv_sys_os="AIX"
;;
|
613bc5 | 2000-08-28 | Henrik Grubbström (Grubba) | | esac
else
pike_cv_sys_os="Not Solaris"
fi
])
AC_MSG_RESULT($pike_cv_sys_os)
if test "$GCC" = "yes"; then :; else
#
# Special hack for HP-UX stupid cc
#
if test "$pike_cv_sys_os" = "HP-UX"; then
AC_TRY_COMPILE([int foo(int bar);],[],[],
[
OLD_CC="${CC-cc}"
OLD_CFLAGS="$CFLAGS"
case "/$CC" in
*/smartlink\ cc)
if test -x /usr/bin/cc; then
CC="`echo $CC|sed -e 's/ cc/ \/usr\/bin\/cc/`"
else
: ;
fi
;;
esac
CFLAGS="-Ae +Olibcalls $CFLAGS"
AC_TRY_COMPILE([int foo(int bar);],[],[],[
CC="$OLD_CC"
CFLAGS="$OLD_CFLAGS"
])
pike_cv_prog_CC="${CC}"
])
fi
fi
if test "$pike_cv_sys_os" = "Solaris" ; then
AC_DEFINE(SOLARIS)
else
:
fi
|
904127 | 1999-03-06 | Henrik Grubbström (Grubba) | | # FIXME: Add proper tests
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | case "$UNAME" in
OSF1\ V4.*)
AC_DEFINE(USE_RPATH)
;;
|
108dde | 2000-10-31 | Henrik Grubbström (Grubba) | | HPUX\ 11.*)
AC_DEFINE(USE_PLUS_b)
;;
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | IRIX\ 6.*)
AC_DEFINE(USE_RPATH)
;;
IRIX\ 5.*)
AC_DEFINE(USE_RPATH)
;;
SunOS\ 5.*)
|
f2e4c5 | 1999-05-12 | Henrik Grubbström (Grubba) | | if test "$TCC" = "yes"; then
# tcc doesn't know about -R
AC_DEFINE(USE_Wl_R)
else
AC_DEFINE(USE_R)
fi
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | ;;
Linux\ 2.*)
AC_DEFINE(USE_Wl)
;;
|
ed7aeb | 2000-06-16 | Henrik Grubbström (Grubba) | | UnixWare\ 7.*)
|
b6c28f | 2000-06-16 | Henrik Grubbström (Grubba) | | if test "$ac_cv_prog_gcc" = "yes"; then
AC_DEFINE(USE_XLINKER_YP_)
else
AC_DEFINE(USE_YP_)
fi
|
ed7aeb | 2000-06-16 | Henrik Grubbström (Grubba) | | ;;
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | *)
AC_DEFINE(USE_LD_LIBRARY_PATH)
;;
|
2565f4 | 1997-02-26 | Fredrik Hübinette (Hubbe) | | esac
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | # Strip smartlink from $CC
REALCC="`echo $CC|sed -e 's/.*smartlink //'`"
# Fix a smartlink
SMARTLINK="$BUILDDIR/smartlink"
|
904127 | 1999-03-06 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(if $SMARTLINK exists is up to date and works)
|
ba012d | 1999-04-25 | Henrik Grubbström (Grubba) | | if ls -1tr "$SMARTLINK${ac_exeext}" "$srcdir/smartlink.$ac_ext" 2>/dev/null | head -1 | grep "smartlink.$ac_ext" >/dev/null 2>&5 && "$SMARTLINK" -v >/dev/null 2>&5; then
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | SMARTBUILDCC="${REALCC-cc}"
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | |
|
9f8523 | 2000-11-26 | Henrik Grubbström (Grubba) | | if echo foo "$CC" | egrep 'rntc.|rnt.cl' >/dev/null; then
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | AC_MSG_WARN([rntcc/rntcl/rnticl/rntecl detected.])
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | AC_PATH_PROGS(SMARTBUILDCC,gcc cc egcs,gcc, $PATH:$EXTRA_PATH)
echo Using $SMARTBUILDCC to compile smartlink.
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | else
if "x$ac_cv_prog_cc_cross" = "xyes"; then
AC_MSG_WARN([Crosscompiler detected.])
AC_PATH_PROGS(SMARTBUILDCC, gcc cc egcs, gcc, /usr/bin:/bin/:/usr/ccs/bin:/usr/local/bin:$PATH:$EXTRA_PATH)
echo Using $SMARTBUILDCC to compile smartlink.
fi
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | fi
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | |
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | rm -f "$SMARTLINK"
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | |
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(whether smartlink compiles)
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | |
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | link_cmd='${SMARTBUILDCC-cc} -o smartlink${ac_exeext} $CFLAGS -I. $CPPFLAGS $LDFLAGS $srcdir/smartlink.$ac_ext $LIBS 2>&5'
if { (eval echo Compiling smartlink: \"$link_cmd\") 1>&5; (eval $link_cmd) 2>&5; } && "$BUILDDIR/smartlink" -v >/dev/null 2>&5; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no - use the sh script)
SMARTLINK="$BINDIR/smartlink"
|
d1e3fe | 1999-03-06 | Henrik Grubbström (Grubba) | | fi
fi
CC="$SMARTLINK $REALCC"
pike_cv_prog_CC="$CC"
|
d5efba | 1998-01-23 | Henrik Grubbström (Grubba) | |
|
424d9c | 1999-05-02 | Fredrik Hübinette (Hubbe) | | AC_SUBST(SMARTLINK)
AC_SUBST(REALCC)
|
d5efba | 1998-01-23 | Henrik Grubbström (Grubba) | | export REALCC SMARTLINK
|
d166d6 | 2000-08-06 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING([for a fallback compiler])
# Strip smartlink from $FALLBACK_CC
FALLBACK_CC="`echo $FALLBACK_CC|sed -e 's/.*smartlink //'`"
if test "x$FALLBACK_CC" = "x"; then
AC_MSG_RESULT(no)
else
FALLBACK_CC="$SMARTLINK $FALLBACK_CC"
AC_MSG_RESULT($FALLBACK_CC)
fi
AC_SUBST(FALLBACK_CC)
export FALLBACK_CC
|
2565f4 | 1997-02-26 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
de575a | 1999-05-29 | Henrik Grubbström (Grubba) | |
|
613bc5 | 2000-08-28 | Henrik Grubbström (Grubba) | | if test "$GCC" = "yes"; then
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | if test "$cflags_is_set" = "no"; then
|
613bc5 | 2000-08-28 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-pipe, pipe, CFLAGS)
fi
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | fi
|
2901d3 | 1998-08-05 | Fredrik Hübinette (Hubbe) | | LD='$(CC) $(CFLAGS)'
|
080971 | 1998-02-27 | Marcus Comstedt | |
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | case "$pike_cv_sys_os" in
SCO*)
|
77b282 | 1997-10-04 | Henrik Grubbström (Grubba) | | case "$CFLAGS" in
|
2a7fc8 | 1999-11-29 | Boyd Lynn Gerber | | *-belf*)
AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[
case "$LDFLAGS" in
*-belf*) ;;
*)
echo "Adding -belf option to ldflags."
LDFLAGS="$LDFLAGS -belf"
;;
esac
])
;;
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | *)
|
2a7fc8 | 1999-11-29 | Boyd Lynn Gerber | | AC_SYS_COMPILER_FLAG(-belf,belf,CFLAGS)
|
77b282 | 1997-10-04 | Henrik Grubbström (Grubba) | | ;;
esac
case "$LDFLAGS" in
*-belf*) ;;
*)
|
dda906 | 1999-08-15 | Boyd Lynn Gerber | | AC_SYS_COMPILER_FLAG(-belf,belf,LDFLAGS)
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | ;;
esac
;;
|
2b4903 | 1998-03-05 | Henrik Grubbström (Grubba) | | SunOS*)
# gcc on SunOS 4 forgets to define this:
echo "SunOS. Adding -D__USE_FIXED_PROTOTYPES__"
CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
;;
|
080971 | 1998-02-27 | Marcus Comstedt | | BSD/OS*)
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | case "`uname -r`" in
4.*) ;;
*) LD="$BINDIR/smartlink shlicc";;
esac
|
080971 | 1998-02-27 | Marcus Comstedt | | ;;
|
9ab446 | 1998-11-06 | Honza Petrous | | UnixWare*)
|
2a7fc8 | 1999-11-29 | Boyd Lynn Gerber | | case "$CFLAGS" in
*-Kalloca*) ;;
*)
if test "$GCC" != "yes"; then
# We are using built-in inline function
CFLAGS="$CFLAGS -Kalloca"
CXX="$CXX -DNO_CPLUSPLUS_ALLOCA"
fi
;;
esac
|
9ab446 | 1998-11-06 | Honza Petrous | | ;;
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | esac
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | |
|
080971 | 1998-02-27 | Marcus Comstedt | | AC_SUBST(LD)
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | |
|
348fca | 1999-05-29 | Henrik Grubbström (Grubba) | | # Some sanity checks.
|
4313c9 | 2000-01-15 | Fredrik Hübinette (Hubbe) | | if test "$GCC" = "yes" -a "$pike_cv_sys_os" = "Solaris" && test "`uname -p`" = "sparc"; then
|
348fca | 1999-05-29 | Henrik Grubbström (Grubba) | | # Solaris/sparc:
# Check that gnu ld isn't used.
# It's usually hidden in $prefix/sparc-sun-solaris2.?/bin/.
# NOTE: M4 uses [] as quotes.
gcc_ld_path="`$CC -v 2>&1 | sed -e '1,1s/[[^\/]]*\(\/.*\/\)[[^\/]]*$/\1/p;d' | sed -e '/lib\/gcc-lib\//s/lib\/gcc-lib\///;s/\/[[0-9]]*\.[[0-9]]*\.[[0-9]]*\/$/\/bin/'`"
if test "x$gcc_ld_path" = "x"; then :; else
|
4d012e | 2000-01-19 | Wilhelm Köhler | | if test -d "$gcc_ld_path/."; then
if "$gcc_ld_path/ld" -v 2>&1 | grep -i GNU >/dev/null; then
AC_MSG_WARN([GNU ld found on Solaris sparc system ($gcc_ld_path/ld).])
AC_MSG_WARN([This may cause the dynamic module support to fail.])
else :; fi
|
348fca | 1999-05-29 | Henrik Grubbström (Grubba) | | else :; fi
fi
unset gcc_ld_path
|
999815 | 1999-05-30 | Henrik Grubbström (Grubba) | |
# Watch out for gcc-2.8.1 on Solaris 7 sparc machines. It generates
# assembler code which contains .uaword directives, which in turn
# generates code with R_SPARC_UA32 relocations, which /usr/bin/ld.so
# has buggy support for (it doesn't relocate the MSB).
# Check that gcc doesn't generate uaword opcodes
AC_MSG_CHECKING(if your gcc generates uaword opcodes)
AC_CACHE_VAL(pike_cv_gcc_uaword, [
cat > conftest.c <<EOF
char *foo[[]] = { "bar" };
EOF
pike_compile='${CC-cc} -S $CFLAGS $CPPFLAGS conftest.c 1>&5'
pike_cv_gcc_uaword=no
if { (eval echo configure: \"$pike_compile\") >&5; (eval $pike_compile) 2>&5; }; then
if grep ".uaword" conftest.s 2>&5 >/dev/null; then
echo "configure: result contains .uaword:" >&5
cat conftest.s >&5
pike_cv_gcc_uaword=yes
else :; fi
else
echo "configure: failed program was:" >&5
cat conftest.c >&5
fi
rm -rf conftest.*
])
|
cfd7c9 | 1999-05-30 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT($pike_cv_gcc_uaword)
|
999815 | 1999-05-30 | Henrik Grubbström (Grubba) | |
# Check if as generates R_SPARC_UA32 relocations from .uaword.
if test "$pike_cv_gcc_uaword" = "yes"; then
AC_MSG_CHECKING([if your as generates R_SPARC_UA32 relocations])
AC_CACHE_VAL(pike_cv_as_r_sparc_ua32, [
AC_TRY_ASSEMBLE([
.section ".rodata"
.align 8
.STRING:
.asciz "String"
.section ".data"
.align 4
.type string,#object
.size string,4
string:
.uaword .STRING
],[
if /usr/ccs/bin/elfdump -r conftest.o | grep -i R_SPARC_UA32 >/dev/null 2>&AC_FD_CC; then
pike_cv_ac_r_sparc_ua32=yes
else
pike_cv_ac_r_sparc_ua32=no
fi
],[
pike_cv_ac_r_sparc_ua32=no
])
])
AC_MSG_RESULT($pike_cv_ac_r_sparc_ua32)
if test "$pike_cv_ac_r_sparc_ua32" = "yes"; then
|
f594b7 | 1999-05-30 | Henrik Grubbström (Grubba) | | AC_MSG_WARN([Your gcc/as combo may generate R_SPARC_UA32 relocations.])
AC_MSG_WARN([R_SPARC_UA32 relocations are unsupported in Solaris >= 2.3,])
AC_MSG_WARN([and have broken support in Solaris 7.])
|
193c74 | 1999-05-31 | Henrik Grubbström (Grubba) | | if test -d "/var/sadm/patch/107058-01/."; then
AC_MSG_WARN([Back out patch 107058-01, or])
AC_MSG_WARN([recompile gcc with a modified config/sparc/sol2.h.])
else
AC_MSG_WARN([Recompile gcc with a modified config/sparc/sol2.h.])
fi
|
999815 | 1999-05-30 | Henrik Grubbström (Grubba) | | exit 1
else :; fi
else :; fi
|
348fca | 1999-05-29 | Henrik Grubbström (Grubba) | | else :; fi
#############################################################################
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | |
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(root, [ --with-root=path specify a cross-compilation root-directory],[
case "$with_root" in
/)
with_root=""
;;
/*)
;;
no)
with_root=""
;;
*)
AC_MSG_WARN([Root path $with_root is not absolute. Ignored.])
with_root=""
;;
esac
],[with_root=""])
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(dynamic_modules, [ --without-dynamic-modules link modules statically],[],[])
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(static_linking, [ --with-static-linking link statically, if possible],[with_static_linking=yes],[])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(include-path,[ --with-include-path A list of paths to search for include files.])
AC_ARG_WITH(lib-path, [ --with-lib-path A list of paths to search for libraries.])
|
ad7f21 | 1999-12-05 | Mirar (Pontus Hagland) | |
AC_ARG_WITH(double-precision, [ --with-double-precision use double precision floats ], [ AC_DEFINE(WITH_DOUBLE_PRECISION_SVALUE) ] )
AC_ARG_WITH(long-double-precision, [ --with-long-double-precision use long double precision floats ], [ AC_DEFINE(WITH_LONG_DOUBLE_PRECISION_SVALUE) ] )
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(gdbm, [ --without-gdbm no GNU database manager support ])
|
81e643 | 2000-01-03 | Martin Stjernholm | | AC_ARG_WITH(gmp, [ --without-gmp no support for Gmp bignums])
|
4b8d50 | 2000-12-19 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(dmalloc, [ --with-dmalloc enable memory-leak tests],[with_debug="yes" AC_DEFINE(DEBUG_MALLOC,10)],[])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(debug, [ --without-debug disable run debugging],[],[with_debug=])
|
88b268 | 2000-12-17 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(rtldebug, [ --with-rtldebug enable run time self tests],[],[with_rtldebug=])
|
aa38a8 | 1999-11-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(cdebug, [ --without-cdebug disable -g],[],[
case "$pike_cv_sys_os:$GCC" in
Solaris:no)
# Solaris/cc has problems with combining optimizations and debuginfo.
AC_MSG_WARN([Defaulting to --without-cdebug since the OS is Solaris,
|
81e643 | 2000-01-03 | Martin Stjernholm | | and gcc is not being used.])
|
aa38a8 | 1999-11-29 | Henrik Grubbström (Grubba) | | with_cdebug=no
;;
*)
with_cdebug=
;;
esac
])
AC_ARG_WITH(copt, [ --without-copt disable -O2],[],[with_copt=])
|
2f0411 | 2000-02-03 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(threads, [ --without-threads no threads support],[],[
case "x$pike_cv_sys_os" in
xFreeBSD*)
|
108dde | 2000-10-31 | Henrik Grubbström (Grubba) | | if test "`uname -r|sed -e 's/\([0-9]*\).*/\1/'`" -lt 4; then
|
2f0411 | 2000-02-03 | Fredrik Hübinette (Hubbe) | | AC_MSG_WARN([
FreeBSD <= 3.x detected, disabling threads.
Use --with-threads to force threads support.
])
with_threads=no
fi
;;
esac
|
cd5748 | 2000-02-03 | Henrik Grubbström (Grubba) | | if test "x${with_threads-}" = x; then
|
2f0411 | 2000-02-03 | Fredrik Hübinette (Hubbe) | | with_threads=yes
fi
])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(zlib, [ --without-zlib no gz compression support],[],[with_zlib=yes])
AC_ARG_WITH(ssleay, [ --without-ssleay no support for the secure socket protocol],[],[with_ssleay=yes])
AC_ARG_WITH(mysql, [ --without-mysql no support for the Mysql database],[],[with_mysql=yes])
|
fda0de | 1999-10-08 | Fredrik Noring | | AC_ARG_WITH(gif-rle, [ --with-gif-rle use kind-of-rle packing instead of lzw],[],[])
|
f24808 | 2000-05-02 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(rsaref, [ --with-rsaref[=path] Support for RSAREF],[],[])
|
bf61b9 | 1999-02-06 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(checker, [ --with-checker add extra memory checking overhead (Purify)])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(profiling, [ --with-profiling add code used to profile pike code ],[AC_DEFINE(PROFILING)],[])
|
554dfd | 2000-05-01 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(pg, [ --with-pg Use the gcc -pg option],
|
91006b | 2000-03-21 | Fredrik Hübinette (Hubbe) | | [
|
554dfd | 2000-05-01 | Fredrik Hübinette (Hubbe) | | if test "x$with_pg" = xyes; then
|
91006b | 2000-03-21 | Fredrik Hübinette (Hubbe) | | PROFIL=-pg
else
PROFIL=
fi
],
[
PROFIL=
])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(poll, [ --with-poll use poll instead of select],[],[
|
78a69c | 1998-09-29 | Henrik Grubbström (Grubba) | | # Neither --with-poll nor --without-poll was specified
case "$pike_cv_sys_os" in
|
2f9254 | 2001-01-18 | Fredrik Hübinette (Hubbe) | | Solaris|HP-UX|OSF1|IRIX|Linux)
|
d7bcfd | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_MSG_WARN([Defaulting to --with-poll since the OS is $pike_cv_sys_os.])
with_poll=yes
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | ;;
|
d0be14 | 1999-05-27 | Fredrik Hübinette (Hubbe) | | AIX)
|
085ac6 | 1999-05-27 | Henrik Grubbström (Grubba) | | # poll(2) is broken on AIX 4.1 and earlier.
|
d0be14 | 1999-05-27 | Fredrik Hübinette (Hubbe) | | if test "`uname -r`" -ge 2 -a "`uname -v`" -ge 4 ; then
with_poll=yes
|
085ac6 | 1999-05-27 | Henrik Grubbström (Grubba) | | else if test "`uname -v`" -gt 4 ; then
|
d5614e | 1999-05-27 | Henrik Grubbström (Grubba) | | with_poll=yes
else :; fi
fi
|
085ac6 | 1999-05-27 | Henrik Grubbström (Grubba) | | if test "$with_poll" = "yes" ; then
|
54108f | 2000-03-26 | Henrik Grubbström (Grubba) | | AC_MSG_WARN([Defaulting to --with-poll since the OS is AIX 4.2 or later.])
|
085ac6 | 1999-05-27 | Henrik Grubbström (Grubba) | | else :; fi
|
d0be14 | 1999-05-27 | Fredrik Hübinette (Hubbe) | | ;;
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | esac
])
AC_ARG_WITH(max-fd, [ --with-max-fd=X set how many filedescriptors can be used at once],[pike_cv_max_open_fd=$withval],[])
|
653f32 | 2000-06-28 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(oob, [ --without-oob disable out-of-band data handling],[],[with_oob=yes])
|
72f0cb | 2000-03-06 | Martin Stjernholm | | AC_ARG_WITH(thread-trace,[ --without-thread-trace disable individual tracing of threads],[],[with_thread_trace=yes])
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(compiler-trace,[ --with-compiler-trace enable tracing of the compiler],[AC_DEFINE(YYDEBUG)],[])
|
fda0de | 1999-10-08 | Fredrik Noring | | AC_ARG_WITH(security, [ --with-security enable internal pike security system],[AC_DEFINE(PIKE_SECURITY)],[])
|
81e643 | 2000-01-03 | Martin Stjernholm | | AC_ARG_WITH(bignums, [ --without-bignums disable internal conversion to bignums],[],[with_bignums=yes])
|
8a0a59 | 2000-04-27 | Fredrik Hübinette (Hubbe) | | AC_ARG_WITH(shared-nodes,[ --without-shared-nodes disable the SHARED_NODES mode of the optimizer],[],[with_shared_nodes=yes])
|
011ad3 | 1999-10-22 | Fredrik Hübinette (Hubbe) | |
|
02abea | 2000-03-31 | Fredrik Hübinette (Hubbe) | | # This makes configure default to --without-Perl
# Remove this when the Perl module stops crashing and hanging. -Hubbe
|
381c48 | 2000-04-19 | Henrik Grubbström (Grubba) | | AC_ARG_WITH(perl, [ --with-perl enable the embedded Perl module (EXPERIMENTAL)],[],
[ac_configure_args="$ac_configure_args --without-perl"
with_perl="no"
]
|
02abea | 2000-03-31 | Fredrik Hübinette (Hubbe) | | )
|
653f32 | 2000-06-28 | Fredrik Hübinette (Hubbe) | | if test "x$with_oob" = xyes; then
AC_DEFINE(WITH_OOB)
fi
|
011ad3 | 1999-10-22 | Fredrik Hübinette (Hubbe) | | if test "x$with_bignums" = xyes; then
AC_DEFINE(AUTO_BIGNUM)
|
490016 | 1999-10-23 | Fredrik Noring | | if test "x$with_gmp" = xno; then
|
5435a7 | 2000-05-04 | Fredrik Hübinette (Hubbe) | | AC_MSG_ERROR([Cannot compile --with-bignums without the GMP library
It is highly recommended that you install a working GMP
library on your system as that will add features to Pike
required by many applications. (Such as Roxen) However,
if you know that you do not need GMP, you may re-run configure
with the option --without-bignums instead.
|
011ad3 | 1999-10-22 | Fredrik Hübinette (Hubbe) | | ])
else :; fi
else :; fi
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | |
|
a4e813 | 2000-06-17 | Henrik Grubbström (Grubba) | | if test "x$with_shared_nodes" != xno; then
|
de2896 | 1999-11-13 | Henrik Grubbström (Grubba) | | AC_MSG_WARN([Enabling the SHARED_NODES mode of the optimizer.])
AC_MSG_WARN([Note that this is EXPERIMENTAL.])
AC_DEFINE(SHARED_NODES)
else :; fi
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | if test "x$with_poll" = "xyes"; then
AC_DEFINE(HAVE_AND_USE_POLL)
else :; fi
|
bf61b9 | 1999-02-06 | Henrik Grubbström (Grubba) | | if test "x$with_checker" = "xyes"; then
AC_DEFINE(__CHECKER__)
else :; fi
|
72f0cb | 2000-03-06 | Martin Stjernholm | | if test "x$with_thread_trace" = "xyes"; then
AC_DEFINE(THREAD_TRACE)
else :; fi
|
4b8d50 | 2000-12-19 | Henrik Grubbström (Grubba) | |
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | #
# Allow --with(out)-debug to toggle both cdebug and rtldebug, but
# let --with(out)-{c,rtl}debug take precedence.
#
if test "x$with_cdebug" = x ; then
with_cdebug="$with_debug"
fi
if test "x$with_rtldebug" = x ; then
with_rtldebug="$with_debug"
fi
|
4b8d50 | 2000-12-19 | Henrik Grubbström (Grubba) | | #
# --with-dmalloc requires --with-rtldebug
#
if test "x$with_dmalloc" = "x"; then :; else
if test "x$with_rtldebug" = "xyes"; then :; else
AC_MSG_WARN([Debug malloc requires rtldebug. Enabling rtldebug.])
|
32ead5 | 2000-12-19 | Henrik Grubbström (Grubba) | | with_rtldebug=yes
|
4b8d50 | 2000-12-19 | Henrik Grubbström (Grubba) | | fi
fi
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | #
# Defaults for cdebug and rtldebug here:
#
if test "x$with_cdebug" = x ; then
with_cdebug=yes
fi
if test "x$with_rtldebug" = x ; then
|
88b268 | 2000-12-17 | Henrik Grubbström (Grubba) | | with_rtldebug=no
# with_rtldebug=yes
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | fi
if test "x$with_rtldebug" = xyes ; then
|
71f3a2 | 1998-11-22 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(PIKE_DEBUG)
|
f6c337 | 1998-09-29 | Henrik Grubbström (Grubba) | | fi
#############################################################################
|
48ae53 | 1996-10-09 | Fredrik Hübinette (Hubbe) | |
|
8cf37d | 1997-01-27 | Per Hedbor | |
WARN=""
OPTIMIZE=""
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | if test "$cflags_is_set" = "no"; then
|
2901d3 | 1998-08-05 | Fredrik Hübinette (Hubbe) | | if test "x$with_cdebug" = "xno" ; then
CFLAGS=`echo " $CFLAGS " | sed -e 's@ -g @ @g'`
else
:
|
f41e0d | 1999-10-19 | Henrik Grubbström (Grubba) | | fi
|
2901d3 | 1998-08-05 | Fredrik Hübinette (Hubbe) | |
|
8cf37d | 1997-01-27 | Per Hedbor | | if test "x${GCC-}" = xyes ; then
|
2e96cd | 2000-08-12 | Per Hedbor | | # Do not use -Wall, since that produces a lot of warnings that are not
|
3d6e5c | 2000-08-17 | Henrik Grubbström (Grubba) | | # really interresting (such as the warning for if( ... ) ... if(
|
2e96cd | 2000-08-12 | Per Hedbor | | # ... ) .... else
|
559196 | 2000-12-05 | Marcus Comstedt | | AC_SYS_COMPILER_FLAG(-W,W,WARN)
AC_SYS_COMPILER_FLAG(-Wall,Wall,WARN)
AC_SYS_COMPILER_FLAG(-Wno-unused,Wno_unused,WARN)
AC_SYS_COMPILER_FLAG(-Wcomment,Wcomment,WARN)
AC_SYS_COMPILER_FLAG(-Wformat,Wformat,WARN)
AC_SYS_COMPILER_FLAG(-Wimplicit-function-declaration,Wimplicit_function_declaration,WARN)
AC_SYS_COMPILER_FLAG(-Wmultichar,Wmultichar,WARN)
AC_SYS_COMPILER_FLAG(-Wswitch,Wswitch,WARN)
AC_SYS_COMPILER_FLAG(-Wuninitialized,Wuninitialized,WARN)
AC_SYS_COMPILER_FLAG(-Wpointer-arith,Wpointer_arith,WARN)
AC_SYS_COMPILER_FLAG(-Wchar-subscripts,Wchar_subscripts,WARN)
AC_SYS_COMPILER_FLAG(-Wno-long-long,Wno_long_long,WARN)
|
9c5a5e | 1997-12-20 | Henrik Grubbström (Grubba) | |
|
34251a | 1999-02-05 | Martin Stjernholm | | if test "x${with_static_linking-}" = "xyes" ; then
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG(-static,link_static,CFLAGS)
else
:
fi
|
989adb | 1998-12-20 | Fredrik Hübinette (Hubbe) | | ##
## -fomit-frame-pointer does not work with egcs 1.1.1
## /Hubbe 1998-12-20
##
#if test "x$with_cdebug" = "xno" ; then
# AC_SYS_COMPILER_FLAG(-fomit-frame-pointer,fomit_frame_pointer,OPTIMIZE)
#else
# :
#fi
|
9c5a5e | 1997-12-20 | Henrik Grubbström (Grubba) | |
|
8cf37d | 1997-01-27 | Per Hedbor | | ### Optimize for different SUN machines. If there is no working 'uname'
### no extra optimization will be done, but nothing should break either.
|
50adc3 | 1998-04-17 | Fredrik Hübinette (Hubbe) | | case "`uname -m 2>/dev/null`" in
sun4c)
|
e65d8d | 1998-07-17 | Henrik Grubbström (Grubba) | | # The -sparclite option seems to generate assembler that /bin/as doesn't
# understand. /grubba 1998-07-17
# AC_SYS_COMPILER_FLAG(-msparclite,sparclite,OPTIMIZE)
|
50adc3 | 1998-04-17 | Fredrik Hübinette (Hubbe) | | ;;
sun4m)
AC_SYS_COMPILER_FLAG(-mv8,microsparc,OPTIMIZE)
;;
sun4d)
AC_SYS_COMPILER_FLAG(-msupersparc,supersparc,OPTIMIZE)
;;
sun4u)
|
e65d8d | 1998-07-17 | Henrik Grubbström (Grubba) | | # FIXME: Optimize for V9
|
50adc3 | 1998-04-17 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG(-msupersparc,ultrasparc,OPTIMIZE)
;;
i586)
AC_SYS_COMPILER_FLAG(-mpentium,pentium,OPTIMIZE)
;;
i686)
AC_SYS_COMPILER_FLAG(-mpentiumpro,pentiumpro,OPTIMIZE,[
AC_SYS_COMPILER_FLAG(-mpentium,pentium,OPTIMIZE)
])
;;
|
2e96cd | 2000-08-12 | Per Hedbor | | i86pc)
case "`isalist 2>/dev/null`" in
*pentium_pro*)
AC_SYS_COMPILER_FLAG(-mcpu=pentiumpro,pentiumpro,OPTIMIZE,[
AC_SYS_COMPILER_FLAG(-mcpu=pentium,pentium,OPTIMIZE)
])
;;
*pentium*)
AC_SYS_COMPILER_FLAG(-mcpu=pentium,pentium,OPTIMIZE,[
AC_SYS_COMPILER_FLAG(-m486,486,OPTIMIZE)
])
;;
esac
;;
|
50adc3 | 1998-04-17 | Fredrik Hübinette (Hubbe) | | esac
|
b7c2ef | 1999-08-08 | Henrik Grubbström (Grubba) | |
# AIX
DO_IF_OS(AIX,
[
# Tell the linker to generate a large toc if needed
AC_SYS_COMPILER_FLAG(-bbigtoc,bbigtoc,LDFLAGS)
|
cf197c | 1999-08-27 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG([-Wl,-bbigtoc],Wlbbigtoc,LDFLAGS)
|
05cd67 | 2000-09-28 | Henrik Grubbström (Grubba) | | ])
DO_IF_OS(Darwin,
[
# aka MacOS X.
# Check for useful frameworks.
|
12c013 | 2000-10-01 | Henrik Grubbström (Grubba) | | # Disabled, since it doesn't work as advertized...
# AC_SYS_COMPILER_FLAG(-framework Zip, framework_Zip, CPPFLAGS)
|
1bdb76 | 2000-10-01 | Henrik Grubbström (Grubba) | | :
|
b7c2ef | 1999-08-08 | Henrik Grubbström (Grubba) | | ])
|
5866e0 | 1999-04-25 | Henrik Grubbström (Grubba) | | else if test "x${TCC-}" = xyes ; then
# Yikes! We're using the TenDRA compiler!
# Make sure we can use the system headerfiles...
|
76e3a7 | 2000-07-11 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-Ysystem, ysystem, CPPFLAGS)
|
5866e0 | 1999-04-25 | Henrik Grubbström (Grubba) | |
# Use lenient ANSI compliance...
|
5fdd8c | 2000-08-02 | Henrik Grubbström (Grubba) | | #AC_SYS_COMPILER_FLAG(-Xa, xa, CFLAGS)
|
5866e0 | 1999-04-25 | Henrik Grubbström (Grubba) | |
|
607710 | 1999-05-15 | Henrik Grubbström (Grubba) | | # Find out where libtdf.a is hidden.
AC_MSG_CHECKING(for machine dependant library directory)
AC_CACHE_VAL(pike_cv_tcc_lib_path,
[
|
4d5d02 | 1999-05-15 | Henrik Grubbström (Grubba) | | pike_cv_tcc_lib_path="`${CC-cc} -dry conftest.c -i 2>&1 | sed -e '/tdfc/s/bin\/tdfc.*/lib\/sys/p' -ed| head -1`"
|
607710 | 1999-05-15 | Henrik Grubbström (Grubba) | | if test -d "$pike_cv_tcc_lib_path/." ; then :; else
# Failed.
pike_cv_tcc_lib_path="no"
fi
])
AC_MSG_RESULT($pike_cv_tcc_lib_path)
if test "$pike_cv_tcc_lib_path" = "no" ; then :; else
LDFLAGS="$LDFLAGS -L$pike_cv_tcc_lib_path"
# This library is needed for 64bit support on 32bit machines/OS's.
AC_CHECK_LIB(tdf, __TDFUnot)
fi
|
8cf37d | 1997-01-27 | Per Hedbor | | else
|
5866e0 | 1999-04-25 | Henrik Grubbström (Grubba) | | # Assume system compiler "cc".
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | |
|
34251a | 1999-02-05 | Martin Stjernholm | | if test "x${with_static_linking-}" = "xyes" ; then
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(AIX,
[
|
5866e0 | 1999-04-25 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG([-Wl,-bstatic],wl_link_static,CFLAGS)
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS} -bstatic"
])
DO_IF_OS(OSF1,
[
AC_SYS_COMPILER_FLAG(-non_shared,non_shared,CFLAGS)
LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS} -non_shared"
])
DO_IF_OS(IRIX,
[
AC_SYS_COMPILER_FLAG(-non_shared,non_shared,CFLAGS)
LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS} -B static"
])
# how do you link statically on HP-UX ?
else
:
fi
|
8cf37d | 1997-01-27 | Per Hedbor | | ### Non-gcc thingies. This should probably be enhanced...
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | |
|
d93ff5 | 1997-11-02 | Henrik Grubbström (Grubba) | | # Solaris
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(Solaris,
[
AC_SYS_COMPILER_FLAG(-fast,fast,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-xdepend,xdepend,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-xs,xs,CFLAGS)
# Causes __STDC__ to be 1 which causes several headerfiles to behave
# differently.
# AC_SYS_OS_COMPILER_FLAG(-Xc,Xc,WARN)
])
|
d93ff5 | 1997-11-02 | Henrik Grubbström (Grubba) | |
|
de386f | 1998-08-06 | Henrik Grubbström (Grubba) | | # AIX
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(AIX,
[
# This one is needed to get the compiler to fail on errors,
# which is needed for several configure-scripts.
AC_SYS_COMPILER_FLAG(-qhalt=e,qhalt_e,CFLAGS)
AC_SYS_COMPILER_FLAG(-qro,qro,OPTIMIZE)
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-qfold,qfold,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-qwarn64,qwarn64,WARN)
|
e7c34a | 2000-09-17 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-qflag=w:w,qflag_w_w,WARN)
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | AC_DEFUN(AC_SYS_COMPILER_FLAG_QINFO, [
AC_SYS_COMPILER_FLAG(-qinfo=$1,qinfo_$1,WARN)
])
AC_SYS_COMPILER_FLAG_QINFO(cmp)
AC_SYS_COMPILER_FLAG_QINFO(cnd)
AC_SYS_COMPILER_FLAG_QINFO(cns)
AC_SYS_COMPILER_FLAG_QINFO(cnv)
AC_SYS_COMPILER_FLAG_QINFO(dcl)
AC_SYS_COMPILER_FLAG_QINFO(eff)
AC_SYS_COMPILER_FLAG_QINFO(enu)
AC_SYS_COMPILER_FLAG_QINFO(ext)
AC_SYS_COMPILER_FLAG_QINFO(gen)
AC_SYS_COMPILER_FLAG_QINFO(gnr)
AC_SYS_COMPILER_FLAG_QINFO(got)
AC_SYS_COMPILER_FLAG_QINFO(ini)
AC_SYS_COMPILER_FLAG_QINFO(inl)
AC_SYS_COMPILER_FLAG_QINFO(lan)
AC_SYS_COMPILER_FLAG_QINFO(obs)
AC_SYS_COMPILER_FLAG_QINFO(ord)
AC_SYS_COMPILER_FLAG_QINFO(par)
AC_SYS_COMPILER_FLAG_QINFO(por)
|
e7c34a | 2000-09-17 | Henrik Grubbström (Grubba) | | # ppc disabled since it complains about the system header files.
# AC_SYS_COMPILER_FLAG_QINFO(ppc)
# ppt disabled since tracing the preprocessor isn't interresting.
# AC_SYS_COMPILER_FLAG_QINFO(ppt)
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG_QINFO(pro)
AC_SYS_COMPILER_FLAG_QINFO(rea)
AC_SYS_COMPILER_FLAG_QINFO(ret)
|
e7c34a | 2000-09-17 | Henrik Grubbström (Grubba) | | # trd disabled, since it adds extra errors (in particular 1506-419).
# AC_SYS_COMPILER_FLAG_QINFO(trd)
|
dc8308 | 2000-09-15 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG_QINFO(tru)
AC_SYS_COMPILER_FLAG_QINFO(uni)
AC_SYS_COMPILER_FLAG_QINFO(use)
# AC_SYS_COMPILER_FLAG(-qalias=addr,qalias_addr,OPTIMIZE)
# AC_SYS_COMPILER_FLAG(-qlibansi,qlibansi,OPTIMIZE)
|
b7c2ef | 1999-08-08 | Henrik Grubbström (Grubba) | | # Tell the linker to generate a large toc if needed
AC_SYS_COMPILER_FLAG(-bbigtoc,bbigtoc,LDFLAGS)
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | ])
|
de386f | 1998-08-06 | Henrik Grubbström (Grubba) | |
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | | # HP-UX
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(HP-UX,
[
AC_SYS_COMPILER_FLAG(-D__STDC_EXT__,stdc_ext,CFLAGS)
|
6df22d | 1999-08-27 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG([-Wp,-H50000],cpp_buffer_size,CFLAGS)
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG(+ESlit,plus_ESlit,OPTIMIZE)
AC_SYS_COMPILER_FLAG(+Odataprefetch,plus_Odataprefetch,OPTIMIZE)
AC_SYS_COMPILER_FLAG(+Ofailsafe,plus_Ofailsafe,OPTIMIZE)
AC_SYS_COMPILER_FLAG(+O3,plus_O3,OPTIMIZE)
# Ignore the following warnings if you enable +w1
# 414 Optimization reduced to +O2 for compatibility with Debug.
# 530 Casting from loose to strict alignment
# 558 Empty declaration.
# AC_SYS_COMPILER_FLAG(+w1,plus_w1,WARN)
])
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | |
# OSF/1
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(OSF1,
[
AC_SYS_COMPILER_FLAG(-fast,fast,OPTIMIZE)
# The need for -ieee is not detected properly by the FPE tests below.
# AC_SYS_COMPILER_FLAG(-ieee,ieee,CFLAGS)
AC_SYS_COMPILER_FLAG(-readonly_strings,readonly_strings,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-assume trusted_short_alignment,
assume_trusted_short_alignment,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-assume aligned_objects,
assume_aligned_objects,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-no_misalign,no_misalign,OPTIMIZE)
if test "x$with_cdebug" = "xyes" ; then
# FIXME:
# Maybe should remove the -g flag if this succeeds.
AC_SYS_COMPILER_FLAG(-g3,g3,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-trapuv,trapuv,WARN)
fi
AC_SYS_COMPILER_FLAG(-host,host,OPTIMIZE)
|
633b03 | 1998-07-16 | Fredrik Hübinette (Hubbe) | |
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | # Flags that cause errors or change compiler behaviour
# must go in CFLAGS, they can not go in WARN
# /Hubbe
AC_SYS_COMPILER_FLAG(-std1,std1,CFLAGS)
AC_SYS_COMPILER_FLAG(-warnprotos,warnprotos,WARN)
])
|
a89700 | 1997-04-10 | Fredrik Hübinette (Hubbe) | |
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | | # IRIX
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | DO_IF_OS(IRIX,
[
# sopt disabled since it takes too long time on interpret.c (>45min on an O²)
# AC_SYS_COMPILER_FLAG(-sopt,sopt,OPTIMIZE)
# -n32 moved to smartlink so it will affekt cc as well as linker
# this way the user can override it by setting LDFLAGS and/or CFLAGS
# AC_SYS_COMPILER_FLAG(-n32,n32,CFLAGS)
AC_SYS_COMPILER_FLAG(-fullwarn,fullwarn,WARN)
|
c4c6c7 | 2000-03-27 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-woff 1209,woff_1209,WARN)
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | if test x$with_cdebug = xyes ; then
AC_SYS_COMPILER_FLAG(-g3,g3,OPTIMIZE)
fi
if test x$with_rtldebug = xyes ; then
AC_SYS_COMPILER_FLAG(-trapuw,trapuw,WARN)
fi
])
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | |
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | | # Windows NT
DO_IF_OS(Windows_NT,
[
# FIXME: The test below probably doesn't work.
|
69bae8 | 2000-08-20 | Henrik Grubbström (Grubba) | | if echo "x$CC" | grep "rntecl" >/dev/null 2>&1; then
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | | # Some options used by ecl (Intel's IA64 compiler).
# We want threads, and link libc statically.
AC_SYS_COMPILER_FLAG(-MT,MT,LDFLAGS)
# Interprocedural optimizations.
|
2e8e8f | 2000-08-21 | Henrik Grubbström (Grubba) | | # For some reason this seems to cause the error:
# dynamic_buffer.obj : error LNK2001: unresolved external symbol "[Entry] ?1memcpy" (.?1memcpy)
# AC_SYS_COMPILER_FLAG(-Qip,Qip,OPTIMIZE)
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | |
# More warnings.
|
69bae8 | 2000-08-20 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-W3,W3,WARN)
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | |
|
6a2089 | 2000-05-01 | Henrik Grubbström (Grubba) | | if test x$with_rtldebug = xyes ; then
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | | # Initialize auto variables to 0xcc.
# (Only if optimizations are turned off with -Od).
AC_SYS_COMPILER_FLAG(-GZ,GZ,WARN)
fi
else :; fi
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | |
|
9b15e0 | 2000-12-22 | Fredrik Hübinette (Hubbe) | | # Only do this explicitly for now
|
82d909 | 2000-12-14 | Martin Nilsson | | if test x$with_dynamic_modules = xyes ; then
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | AC_MSG_WARN([Enabling dynamic modules for Win32])
|
9b15e0 | 2000-12-22 | Fredrik Hübinette (Hubbe) | | # EXTRA_MODULE_REQUIREMENTS="${EXTRA_MODULE_REQUIREMENTS} import_functions.h"
EXTRA_OBJS="${EXTRA_OBJS} dlopen.o"
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | pike_cv_sys_dynamic_loading=yes
with_dynamic_modules=yes
|
9b15e0 | 2000-12-22 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(USE_MY_WIN32_DLOPEN)
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | fi
|
a747c4 | 2000-05-01 | Henrik Grubbström (Grubba) | | ])
|
a89700 | 1997-04-10 | Fredrik Hübinette (Hubbe) | | dnl
|
a9d05c | 1997-04-10 | Fredrik Hübinette (Hubbe) | | dnl This does not work with Digital UNIX cc/ld (cc thinks it is ok, ld does not)
|
a89700 | 1997-04-10 | Fredrik Hübinette (Hubbe) | | dnl
|
e8ab9c | 1997-11-03 | Henrik Grubbström (Grubba) | | dnl AC_SYS_COMPILER_FLAG(-native,native,OPTIMIZE)
|
a9d05c | 1997-04-10 | Fredrik Hübinette (Hubbe) | | dnl
|
300af1 | 1997-04-15 | Fredrik Hübinette (Hubbe) | |
|
a9d05c | 1997-04-10 | Fredrik Hübinette (Hubbe) | | dnl ### Ok. This is for apcc...
|
300af1 | 1997-04-15 | Fredrik Hübinette (Hubbe) | | case "$CC" in
*apcc)
|
e8ab9c | 1997-11-03 | Henrik Grubbström (Grubba) | | AC_SYS_COMPILER_FLAG(-XO=5,apcc_opt,OPTIMIZE)
AC_SYS_COMPILER_FLAG(-Xcallmod=2,apcc_opt_2,OPTIMIZE)
|
300af1 | 1997-04-15 | Fredrik Hübinette (Hubbe) | | ;;
esac
|
8cf37d | 1997-01-27 | Per Hedbor | |
|
b582fe | 1997-11-23 | Per Hedbor | | # Old cc for solaris.
# AC_SYS_CPU_COMPILER_FLAG(sun4m,-Xpipe=micro,microsparc,OPTIMIZE)
# AC_SYS_CPU_COMPILER_FLAG(sun4d,-Xpipe=super,supersparc,OPTIMIZE)
# AC_SYS_CPU_COMPILER_FLAG(sun4u,-Xpipe=super,ultrasparc,OPTIMIZE)
|
8cf37d | 1997-01-27 | Per Hedbor | |
|
fde5a6 | 1997-09-05 | Henrik Grubbström (Grubba) | | case "${CFLAGS-} $OPTIMIZE" in
|
2a7fc8 | 1999-11-29 | Boyd Lynn Gerber | | *-O*) ;;
*+O*) ;;
*-fast*) ;;
*)
case "$pike_cv_sys_os:$GCC" in
UnixWare*:no)
OPTIMIZE=""
;;
*)
AC_SYS_COMPILER_FLAG(-O2,O2,OPTIMIZE)
if test "x$pike_cv_option_O2" != "xyes"; then
AC_SYS_COMPILER_FLAG(-O,O,OPTIMIZE)
fi
;;
esac
;;
|
8cf37d | 1997-01-27 | Per Hedbor | | esac
|
992568 | 1996-10-11 | Fredrik Hübinette (Hubbe) | | fi
|
7e663c | 1999-04-25 | Henrik Grubbström (Grubba) | | fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | fi
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | |
|
2565f4 | 1997-02-26 | Fredrik Hübinette (Hubbe) | | if test ! -d modules/. ; then
|
cb728c | 1997-01-12 | Henrik Grubbström (Grubba) | | mkdir modules
fi
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | |
#############################################################################
## Search for some popular places where libraries may be hidden.
#############################################################################
|
08af09 | 2000-04-12 | Marcus Comstedt | | if test x$"pike_cv_sys_os" != xWindows_NT ; then
|
a12f27 | 1998-01-10 | Fredrik Hübinette (Hubbe) | |
|
d93ff5 | 1997-11-02 | Henrik Grubbström (Grubba) | | echo Searching for include-file directories...
|
8a947f | 1998-09-01 | Fredrik Hübinette (Hubbe) | |
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | | if test $cppflags_is_set = no -a x${C_INCLUDE_PATH-} = x ; then
|
8a947f | 1998-09-01 | Fredrik Hübinette (Hubbe) | | real_include_dirs=''
|
c96ea2 | 1998-04-04 | Henrik Grubbström (Grubba) | | for d in `echo ${with_include_path} | sed 's/:/ /g'` \
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | `echo $prefix | sed "s@^NONE@$with_root$ac_default_prefix@g"`/include \
$with_root/usr/local/include $with_root/sw/local/include \
$with_root/usr/gnu/include $with_root/opt/gnu/include \
$with_root/sw/gnu/include $with_root/sw/include \
$with_root/usr/freeware/include $with_root/usr/pkg/include \
`echo $with_root/usr/X11*/include | sort -r` $srcdir `pwd`
|
900def | 1997-01-12 | Henrik Grubbström (Grubba) | | do
|
04a925 | 1998-03-21 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING($d)
|
d3e25e | 1998-07-15 | Fredrik Hübinette (Hubbe) | | case x$d in
x/usr/include | x/usr//include)
;;
*)
if test -d "$d/." ; then
|
8a947f | 1998-09-01 | Fredrik Hübinette (Hubbe) | | REALDIR="`cd $d/. ; /bin/pwd`"
if test "x$REALDIR" = x ; then
REALDIR=UNKNOWN
else
:
fi
case " $CPPFLAGS $real_include_dirs " in
*\ -I$d\ * | *\ -I$REALDIR\ *)
AC_MSG_RESULT(already added)
;;
*)
AC_MSG_RESULT(added)
CPPFLAGS="${CPPFLAGS} -I$d"
if test "x$REALDIR" != xUNKNOWN; then
real_include_dirs="${real_include_dirs} -I$REALDIR"
else
:
fi
;;
esac
|
d3e25e | 1998-07-15 | Fredrik Hübinette (Hubbe) | | else
AC_MSG_RESULT(no)
fi
;;
esac
|
900def | 1997-01-12 | Henrik Grubbström (Grubba) | | done
|
cb728c | 1997-01-12 | Henrik Grubbström (Grubba) | | else
:
|
900def | 1997-01-12 | Henrik Grubbström (Grubba) | | fi
|
d93ff5 | 1997-11-02 | Henrik Grubbström (Grubba) | |
|
8a947f | 1998-09-01 | Fredrik Hübinette (Hubbe) | | #CPPFLAGS="${CPPFLAGS} -I$srcdir -I`pwd`"
|
0c73e9 | 1998-05-22 | Henrik Grubbström (Grubba) | |
|
d93ff5 | 1997-11-02 | Henrik Grubbström (Grubba) | | echo Searching for library directories...
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | | if test $ldflags_is_set = no ; then
|
22f951 | 1998-04-04 | Henrik Grubbström (Grubba) | | for d in `echo ${with_lib_path} | sed 's/:/ /g'` \
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | `echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$with_root$ac_default_prefix/lib@g"` \
$with_root/usr/local/lib $with_root/sw/local/lib $with_root/sw/lib \
$with_root/usr/gnu/lib $with_root/opt/gnu/lib $with_root/sw/gnu/lib \
$with_root/usr/freeware/lib $with_root/usr/pkg/lib \
`echo $with_root/usr/X11*/lib | sort -r`
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | | do
|
04a925 | 1998-03-21 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING($d)
if test -d "$d/." ; then
|
8a947f | 1998-09-01 | Fredrik Hübinette (Hubbe) | | case " $LDFLAGS " in
*\ -L$d\ -R$d\ * | *\ -R$d\ -L$d\ *)
AC_MSG_RESULT(already added)
;;
*)
AC_MSG_RESULT(added)
LDFLAGS="${LDFLAGS} -R$d -L$d"
;;
esac
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | | else
|
6fa228 | 1997-11-04 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT(no)
|
c0911b | 1997-10-03 | Henrik Grubbström (Grubba) | | fi
done
else
:
fi
|
c67b69 | 1996-11-16 | Fredrik Hübinette (Hubbe) | |
|
6fa228 | 1997-11-04 | Henrik Grubbström (Grubba) | | echo Searching for binary directories...
|
cf3990 | 2001-01-19 | Henrik Grubbström (Grubba) | | for d in `echo $exec_prefix | sed "s@^NONE@$prefix@g" | sed "s@^NONE@$with_root$ac_default_prefix@g"` \
"$with_root" $with_root/usr $with_root/usr/ccs $with_root/usr/vac \
$with_root/usr/local $with_root/sw/local $with_root/usr/gnu \
$with_root/opt/gnu $with_root/sw/gnu $with_root/sw \
$with_root/usr/freeware $with_root/usr/pkg
|
6fa228 | 1997-11-04 | Henrik Grubbström (Grubba) | | do
AC_MSG_CHECKING($d/bin)
if test -d "$d/bin/." ; then
AC_MSG_RESULT(added)
EXTRA_PATH="${EXTRA_PATH}:$d/bin"
else
AC_MSG_RESULT(no)
fi
done
export EXTRA_PATH
|
a12f27 | 1998-01-10 | Fredrik Hübinette (Hubbe) | | else
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | # We are running NT
CPPFLAGS="${CPPFLAGS} -I$srcdir -I`pwd`"
|
a12f27 | 1998-01-10 | Fredrik Hübinette (Hubbe) | | fi
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
bf622c | 1997-09-19 | Henrik Grubbström (Grubba) | | ## At this point we have at last initialized the compiler!
#############################################################################
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | if test ! -f confdefs.h ; then
AC_MSG_WARN([Warning, lost confdefs.h, testing will be flawed!!
You might need to use bash instead of /bin/sh to get correct results.
To do this, please type the following at an sh prompt:
\$ rm ./config.cache
\$ CONFIG_SHELL=/path/to/bash
\$ export CONFIG_SHELL
\$ $CONFIG_SHELL ./configure
])
fi
#############################################################################
|
99ed77 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(POSIX_SOURCE)
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(ansi prototype capability)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_sys_ansi_prototypes,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
|
658f1a | 1997-01-26 | Fredrik Hübinette (Hubbe) | | AC_TRY_COMPILE([int foo(int bar);],[],
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | [pike_cv_sys_ansi_prototypes=yes],
[pike_cv_sys_ansi_prototypes=no])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | ])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_sys_ansi_prototypes" = "yes"; then
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no, giving up...)
exit 1
fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
992568 | 1996-10-11 | Fredrik Hübinette (Hubbe) | |
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
7ac9c1 | 1998-12-03 | Henrik Grubbström (Grubba) | | # The AC_PROG_INSTALL test is broken if $INSTALL is specified by hand.
# The FreeBSD ports system does this...
# Workaround:
if test "x$INSTALL" = "x"; then :; else
# $INSTALL overrides ac_cv_path_install anyway...
ac_cv_path_install="$INSTALL"
fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_PROG_INSTALL
AC_PROG_CPP
AC_PROG_RANLIB
AC_SET_MAKE
|
02c964 | 2000-12-18 | Fredrik Hübinette (Hubbe) | | if test "x${AR-}" = x ; then
AC_PATH_PROG(AR, ar, ar, $PATH:$EXTRA_PATH)
export AR
fi
|
6fa228 | 1997-11-04 | Henrik Grubbström (Grubba) | | AC_SUBST(AR)
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
9fe0a0 | 1997-08-16 | Henrik Grubbström (Grubba) | | # installbsd seems to be broken on some versions of AIX
#
# /grubba 1997-08-16
case "$ac_cv_path_install" in
*installbsd*)
AC_MSG_CHECKING(if $ac_cv_path_install works)
AC_CACHE_VAL(pike_cv_install_works,
[
if $ac_cv_path_install "$srcdir/configure.in" ./conftest >/dev/null 2>&1
then
if cmp "$srcdir/configure.in" ./conftest >/dev/null 2>&1; then
pike_cv_install_works=yes;
else
pike_cv_install_works=no;
fi
else
pike_cv_install_works=no;
fi
if test -f ./conftest; then
rm -f ./conftest
fi
])
AC_MSG_RESULT($pike_cv_install_works)
if test "$pike_cv_install_works" = "no"; then
echo "Warning: Falling back to $ac_install_sh"
INSTALL="$ac_install_sh"
fi
;;
esac
#############################################################################
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(for yacc clone that handles %pure_parser)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_prog_working_yacc,
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | [
|
4e2e07 | 1998-11-16 | Fredrik Hübinette (Hubbe) | | for YACC in pyacc byacc "bison -y" yacc "None"; do
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | set dummy $YACC; ac_word=$2
has_it=no
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
has_it="yes"
break
|
8f4288 | 1996-03-01 | Fredrik Hübinette (Hubbe) | | fi
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | done
IFS="$ac_save_ifs"
if test "$has_it" = "yes"; then
cat >conftest.y<<\EOF
%pure_parser
%{
void parse();
void yyerror(char *);
%}
%%
all: foo bar
foo: 'f' 'o' 'o' { parse(); } ;
bar: 'b' 'a' 'r' ;
%%
int context;
|
8f4288 | 1996-03-01 | Fredrik Hübinette (Hubbe) | |
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | int yylex(YYSTYPE *yylval)
{
switch(context++)
{
case 0: return 'f';
case 1: return 'o';
case 2: return 'o';
case 3: return 'b';
case 4: return 'a';
case 5: return 'r';
default: return 0;
}
}
int depth=0;
void parse()
{
int tmp;
if(depth++>5) return;
tmp=context;
context=0;
yyparse();
context=tmp;
}
int errors=0;
void yyerror(char *fel) { errors++; }
int main()
{
parse();
exit(errors);
}
EOF
if $YACC -d conftest.y 1>&5 2>&5; then
AC_TRY_RUN([
#include "y.tab.c"
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ],pure_parser_works=yes,pure_parser_works=no,pure_parser_works=no)
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | if test "$pure_parser_works" = "yes"; then
break
fi
fi
|
8f4288 | 1996-03-01 | Fredrik Hübinette (Hubbe) | | fi
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | done
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_prog_working_yacc="$YACC"
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | ])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | YACC="$pike_cv_prog_working_yacc"
|
4943ca | 1997-04-21 | Fredrik Hübinette (Hubbe) | |
if test "x$YACC" = "xNone" ; then
AC_MSG_RESULT('Get bison if you want to do "make export"')
YACC="bison -y"
else
AC_MSG_RESULT($YACC)
fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
bf622c | 1997-09-19 | Henrik Grubbström (Grubba) | | ## At this point we have found all binaries we are going to use.
#############################################################################
AC_C_CONST
|
3bb83a | 1997-09-22 | Henrik Grubbström (Grubba) | | # The above doesn't find IBM C's buggy const.
if test "$ac_cv_c_const" = "yes"; then
AC_MSG_CHECKING(if const really does work)
|
897653 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_c_really_const,[
AC_TRY_COMPILE([
|
3bb83a | 1997-09-22 | Henrik Grubbström (Grubba) | | const int foo(int bar) { return bar; }
|
897653 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | ], [
return bar(0);
], [
pike_cv_c_really_const=yes
], [
pike_cv_c_really_const=no
])
|
3bb83a | 1997-09-22 | Henrik Grubbström (Grubba) | | ])
|
897653 | 1997-12-22 | Fredrik Hübinette (Hubbe) | |
AC_MSG_RESULT($pike_cv_c_really_const)
if test "x$pike_cv_c_really_const" = xno ; then
AC_DEFINE(const, [])
else
:
fi
|
3bb83a | 1997-09-22 | Henrik Grubbström (Grubba) | | fi
|
82c04f | 1999-04-25 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(if we can cast void * to a function pointer)
AC_CACHE_VAL(pike_cv_function_cast, [
AC_TRY_COMPILE([
void *foo = 0;
],[
void (*bar)(void) = (void (*)(void)) foo;
],[ pike_cv_function_cast="yes" ], [ pike_cv_function_cast="no" ])
])
if test "$pike_cv_function_cast" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_DEFINE(NO_CAST_TO_FUN)
fi
|
bf622c | 1997-09-19 | Henrik Grubbström (Grubba) | | #############################################################################
|
693018 | 1996-02-25 | Fredrik Hübinette (Hubbe) | | AC_HEADER_TIME
AC_HEADER_STDC
|
5ebdb5 | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CHECK_HEADERS(sys/rusage.h time.h sys/time.h sys/types.h unistd.h stdlib.h \
|
d4debf | 1997-05-19 | Henrik Grubbström (Grubba) | | memory.h values.h string.h strings.h fcntl.h sys/filio.h sys/sockio.h crypt.h \
|
7cccc5 | 2000-12-27 | Mirar (Pontus Hagland) | | locale.h sys/select.h net/socket.h sys/mman.h setjmp.h \
|
3d6e5c | 2000-08-17 | Henrik Grubbström (Grubba) | | limits.h pthread.h crt/signal.h sys/id.h \
|
423839 | 1998-07-09 | Francesco Chemolli | | thread.h dlfcn.h dld.h dl.h sys/times.h sched.h sys/procfs.h sys/param.h \
winsock.h sys/ioct.h sys/socket.h malloc.h netinet/in.h sys/wait.h winbase.h \
grp.h pwd.h passwd.h group.h winsock2.h signal.h sys/file.h poll.h sys/poll.h \
|
3adb2f | 2000-08-28 | Fredrik Hübinette (Hubbe) | | socket.h ieeefp.h fp_class.h floatingpoint.h sys/priocntl.h sys/sched.h \
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | | windows.h errno.h stddef.h mmx.h)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
7cccc5 | 2000-12-27 | Mirar (Pontus Hagland) | | # some Linux systems have a broken resource.h that compiles anyway /Mirar
|
c5cbce | 2000-12-27 | Mirar (Pontus Hagland) | | AC_MSG_CHECKING([for sys/resource.h])
|
4492cc | 2000-12-28 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_sys_resource_h, [
AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
|
b5fac7 | 2000-12-28 | Henrik Grubbström (Grubba) | | #ifdef HAVE_TIME_H
#include <time.h>
#endif /* HAVE_TIME_H */
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif /* HAVE_SYS_TIME_H */
|
4492cc | 2000-12-28 | Henrik Grubbström (Grubba) | |
#include <sys/resource.h>
],[],
[pike_cv_sys_resource_h=yes], [pike_cv_sys_resource_h=no])
])
|
c5cbce | 2000-12-27 | Mirar (Pontus Hagland) | | if test "x$pike_cv_sys_resource_h" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SYS_RESOURCE_H)
else
AC_MSG_RESULT(no)
fi
|
7cccc5 | 2000-12-27 | Mirar (Pontus Hagland) | |
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | AC_CHECK_SIZEOF(char *,4)
|
d0d62b | 2000-08-18 | Henrik Grubbström (Grubba) | | AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(__int64, 8)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
6f7df8 | 2000-06-29 | Henrik Grubbström (Grubba) | | AC_MY_CHECK_TYPE(size_t,unsigned long)
AC_MY_CHECK_TYPE(ptrdiff_t,long)
|
1e577b | 1999-07-15 | Fredrik Hübinette (Hubbe) | | AC_MY_CHECK_TYPE(off_t,long)
AC_MY_CHECK_TYPE(pid_t,int)
AC_MY_CHECK_TYPE(uid_t,int)
AC_MY_CHECK_TYPE(gid_t,int)
AC_MY_CHECK_TYPE(time_t,INT32)
AC_MY_CHECK_TYPE(pri_t, short)
|
693018 | 1996-02-25 | Fredrik Hübinette (Hubbe) | | AC_TYPE_SIGNAL
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | dnl AC_CHECK_LIB(PW, alloca)
|
b04d5f | 1996-07-08 | Fredrik Hübinette (Hubbe) | |
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | AC_CHECK_LIB(m, floor)
|
dc5da7 | 1997-11-03 | Henrik Grubbström (Grubba) | |
AC_CHECK_LIB(socket, socket)
|
a12f27 | 1998-01-10 | Fredrik Hübinette (Hubbe) | |
|
08af09 | 2000-04-12 | Marcus Comstedt | | if test x"$pike_cv_sys_os" = xWindows_NT ; then
|
d87ab4 | 2000-08-17 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(if we should use the 64 bit API)
AC_CACHE_VAL(pike_cv_sys_win64, [
AC_EGREP_CPP(yes, [
#if defined(_WIN64) || defined(__WIN64__)
yes
#else
no
#endif
], [ pike_cv_sys_win64=yes ], [ pike_cv_sys_win64=no ])
])
if test "x$pike_cv_sys_win64" = "xyes"; then
AC_MSG_RESULT(yes)
|
e71885 | 2000-08-18 | Henrik Grubbström (Grubba) | | # Apparently the libraries are stilled named *32...
# LIBS="-lkernel64 -lws2_64 -ladvapi64 $LIBS"
LIBS="-lkernel32 -lws2_32 -ladvapi32 $LIBS"
|
d87ab4 | 2000-08-17 | Henrik Grubbström (Grubba) | | else
AC_MSG_RESULT(no)
LIBS="-lkernel32 -lws2_32 -ladvapi32 $LIBS"
fi
|
a12f27 | 1998-01-10 | Fredrik Hübinette (Hubbe) | | fi
|
dc5da7 | 1997-11-03 | Henrik Grubbström (Grubba) | | AC_CHECK_LIB(nsl, gethostbyname)
|
dac637 | 1999-10-17 | Mirar (Pontus Hagland) | | AC_CHECK_LIB(rt, nanosleep)
|
dc5da7 | 1997-11-03 | Henrik Grubbström (Grubba) | |
|
ca74dd | 1996-10-08 | Fredrik Hübinette (Hubbe) | | AC_CHECK_LIB(dl, dlopen)
|
423839 | 1998-07-09 | Francesco Chemolli | | AC_CHECK_LIB(dld, shl_load)
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | AC_CHECK_LIB(dld, dld_link)
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
d98e0d | 1997-01-15 | Fredrik Hübinette (Hubbe) | |
if test "${pike_cv_sys_os}" = "Linux"; then
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | if test "${ac_cv_lib_m_floor}" = "no"; then
|
d98e0d | 1997-01-15 | Fredrik Hübinette (Hubbe) | | AC_MSG_WARN(I will compensate for this by adding -lc -lm)
LIBS="${LIBS} -lc -lm"
fi
|
f8663d | 1997-09-16 | Henrik Grubbström (Grubba) | |
if test "$ac_cv_header_sched_h" = "yes"; then
AC_MSG_CHECKING(if sched.h has a typo)
AC_CACHE_VAL(pike_cv_broken_sched_h, [
AC_TRY_COMPILE([
#include <sched.h>
],[ ],[ pike_cv_broken_shed_h=no ], [
OLDCPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_P=__P"
AC_TRY_COMPILE([
#include <sched.h>
],[ ],[ pike_cv_broken_sched_h=yes ],[
pike_cv_broken_sched_h="very broken"
])
CPPFLAGS="$OLDCPPFLAGS"
])
])
AC_MSG_RESULT($pike_cv_broken_sched_h)
if test "$pike_cv_broken_sched_h" = "yes"; then
AC_MSG_WARN(Applying workaround)
CPPFLAGS="$CPPFLAGS -D_P=__P"
fi
fi
|
d10ed5 | 1995-11-15 | Fredrik Hübinette (Hubbe) | | fi
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
eec137 | 1996-11-02 | Fredrik Hübinette (Hubbe) | | if test x$with_threads = xyes ; then
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | OLDLIBS="$LIBS"
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | OLDCFLAGS="$CFLAGS"
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
b1f4eb | 1998-01-13 | Fredrik Hübinette (Hubbe) | | if test "x$pike_cv_sys_os" = "xWindows_NT" ; then
# NT has threads...
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
AC_DEFINE(_UNIX_THREADS)
AC_DEFINE(NT_THREADS)
|
67bbf0 | 1999-08-10 | Henrik Grubbström (Grubba) | | AC_DEFINE(PIKE_THREADS)
|
b1f4eb | 1998-01-13 | Fredrik Hübinette (Hubbe) | |
else
|
9ab446 | 1998-11-06 | Honza Petrous | | # Test for POSIX threads
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | case "x$pike_cv_sys_os" in
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | xOSF1*)
|
d4ac01 | 2000-03-29 | Fredrik Hübinette (Hubbe) | | # LIBS="${OLDLIBS} -lpthread -lmach -lexc -lc"
LIBS="${OLDLIBS} -lpthread -lmach -lexc"
|
9ab446 | 1998-11-06 | Honza Petrous | | ;;
xBSD/OS*)
LIBS="${OLDLIBS}"
;;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | xUnixWare*)
|
902224 | 1998-08-27 | Honza Petrous | | if test "$GCC" = yes ; then
|
0d5111 | 2000-04-10 | Boyd Lynn Gerber | | CFLAGS="${CFLAGS} -pthread"
|
902224 | 1998-08-27 | Honza Petrous | | else
|
9ab446 | 1998-11-06 | Honza Petrous | | CFLAGS="${CFLAGS} -Kthread"
|
902224 | 1998-08-27 | Honza Petrous | | fi
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | ;;
|
080971 | 1998-02-27 | Marcus Comstedt | |
|
9ab446 | 1998-11-06 | Honza Petrous | | xFreeBSD*)
# Threads on FreeBSD earlier than 1998-06-07 are broken.
LIBS="${OLDLIBS}"
AC_MSG_CHECKING(if this version of FreeBSD may have working threads)
AC_CACHE_VAL(pike_cv_freebsd_threads, [
AC_TRY_RUN([
|
54905d | 1998-06-16 | Henrik Grubbström (Grubba) | | #include <osreldate.h>
int main(int argc, char **argv)
{
|
fc84cc | 1998-12-03 | Henrik Grubbström (Grubba) | | /* FreeBSD before 228000 and 300000 - 300005 have broken threads.
|
8e4842 | 1998-06-17 | Henrik Grubbström (Grubba) | | */
|
fc84cc | 1998-12-03 | Henrik Grubbström (Grubba) | | if (__FreeBSD_version < 228000)
|
54905d | 1998-06-16 | Henrik Grubbström (Grubba) | | return(1);
if (__FreeBSD_version < 300000)
return(0);
|
fc84cc | 1998-12-03 | Henrik Grubbström (Grubba) | | if (__FreeBSD_version < 300006)
|
54905d | 1998-06-16 | Henrik Grubbström (Grubba) | | return(1);
return(0);
}
|
9ab446 | 1998-11-06 | Honza Petrous | | ], pike_cv_freebsd_threads=yes, pike_cv_freebsd_threads=no,
pike_cv_freebsd_threads=yes)
])
if test "x$pike_cv_freebsd_threads" = "xno"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
|
f369dd | 2000-03-26 | Fredrik Hübinette (Hubbe) | |
AC_PATH_PROG(PTHREAD_CONFIG,pthread-config,no)
|
95013b | 2000-03-27 | Dan Nelson | | if test "x$PTHREAD_CONFIG" = xno ; then
|
f369dd | 2000-03-26 | Fredrik Hübinette (Hubbe) | | CFLAGS="${CFLAGS} -pthread"
LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS-} -lc_r"
|
fcf073 | 2000-03-28 | Fredrik Hübinette (Hubbe) | |
AC_MSG_CHECKING(Initial stack limit)
AC_CACHE_VAL(pike_cv_initial_stack_size,[
AC_TRY_RUN([
#include <stdio.h>
static int depth=0;
FILE *f;
void save_depth(void);
void use_stack(void *page)
{
void *X[8190];
X[0]=page;
save_depth();
use_stack(&X);
}
void save_depth(void)
{
depth+=sizeof(void *)*8192;
fprintf(f,"%d\n",depth);
fflush(f);
if(depth>0x80000000) exit(0);
}
int main(int argc)
{
f=fopen("confdefs.out.2","w"); /* weird filename to circumvent configure weirdness */
save_depth();
use_stack(0);
}
],
pike_cv_initial_stack_size='',
while read x; do pike_cv_initial_stack_size=$x ; done <confdefs.out.2)
rm confdefs.out.2 >/dev/null 2>/dev/null || :
])
if test x$pike_cv_initial_stack_size = x ; then
AC_MSG_RESULT(unlimited)
else
AC_MSG_RESULT($pike_cv_initial_stack_size)
AC_DEFINE_UNQUOTED(Pike_INITIAL_STACK_SIZE,$pike_cv_initial_stack_size)
fi
|
f369dd | 2000-03-26 | Fredrik Hübinette (Hubbe) | | else
CFLAGS="$CFLAGS `pthread-config --cflags`"
LIBS="$LIBS `pthread-config --libs`"
LDFLAGS="$CFLAGS `pthread-config --ldflags`"
fi
|
9ab446 | 1998-11-06 | Honza Petrous | | fi
;;
|
c371d4 | 1998-06-07 | Simon Coggins | |
|
9ab446 | 1998-11-06 | Honza Petrous | | xAIX*)
|
ea63a7 | 2000-12-19 | Henrik Grubbström (Grubba) | | if test "`uname -v`" -gt 4 ; then
LIBS="${OLDLIBS} -lpthread"
else
LIBS="${OLDLIBS} -lpthreads -lc_r"
fi
|
9ab446 | 1998-11-06 | Honza Petrous | | ;;
|
b1335c | 1998-07-03 | Francesco Chemolli | |
|
73ea7f | 2000-07-09 | Henrik Grubbström (Grubba) | | xSolaris*)
# Some versions of Solaris 2.5.1 require linking with -lthread too.
LIBS="${OLDLIBS} -lpthread -lthread"
;;
|
66a374 | 2000-10-02 | Jonas Wallden | | xDarwin*)
LIBS="${OLDLIBS}"
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | *)
LIBS="${OLDLIBS} -lpthread"
;;
esac
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | |
|
e5f982 | 2000-10-03 | Henrik Grubbström (Grubba) | | AC_CHECK_FUNCS(pthread_init pthread_mutexattr_init pthread_kill)
|
8b1407 | 1997-10-03 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_CHECKING(posix threads)
|
b27ea3 | 1997-10-25 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_CACHE_VAL(pike_cv_posix_threads, [
AC_TRY_RUN([
|
aeafe1 | 1997-01-26 | Per Hedbor | | #define _REENTRANT
#define _THREAD_SAFE
|
f14742 | 1997-03-12 | Fredrik Hübinette (Hubbe) | | #define _MIT_POSIX_THREADS 1
|
aeafe1 | 1997-01-26 | Per Hedbor | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | #include <pthread.h>
|
eea7c2 | 1997-09-11 | Henrik Grubbström (Grubba) | | void *foo(void *bar) { pthread_exit(0); return 0; }
|
158e9f | 1997-03-10 | Henrik Grubbström (Grubba) | | pthread_mutexattr_t attr;
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | pthread_mutex_t tmp;
pthread_t gazonk;
int main()
{
void *sune;
|
8b1407 | 1997-10-03 | Henrik Grubbström (Grubba) | | #ifdef HAVE_PTHREAD_INIT
pthread_init();
#endif /* HAVE_PTHREAD_INIT */
|
080971 | 1998-02-27 | Marcus Comstedt | | #ifdef HAVE_PTHREAD_MUTEXATTR_INIT
|
158e9f | 1997-03-10 | Henrik Grubbström (Grubba) | | pthread_mutexattr_init(&attr);
|
080971 | 1998-02-27 | Marcus Comstedt | | #else
memset(&attr, 0, sizeof(attr));
|
f601ac | 1998-03-06 | Francesco Chemolli | | #endif /* HAVE_PTHREAD_MUTEXATTR_INIT */
|
158e9f | 1997-03-10 | Henrik Grubbström (Grubba) | | pthread_mutex_init(&tmp, &attr);
pthread_mutex_lock(&tmp);
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | pthread_create(&gazonk,0,foo,0);
pthread_join(gazonk,&sune);
exit(0);
}
|
9ab446 | 1998-11-06 | Honza Petrous | | ],pike_cv_posix_threads=yes,pike_cv_posix_threads=no,pike_cv_posix_threads=no)
])
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | if test $pike_cv_posix_threads = yes ; then
AC_MSG_RESULT(yes)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
AC_DEFINE(_MIT_POSIX_THREADS,1)
|
67bbf0 | 1999-08-10 | Henrik Grubbström (Grubba) | | AC_DEFINE(PIKE_THREADS)
|
9ab446 | 1998-11-06 | Honza Petrous | |
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | ##########################################################################
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_CHECKING(for pthread_attr_setstacksize)
AC_CACHE_VAL(pike_cv_have_pthread_attr_setstacksize,[
AC_TRY_LINK([#include <pthread.h>
void foo(pthread_attr_t*x) { pthread_attr_setstacksize(x, 1024*1024); }
],[],[
pike_cv_have_pthread_attr_setstacksize=yes
],[
pike_cv_have_pthread_attr_setstacksize=no
|
8d4ce8 | 1997-04-10 | Fredrik Hübinette (Hubbe) | | ])
|
9ab446 | 1998-11-06 | Honza Petrous | | ])
AC_MSG_RESULT($pike_cv_have_pthread_attr_setstacksize)
if test x$pike_cv_have_pthread_attr_setstacksize = xyes ; then
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE)
else
:
fi
|
8d4ce8 | 1997-04-10 | Fredrik Hübinette (Hubbe) | |
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | ##########################################################################
AC_MSG_CHECKING(for pthread_atfork)
AC_CACHE_VAL(pike_cv_have_pthread_atfork,[
AC_TRY_LINK([#include <pthread.h>
void foo(void) { pthread_atfork(0,0,0); }
],[],[
pike_cv_have_pthread_atfork=yes
],[
pike_cv_have_pthread_atfork=no
])
])
|
d20187 | 1999-08-30 | Fredrik Hübinette (Hubbe) | | if test x$pike_cv_have_pthread_atfork = xyes ; then
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_ATFORK)
else
AC_MSG_RESULT([no - FreeBSD?])
fi
##########################################################################
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_CHECKING(for pthread_yield)
AC_CACHE_VAL(pike_cv_have_pthread_yield,[
AC_TRY_LINK([#include <pthread.h>
void foo(void) { pthread_yield(); }
],[],[
pike_cv_have_pthread_yield=yes
],[
pike_cv_have_pthread_yield=no
|
8d4ce8 | 1997-04-10 | Fredrik Hübinette (Hubbe) | | ])
|
9ab446 | 1998-11-06 | Honza Petrous | | ])
AC_MSG_RESULT($pike_cv_have_pthread_yield)
if test x$pike_cv_have_pthread_yield = xyes ; then
AC_DEFINE(HAVE_PTHREAD_YIELD)
else
:
fi
|
8d4ce8 | 1997-04-10 | Fredrik Hübinette (Hubbe) | |
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | ##########################################################################
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_CHECKING(for pthread_cond_init)
AC_CACHE_VAL(pike_cv_have_pthread_cond_init,[
AC_TRY_LINK([#include <pthread.h>
void foo(pthread_cond_t*x, pthread_condattr_t*y) { pthread_cond_init(x,y); }
],[],[
pike_cv_have_pthread_cond_init=yes
],[
pike_cv_have_pthread_cond_init=no
|
8d4ce8 | 1997-04-10 | Fredrik Hübinette (Hubbe) | | ])
|
9ab446 | 1998-11-06 | Honza Petrous | | ])
AC_MSG_RESULT($pike_cv_have_pthread_cond_init)
if test x$pike_cv_have_pthread_cond_init = xyes ; then
AC_DEFINE(HAVE_PTHREAD_COND_INIT)
else
:
fi
|
0a40e9 | 1997-04-10 | Fredrik Hübinette (Hubbe) | |
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | ##########################################################################
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_CHECKING(if pthread_condattr_default is defined)
AC_CACHE_VAL(pike_cv_have_pthread_condattr_default,[
AC_TRY_LINK([#include <pthread.h>
void foo(pthread_cond_t *bar) { pthread_cond_init(bar, pthread_condattr_default); }
],[],[
pike_cv_have_pthread_condattr_default=yes
],[
pike_cv_have_pthread_condattr_default=no
|
5377b9 | 1997-02-01 | Henrik Grubbström (Grubba) | | ])
|
9ab446 | 1998-11-06 | Honza Petrous | | ])
|
5377b9 | 1997-02-01 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_RESULT($pike_cv_have_pthread_condattr_default)
|
5377b9 | 1997-02-01 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | if test x$pike_cv_have_pthread_condattr_default = xyes ; then
AC_DEFINE(HAVE_PTHREAD_CONDATTR_DEFAULT)
else
:
fi
|
afbcda | 1998-08-31 | Henrik Grubbström (Grubba) | |
|
752e10 | 1999-04-30 | Fredrik Hübinette (Hubbe) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | #
# FreeBSD doesn't like the &, while AIX requires it...
#
AC_MSG_CHECKING(if pthread_condattr_default is needs an & (AIX))
AC_CACHE_VAL(pike_cv_have_pthread_condattr_default_aix,[
AC_TRY_LINK([#include <pthread.h>
void foo(pthread_cond_t *bar) { pthread_cond_init(bar, &pthread_condattr_default); }
],[],[
pike_cv_have_pthread_condattr_default_aix=yes
],[
pike_cv_have_pthread_condattr_default_aix=no
|
afbcda | 1998-08-31 | Henrik Grubbström (Grubba) | | ])
|
9ab446 | 1998-11-06 | Honza Petrous | | ])
|
afbcda | 1998-08-31 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_MSG_RESULT($pike_cv_have_pthread_condattr_default_aix)
|
afbcda | 1998-08-31 | Henrik Grubbström (Grubba) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | if test x$pike_cv_have_pthread_condattr_default_aix = xyes ; then
AC_DEFINE(HAVE_PTHREAD_CONDATTR_DEFAULT_AIX)
else
:
fi
|
afbcda | 1998-08-31 | Henrik Grubbström (Grubba) | |
|
71ac9e | 1999-08-29 | Fredrik Hübinette (Hubbe) | | ##########################################################################
|
752e10 | 1999-04-30 | Fredrik Hübinette (Hubbe) | |
AC_MSG_CHECKING(for __pthread_initial_thread_bos)
AC_CACHE_VAL(pike_cv_have_pthread_initial_thread_bos,[
AC_TRY_LINK([#include <pthread.h>
char *foo(void) { extern char *__pthread_initial_thread_bos;
return __pthread_initial_thread_bos; }
],[],[
pike_cv_have_pthread_initial_thread_bos=yes
],[
pike_cv_have_pthread_initial_thread_bos=no
])
])
AC_MSG_RESULT($pike_cv_have_pthread_initial_thread_bos)
if test x$pike_cv_have_pthread_initial_thread_bos = xyes ; then
AC_DEFINE(HAVE_PTHREAD_INITIAL_THREAD_BOS)
else
:
fi
|
d0cb8d | 2000-05-20 | Henrik Grubbström (Grubba) | | ##########################################################################
# On Linux the threads don't inherit euid & egid from the main thread.
# FIXME: Add a real test here!
if test "x$pike_cv_sys_os" = "xLinux"; then
AC_DEFINE(HAVE_BROKEN_LINUX_THREAD_EUID)
else :; fi
|
752e10 | 1999-04-30 | Fredrik Hübinette (Hubbe) | |
|
9ab446 | 1998-11-06 | Honza Petrous | | else
AC_MSG_RESULT(no)
LIBS="$OLDLIBS"
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | CFLAGS="$OLDCFLAGS"
|
9ab446 | 1998-11-06 | Honza Petrous | |
# No POSIX threads.
# Try UNIX threads instead
AC_MSG_CHECKING(unix threads)
case "x$pike_cv_sys_os" in
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | xUnixWare*)
|
9ab446 | 1998-11-06 | Honza Petrous | | if test "$GCC" = yes ; then
|
0d5111 | 2000-04-10 | Boyd Lynn Gerber | | CFLAGS="${CFLAGS} -pthread"
|
9ab446 | 1998-11-06 | Honza Petrous | | else
CFLAGS="${CFLAGS} -Kthread"
fi
CFLAGS="${CFLAGS} -D_UNIXWARE_THREADS_"
;;
*)
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 <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()
{
void *sune;
mutex_lock(& tmp);
thr_create(0,0,foo,0,0,&gazonk);
thr_join(gazonk,0,&sune);
exit(0);
}
],pike_cv_unix_threads=yes,pike_cv_unix_threads=no,pike_cv_unix_threads=no)
])
if test x$pike_cv_unix_threads = xyes ; then
AC_MSG_RESULT(yes)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
AC_DEFINE(_UNIX_THREADS)
|
67bbf0 | 1999-08-10 | Henrik Grubbström (Grubba) | | AC_DEFINE(PIKE_THREADS)
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | else
AC_MSG_RESULT(no)
LIBS="$OLDLIBS"
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | CFLAGS="$OLDCFLAGS"
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | # Now we've sunk really low -- test for proprietary threads
# SGI old-style shared group processes
|
43032e | 1997-10-09 | Henrik Grubbström (Grubba) | | # AC_CHECK_FUNCS(sproc oserror)
#
# AC_MSG_CHECKING(Fallback to sproc)
#
# if test x$ac_cv_func_sproc$ac_cv_func_oserror = xyesyes; then
# AC_MSG_RESULT(yes)
# AC_DEFINE(_REENTRANT)
# AC_DEFINE(_THREAD_SAFE)
# AC_DEFINE(_SGI_SPROC_THREADS)
# AC_DEFINE(_SGI_MP_SOURCE)
# else
# AC_MSG_RESULT(no)
# :
# fi
|
9ab446 | 1998-11-06 | Honza Petrous | | fi # UNIX threads
fi # POSIX threads
|
b1f4eb | 1998-01-13 | Fredrik Hübinette (Hubbe) | | fi # NT
|
50b039 | 1997-01-27 | Henrik Grubbström (Grubba) | | else
# Without threads
:
|
eec137 | 1996-11-02 | Fredrik Hübinette (Hubbe) | | fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
a888ce | 2000-12-23 | Henrik Grubbström (Grubba) | | # NOTE: The following test is hardcoded to fail when crosscompiling
# It also clobbers $LIBOBJS.
OLD_LIBOBJS="${LIBOBJS}"
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_FUNC_MEMCMP
|
a888ce | 2000-12-23 | Henrik Grubbström (Grubba) | | if test "x$ac_cv_func_memcmp_clean" = "xyes"; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(HAVE_MEMCMP)
fi
LIBOBJS="${OLD_LIBOBJS}"
|
a888ce | 2000-12-23 | Henrik Grubbström (Grubba) | | ########################################################################
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | AC_FUNC_MMAP
|
693018 | 1996-02-25 | Fredrik Hübinette (Hubbe) | |
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | AC_CHECK_FUNCS( \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | _crypt \
|
063fe3 | 1998-03-10 | Per Hedbor | | poll \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | bcopy \
bzero \
clock \
crypt \
fchmod \
|
9548a8 | 1997-05-07 | Per Hedbor | | gethrtime \
gethrvtime \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | getenv \
getrlimit \
getrusage \
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | gettimeofday \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | index \
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | localtime \
|
fe9150 | 1998-07-26 | Peter J. Holzer | | gmtime \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | memchr \
|
565c36 | 1997-01-27 | Fredrik Hübinette (Hubbe) | | mktime \
|
5539c5 | 1998-06-08 | Henrik Grubbström (Grubba) | | perror \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | rindex \
setlocale \
setrlimit \
|
3605b8 | 1998-09-18 | Peter J. Holzer | | setresuid \
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | sigaction \
|
574088 | 1998-01-01 | Fredrik Hübinette (Hubbe) | | sigblock \
sigprocmask \
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | sigvec \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | strcasecmp \
|
9b15e0 | 2000-12-22 | Fredrik Hübinette (Hubbe) | | strnlen \
strncmp \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | strchr \
strcspn \
|
2b2583 | 1997-01-31 | Fredrik Hübinette (Hubbe) | | strerror \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | strrchr \
strtod \
strtok \
strtol \
|
574088 | 1998-01-01 | Fredrik Hübinette (Hubbe) | | time \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | times \
vfprintf \
vsprintf \
|
cd9681 | 1998-05-15 | Henrik Grubbström (Grubba) | | vsnprintf \
|
693018 | 1996-02-25 | Fredrik Hübinette (Hubbe) | | wait3 \
|
65887d | 1995-11-15 | Fredrik Hübinette (Hubbe) | | wait4 \
waitpid \
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | munmap \
|
423839 | 1998-07-09 | Francesco Chemolli | | shl_load \
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | dld_link \
dld_get_func \
|
3e84d6 | 1997-04-16 | Fredrik Hübinette (Hubbe) | | pipe \
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | strdup \
|
f196ef | 1999-08-31 | Fredrik Hübinette (Hubbe) | | strstr \
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | kill \
alarm \
|
85f59e | 1998-01-08 | Fredrik Hübinette (Hubbe) | | fork1 \
|
d386e6 | 1998-03-20 | Fredrik Hübinette (Hubbe) | | flock \
|
e6f98c | 1998-05-22 | David Hedbor | | lockf \
|
0d52dd | 1998-01-16 | Fredrik Hübinette (Hubbe) | | setuid getuid seteuid geteuid \
setgid getgid setegid getegid \
|
f087c4 | 1998-02-04 | Fredrik Hübinette (Hubbe) | | getpwent getpwnam getpwuid \
getgrent getgrnam \
|
8f6385 | 2000-09-16 | Mirar (Pontus Hagland) | | setsid setpgrp getpgrp setpgid getpgid \
|
d386e6 | 1998-03-20 | Fredrik Hübinette (Hubbe) | | initgroups setgroups \
|
9c5020 | 1998-03-26 | Fredrik Hübinette (Hubbe) | | socketpair \
|
5ff14f | 1998-05-25 | Marcus Comstedt | | fpclass \
fp_class_d \
isinf \
isnan \
iszero \
finite \
signbit \
|
70c9c1 | 1998-05-05 | Fredrik Hübinette (Hubbe) | | nice \
|
ea959d | 1999-02-01 | Per Hedbor | | __priocntl \
sched_setscheduler \
setpriority \
|
dac637 | 1999-10-17 | Mirar (Pontus Hagland) | | usleep \
nanosleep \
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | )
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(for the type of the last argument to accept)
|
11ceb0 | 1998-08-07 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_accept_size_t, [
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | for t in socklen_t size_t int; do
AC_TRY_COMPILE([
#ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE 1
#endif
/* HPUX needs these too... */
#ifndef __STDC_EXT__
# define __STDC_EXT__
#endif /* !__STDC_EXT__ */
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
/* NT */
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
/* Here's the actual test: */
int accept(int, struct sockaddr *, $t *);
], [
/* EMPTY */
], [
pike_cv_accept_size_t=$t
break
], [
AC_TRY_COMPILE([
|
11ceb0 | 1998-08-07 | Henrik Grubbström (Grubba) | | #ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE 1
#endif
/* HPUX needs these too... */
#ifndef __STDC_EXT__
# define __STDC_EXT__
#endif /* !__STDC_EXT__ */
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
|
3e82a7 | 1998-09-01 | Fredrik Hübinette (Hubbe) | | /* NT */
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
|
11ceb0 | 1998-08-07 | Henrik Grubbström (Grubba) | | /* Here's the actual test: */
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | SOCKET accept(SOCKET, struct sockaddr *, $t *);
], [
/* EMPTY */
], [
pike_cv_accept_size_t=$t
break
], [])
])
done
if test "x$pike_cv_accept_size_t" = "x"; then
# Check if it could be a Psocklen_t
# Psocklen_t is a stupid typedef of socklen_t *.
|
69bae8 | 2000-08-20 | Henrik Grubbström (Grubba) | | AC_TRY_COMPILE([
#ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE 1
#endif
/* HPUX needs these too... */
#ifndef __STDC_EXT__
# define __STDC_EXT__
#endif /* !__STDC_EXT__ */
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
/* NT */
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
/* Here's the actual test: */
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | int accept(int, struct sockaddr *, Psocklen_t);
|
69bae8 | 2000-08-20 | Henrik Grubbström (Grubba) | | ], [
/* EMPTY */
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | ], [
pike_cv_accept_size_t=socklen_t
], [
# FIXME: Should probably have a warning here.
# FIXME: Should we check if socklen_t exists, and use that?
pike_cv_accept_size_t=int
])
fi
|
11ceb0 | 1998-08-07 | Henrik Grubbström (Grubba) | | ])
|
6cefa1 | 2000-09-27 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT($pike_cv_accept_size_t *)
|
11ceb0 | 1998-08-07 | Henrik Grubbström (Grubba) | | AC_DEFINE_UNQUOTED(ACCEPT_SIZE_T, $pike_cv_accept_size_t)
|
08af09 | 2000-04-12 | Marcus Comstedt | | if test x"$pike_cv_sys_os" = xWindows_NT ; then
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(HAVE_LOADLIBRARY)
AC_DEFINE(HAVE_FREELIBRARY)
AC_DEFINE(HAVE_GETPROCADDRESS)
AC_DEFINE(DL_EXPORT, _dlspec(export))
else
AC_DEFINE(DL_EXPORT, [])
fi
|
e78abd | 1996-11-21 | Fredrik Hübinette (Hubbe) | | if test $ac_cv_func_crypt$ac_cv_func__crypt = nono ; then
|
905bb1 | 1998-01-31 | Fredrik Hübinette (Hubbe) | | AC_CHECK_LIB(crypt,crypt,[LIBS="${LIBS} -lcrypt" ; AC_DEFINE(HAVE_CRYPT)],
[
if test -f "$srcdir/crypt.c"; then
AC_MSG_RESULT(Using crypt.c for BSD style crypt())
EXTRA_OBJS="${EXTRA_OBJS} crypt.o"
AC_DEFINE(HAVE_CRYPT)
|
a68066 | 2000-08-20 | Henrik Grubbström (Grubba) | | AC_DEFINE(USE_CRYPT_C)
|
905bb1 | 1998-01-31 | Fredrik Hübinette (Hubbe) | | else
:
fi
])
|
e78abd | 1996-11-21 | Fredrik Hübinette (Hubbe) | | fi
|
5539c5 | 1998-06-08 | Henrik Grubbström (Grubba) | | #############################################################################
# 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([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#include <sys/stat.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif /* HAVE_FCNTL_H */
#include <stdio.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) {
exit(1);
}
exit(0);
}
], pike_cv_broken_f_setfd=no, pike_cv_broken_f_setfd=yes,
|
56d1c0 | 2000-06-29 | Henrik Grubbström (Grubba) | | pike_cv_broken_f_setfd=yes)
|
5539c5 | 1998-06-08 | Henrik Grubbström (Grubba) | | ])
if test "x$pike_cv_broken_f_setfd" = "xyes"; then
AC_MSG_RESULT(no)
AC_DEFINE(HAVE_BROKEN_F_SETFD)
else
AC_MSG_RESULT(yes)
fi
#############################################################################
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_STRUCT_TM
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(extern int timezone)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_has_external_timezone,[
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_TRY_LINK([
#include <time.h>
],[
int _tz;
_tz=timezone;
|
a05f92 | 1998-05-05 | Fredrik Hübinette (Hubbe) | | timezone=_tz;
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ],pike_cv_has_external_timezone=yes,pike_cv_has_external_timezone=no)
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | ])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_has_external_timezone" = "yes"; then
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(HAVE_EXTERNAL_TIMEZONE)
fi
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_has_external_timezone)
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | |
#############################################################################
|
e0b956 | 1996-07-02 | Fredrik Hübinette (Hubbe) | | # No test for this yet...
AC_DEFINE(HAVE_STRUCT_TIMEVAL)
|
dcad55 | 1996-08-03 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | |
|
63a6e0 | 1998-05-29 | Henrik Grubbström (Grubba) | | if test "x$ac_cv_func_strtol" = "xyes"; then
AC_MSG_CHECKING(if strtol works for large hexadecimal constants)
AC_CACHE_VAL(pike_cv_func_strtol_works, [
AC_TRY_RUN([
#include <stdlib.h>
int main(int argc, char **argv)
{
/* On some OS's strtol() rounds this to 0x7fffffff. */
return(strtol("0xffffffff", NULL, 0) != 0xffffffff);
}
], pike_cv_func_strtol_works=yes,
pike_cv_func_strtol_works=no,
pike_cv_func_strtol_works=no)
])
AC_MSG_RESULT($pike_cv_func_strtol_works)
if test "x$pike_cv_func_strtol_works" = "xyes"; then
AC_DEFINE(HAVE_WORKING_STRTOL)
else :; fi
else :; fi
#############################################################################
|
e0b956 | 1996-07-02 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(if gettimeofday takes two arguments)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_func_gettimeofday_has_two_args,
|
e0b956 | 1996-07-02 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# if HAVE_TIME_H
# include <time.h>
# endif
# endif
#endif
#ifndef HAVE_STRUCT_TIMEVAL
struct timeval
{
long tv_sec;
long tv_usec;
};
#endif
int main() {
struct timeval tv;
gettimeofday(&tv,(void *)0);
exit(0);
}
],
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_func_gettimeofday_has_two_args=yes,
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | pike_cv_func_gettimeofday_has_two_args=no,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_func_gettimeofday_has_two_args=no)])
|
e0b956 | 1996-07-02 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test $pike_cv_func_gettimeofday_has_two_args = yes; then
|
e0b956 | 1996-07-02 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(GETTIMEOFDAY_TAKES_TWO_ARGS)
fi
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_func_gettimeofday_has_two_args)
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | |
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | | if test "x$ac_cv_func_gethrtime" != "xyes"; then
AC_MSG_CHECKING(if we can make gethrtime by the RDTSC instruction)
AC_CACHE_VAL(pike_cv_own_gethrtime_rdtsc, [
AC_TRY_RUN([
#include <unistd.h>
#include <sys/time.h>
static long long hrtime_rtsc_zero;
static struct timeval hrtime_timeval_zero;
static long double hrtime_conv=0.0;
#define RTSC(x) \
__asm__ __volatile__ ( "rdtsc" \
:"=a" (((unsigned long*)&x)[0]), \
"=d" (((unsigned long*)&x)[1]))
void own_gethrtime_init()
{
RTSC(hrtime_rtsc_zero);
gettimeofday(&hrtime_timeval_zero,NULL);
}
void own_gethrtime_update(struct timeval *ptr)
{
long long td,t,now;
RTSC(now);
gettimeofday(ptr,NULL);
td=((long long)ptr->tv_sec-hrtime_timeval_zero.tv_sec)*1000000000+
((long long)ptr->tv_usec-hrtime_timeval_zero.tv_usec)*1000;
t=now-hrtime_rtsc_zero;
if (t) hrtime_conv=((long double)td)/t;
}
long long gethrtime()
{
long long now;
struct timeval dummy;
if (hrtime_conv==0.0) own_gethrtime_update(&dummy);
RTSC(now);
return (long long) ( (long double)now * hrtime_conv );
}
int main()
{
struct timeval tv1,tv2;
|
e886b1 | 2001-01-13 | Mirar (Pontus Hagland) | | long long td,t1,t2;
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | | own_gethrtime_init();
|
e886b1 | 2001-01-13 | Mirar (Pontus Hagland) | | usleep(10);
t1=gethrtime();
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | | gettimeofday(&tv1,NULL);
for (;;) /* busy loop */
{
gettimeofday(&tv2,NULL);
td=((long long)tv2.tv_sec-tv1.tv_sec)*1000000000+
((long long)tv2.tv_usec-tv1.tv_usec)*1000;
if (td>1000000) break;
}
t2=gethrtime();
|
e886b1 | 2001-01-13 | Mirar (Pontus Hagland) | | if (t2==hrtime_rtsc_zero ||
t2-t1>1100000 ||
t2-t1<900000) return 1;
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | |
|
e886b1 | 2001-01-13 | Mirar (Pontus Hagland) | | return 0;
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | | }
|
df4462 | 2000-08-29 | Henrik Grubbström (Grubba) | | ], pike_cv_own_gethrtime_rdtsc=yes,
pike_cv_own_gethrtime_rdtsc=no, pike_cv_own_gethrtime_rdtsc=no)
|
bbc16c | 2000-08-29 | Mirar (Pontus Hagland) | | ])
if test "x$pike_cv_own_gethrtime_rdtsc" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(OWN_GETHRTIME)
AC_DEFINE(OWN_GETHRTIME_RDTSC)
AC_DEFINE(HAVE_GETHRTIME)
else
AC_MSG_RESULT([no])
fi
fi
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(if struct tm has tm_gmtoff)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_struct_tm_has_gmtoff,[
|
658f1a | 1997-01-26 | Fredrik Hübinette (Hubbe) | | AC_TRY_COMPILE([
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | #ifdef TM_IN_SYS_TIME
#include <sys/time.h>
#else
|
a28592 | 1998-09-27 | Henrik Grubbström (Grubba) | | #include <time.h>
#endif
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | ],[
int _tz;
struct tm foo;
_tz=foo->tm_gmtoff;
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ],pike_cv_struct_tm_has_gmtoff=yes,pike_cv_struct_tm_has_gmtoff=no)
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | ])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_struct_tm_has_gmtoff" = "yes"; then
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(STRUCT_TM_HAS_GMTOFF)
fi
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_struct_tm_has_gmtoff)
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | |
|
c69eb5 | 1996-09-29 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(for USHRT_MAX definition)
AC_CACHE_VAL(pike_cv_ushrt_max_is_defined,[
AC_EGREP_CPP(yes,[
#include <limits.h>
#ifdef USHRT_MAX
yes
#endif
],pike_cv_ushrt_max_is_defined=yes,pike_cv_ushrt_max_is_defined=no)
])
if test "$pike_cv_ushrt_max_is_defined" = "no" ; then
AC_DEFINE(USHRT_MAX,65535)
fi
AC_MSG_RESULT($pike_cv_ushrt_max_is_defined)
|
067bc1 | 1996-06-21 | Fredrik Hübinette (Hubbe) | |
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | define(MY_CHECK_HEADERS,
[
AC_MSG_CHECKING(for $1 declaration)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_decl_$1,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_decl_$1=nonexistant
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | for a in $2
do
|
9af34a | 1997-11-30 | Henrik Grubbström (Grubba) | | AC_EGREP_HEADER($1,$a,[ pike_cv_decl_$1=existant; break ])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | done
])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_decl_$1)
if test "$pike_cv_decl_$1" = nonexistant; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(translit($1,[a-z],[A-Z])[]_DECL_MISSING)
fi
])
MY_CHECK_HEADERS(strchr,string.h unistd.h stdlib.h)
MY_CHECK_HEADERS(malloc,memory.h unistd.h stdlib.h)
|
2043ba | 1998-02-10 | Fredrik Hübinette (Hubbe) | | MY_CHECK_HEADERS(getpeername,sys/socket.h sys/socketvar.h sys/socketio.h winsock.h winsock2.h)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | MY_CHECK_HEADERS(popen,stdio.h unistd.h)
MY_CHECK_HEADERS(getenv,unistd.h stdlib.h)
|
2043ba | 1998-02-10 | Fredrik Hübinette (Hubbe) | | MY_CHECK_HEADERS(gethostname,unistd.h netdb.h winsock.h winsock2.h)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
AC_ALLOCA
|
693018 | 1996-02-25 | Fredrik Hübinette (Hubbe) | | AC_C_CONST
AC_C_INLINE
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
9b372f | 1998-09-05 | Henrik Grubbström (Grubba) | | AC_CHECK_FUNCS(ualarm setitimer)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
9b372f | 1998-09-05 | Henrik Grubbström (Grubba) | | if test "x$ac_cv_func_ualarm" = "xyes"; then
AC_MSG_CHECKING(no of arguments to ualarm)
AC_CACHE_VAL(pike_cv_ualarm_takes_two_args,
[
AC_TRY_COMPILE([
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
],[
|
e16ff5 | 1996-12-05 | Fredrik Hübinette (Hubbe) | | ualarm(0,0);
|
9b372f | 1998-09-05 | Henrik Grubbström (Grubba) | | ],pike_cv_ualarm_takes_two_args=yes,pike_cv_ualarm_takes_two_args=no)
])
if test "$pike_cv_ualarm_takes_two_args" = yes; then
AC_MSG_RESULT(2)
AC_DEFINE(UALARM_TAKES_TWO_ARGS)
else
AC_MSG_RESULT(1)
fi
fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
d7be5b | 1997-01-28 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
2ee669 | 1999-01-07 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(stack direction)
AC_CACHE_VAL(pike_cv_hardware_stack_direction,
[
AC_TRY_RUN([
|
46d5c5 | 2000-02-03 | Henrik Grubbström (Grubba) | | #include <stdio.h>
|
2ee669 | 1999-01-07 | Fredrik Hübinette (Hubbe) | | static int find_stack_direction(void *foo)
{
if (((void *)&foo) > foo) {
return 1;
} else {
return -1;
}
}
|
46d5c5 | 2000-02-03 | Henrik Grubbström (Grubba) | | int main() { void *bar; exit( find_stack_direction(&bar) > 0); }
|
2ee669 | 1999-01-07 | Fredrik Hübinette (Hubbe) | | ],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up)
])
AC_MSG_RESULT($pike_cv_hardware_stack_direction)
if grep STACK_DIRECTION confdefs.h >/dev/null 2>&1; then
:
else
if test "x$pike_cv_hardware_stack_direction" = "xup" ; then
AC_DEFINE(STACK_DIRECTION, 1)
else
AC_DEFINE(STACK_DIRECTION, -1)
fi
fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(byteorder)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_hardware_byteorder,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
#include <stdio.h>
int main()
{
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | #if SIZEOF_INT == 4
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #define T int
#else
#define T long
#endif
FILE *f;
T a;
int e;
for(e=0;e<sizeof(T);e++)
((char *)&a)[e]=(e+1) % 10;
f=fopen("conftest.out.2","w");
for(e=0;e<sizeof(T);e++)
{
fprintf(f,"%d",(int)(a & 255));
a>>=8;
}
fprintf(f,"\n");
fclose(f);
return 0;
}],
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_hardware_byteorder=`cat conftest.out.2`
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | ,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_hardware_byteorder=0
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ,
pike_cv_hardware_byteorder=0
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | )])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_hardware_byteorder)
|
71f3a2 | 1998-11-22 | Fredrik Hübinette (Hubbe) | | AC_DEFINE_UNQUOTED(PIKE_BYTEORDER,$pike_cv_hardware_byteorder)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
6a3647 | 2000-12-19 | Marcus Comstedt | | ########################################################################
AC_MSG_CHECKING(INT32 alignment)
AC_CACHE_VAL(pike_cv_hardware_alignment,
[
AC_TRY_RUN([
#include <stdio.h>
#if SIZEOF_SHORT >= 4
#define INT32 short
#else
#if SIZEOF_INT >= 4
#define INT32 int
#else
#define INT32 long
#endif
#endif
struct x { char a; INT32 b; };
int main(int argc, char *argv[])
{
FILE f;
struct x x;
if(!(f=fopen("conftest.out.2","w")))
return 1;
fprintf(f, "%u\n", (unsigned int)(((char *)&x.b)-((char*)&x)));
fclose(f);
return 0;
}],
pike_cv_hardware_alignment=`cat conftest.out.2`,
pike_cv_hardware_alignment=4,
pike_cv_hardware_alignment=4
)])
AC_MSG_RESULT($pike_cv_hardware_alignment)
AC_DEFINE_UNQUOTED(PIKE_INT32_ALIGNMENT,$pike_cv_hardware_alignment)
|
05030b | 1998-11-18 | Marcus Comstedt | | ########################################################################
MY_CHECK_FUNCTION(fork,
[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
05030b | 1998-11-18 | Marcus Comstedt | | exit(fork()==-1);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
a3c9a7 | 2000-10-13 | Fredrik Hübinette (Hubbe) | |
########################################################################
MY_CHECK_FUNCTION(PTHREAD_MUTEX_RECURSIVE,
[
#include <pthread.h>
], [
PTHREAD_MUTEX_RECURSIVE;
exit(0);
])
########################################################################
MY_CHECK_FUNCTION(PTHREAD_MUTEX_RECURSIVE_NP,
[
#include <pthread.h>
], [
PTHREAD_MUTEX_RECURSIVE_NP;
exit(0);
])
|
4bcc44 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | ########################################################################
MY_CHECK_FUNCTION(fpsetmask,
[
#include <math.h>
#ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
4bcc44 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | fpsetmask(0);
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
b36a45 | 2000-03-28 | Henrik Grubbström (Grubba) | | MY_CHECK_FUNCTION(fpsetround,
[
#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 */
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
b36a45 | 2000-03-28 | Henrik Grubbström (Grubba) | | fpsetround(FP_RN);
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
b36a45 | 2000-03-28 | Henrik Grubbström (Grubba) | | ########################################################################
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | MY_CHECK_FUNCTION(dlopen,
[
#include <dlfcn.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | | dlopen(0, 0);
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
4bcc44 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
de1608 | 1997-06-03 | Fredrik Hübinette (Hubbe) | |
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | MY_CHECK_FUNCTION(ldexp,
[
#include <math.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | double x;
int p;
for(x=0.0;x<2.0;x+=1.0/64.0)
for(p=-6;p<7;p++)
if(ldexp(x,p) != x*pow(2.0, (double)p))
exit(1);
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | |
|
22c21e | 1999-06-19 | Fredrik Hübinette (Hubbe) | | ########################################################################
MY_CHECK_FUNCTION(rint,
[
#include <math.h>
|
b36a45 | 2000-03-28 | Henrik Grubbström (Grubba) | | #ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif /* HAVE_IEEEFP_H */
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
b36a45 | 2000-03-28 | Henrik Grubbström (Grubba) | | #ifdef HAVE_FPSETROUND
/* Round to nearest */
#ifndef FP_RN
#define FP_RN 0
#endif /* FP_RN */
fpsetround(FP_RN);
#endif /* HAVE_FPSETROUND */
|
22c21e | 1999-06-19 | Fredrik Hübinette (Hubbe) | | if(rint(0.1) != 0.0 ||
rint(0.6) != 1.0) exit(1);
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
22c21e | 1999-06-19 | Fredrik Hübinette (Hubbe) | |
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | ########################################################################
MY_CHECK_FUNCTION(frexp,
[
#include <math.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | double x,y;
|
1a631e | 1997-04-22 | Fredrik Hübinette (Hubbe) | | int p,e;
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | |
|
1a631e | 1997-04-22 | Fredrik Hübinette (Hubbe) | | x=frexp(1.0, &e);
|
3b7ea3 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | if(x * pow(2.0,(double)e) != 1.0) exit(3);
|
1a631e | 1997-04-22 | Fredrik Hübinette (Hubbe) | |
p=-7;
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++)
{
if(frexp(x, &e)!=3.0/4.0) exit(1);
|
1a631e | 1997-04-22 | Fredrik Hübinette (Hubbe) | | if(e!=p) exit(2);
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | }
exit(0);
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ])
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | |
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | #############################################################################
MY_CHECK_FUNCTION(GetSystemTimeAsFileTime,
[
#include <windows.h>
#include <winbase.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | FILETIME f;
GetSystemTimeAsFileTime(&f);
exit(0);
])
#############################################################################
MY_CHECK_FUNCTION(gethostname,
[
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | char buffer[10000];
char *x=gethostname(buffer,sizeof(buffer));
exit(0);
])
#############################################################################
MY_CHECK_FUNCTION(strcoll,
[
#include <string.h>
#include <locale.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | setlocale(LC_CTYPE, "ISO-8859-1");
exit(strcoll("abc", "def") >= 0 ||
strcoll("ABC", "DEF") >= 0 ||
strcoll("ABC", "ABCD") >= 0 ||
strcoll("ABCD", "ABC") <= 0 ||
strcoll("*^#", "*^#") != 0 ||
strcoll("123", "456") >= 0);
])
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | ########################################################################
MY_CHECK_FUNCTION(memmem,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
#include <string.h>
char *a="foo bar gazonk";
char *b="foo";
char *c="bar";
char *d="gazonk";
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
c46396 | 1998-09-27 | Henrik Grubbström (Grubba) | | if(((char *)memmem(b,strlen(b),a,strlen(a)))!=a ||
((char *)memmem(c,strlen(c),a,strlen(a)))!=(a+4) ||
((char *)memmem(d,strlen(d),a,strlen(a)))!=(a+8) ||
((char *)memmem(d,0,a,strlen(a)))!=a ||
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | memmem(d,strlen(d)+1,a,strlen(a))!=0)
exit(1);
exit(0);
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | ])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | MY_CHECK_FUNCTION(memcpy,
[
#include <string.h>
char *a="foo bar gazonk";
char foo[23];
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | memcpy(foo, a, strlen(a)+1);
memcpy(foo, a+4, 3);
if(strcmp(foo,"bar bar gazonk")) exit(1);
exit(0);
])
########################################################################
MY_CHECK_FUNCTION(memset,
[
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | #ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif /* HAVE_STDDEF_H */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#include <stdio.h>
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | #include <string.h>
char foo[23];
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | |
struct pike_string {
int refs;
int size_shift;
ptrdiff_t len;
size_t hval;
struct pike_string *next;
char str[1];
};
struct pike_string *begin_shared_string(int len)
{
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | return malloc(sizeof(struct pike_string) + len);
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | | }
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
534170 | 2000-08-28 | Henrik Grubbström (Grubba) | | int i;
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | | struct pike_string *str;
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | ptrdiff_t len;
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | |
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | memset(foo, 0, 11);
memset(foo, 'a', 10);
memset(foo, 'b', 5);
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if(strcmp(foo,"bbbbbaaaaa")) {
fprintf(stderr, "1\n");
exit(1);
}
|
534170 | 2000-08-28 | Henrik Grubbström (Grubba) | | memset(foo, 0, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i]) {
fprintf(stderr, "2\n");
exit(1);
}
|
534170 | 2000-08-28 | Henrik Grubbström (Grubba) | | }
|
08d51f | 2000-08-28 | Henrik Grubbström (Grubba) | | memset(foo+1, 1, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+1] != 1) {
fprintf(stderr, "3\n");
exit(1);
}
|
08d51f | 2000-08-28 | Henrik Grubbström (Grubba) | | }
memset(foo+2, 0, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+2]) {
fprintf(stderr, "4\n");
exit(1);
}
|
08d51f | 2000-08-28 | Henrik Grubbström (Grubba) | | }
memset(foo+3, 1, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+3] != 1) {
fprintf(stderr, "5\n");
exit(1);
}
|
08d51f | 2000-08-28 | Henrik Grubbström (Grubba) | | }
|
d21a45 | 2000-08-28 | Henrik Grubbström (Grubba) | | memset(foo+4, 0, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+4]) {
fprintf(stderr, "6\n");
exit(1);
}
|
d21a45 | 2000-08-28 | Henrik Grubbström (Grubba) | | }
memset(foo+5, 1, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+5] != 1) {
fprintf(stderr, "7\n");
exit(1);
}
|
d21a45 | 2000-08-28 | Henrik Grubbström (Grubba) | | }
memset(foo+6, 0, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+6]) {
fprintf(stderr, "8\n");
exit(1);
}
|
d21a45 | 2000-08-28 | Henrik Grubbström (Grubba) | | }
memset(foo+7, 1, 6);
for (i=6; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (foo[i+7] != 1) {
fprintf(stderr, "9\n");
exit(1);
}
|
d21a45 | 2000-08-28 | Henrik Grubbström (Grubba) | | }
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | |
len = 6;
str = begin_shared_string(len);
if (!str) exit(1);
for (i=len; i--;) {
str->str[i] = ~0;
}
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | memset(str->str, 0, len);
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | | for (i = len; i--;) {
|
c4dc22 | 2000-11-25 | Henrik Grubbström (Grubba) | | if (str->str[i]) {
fprintf(stderr, "string\n");
exit(1);
}
|
0e85fb | 2000-08-28 | Henrik Grubbström (Grubba) | | }
free(str);
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | exit(0);
])
########################################################################
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | MY_CHECK_FUNCTION(memmove,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
#include <string.h>
char buf[100];
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | strcpy(buf,"foo bar gazonk elefantsnabel.");
if(strcmp(buf,"foo bar gazonk elefantsnabel.")) exit(1);
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | memmove(buf,buf+1,7);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | if(strcmp(buf,"oo bar gazonk elefantsnabel.")) exit(1);
memmove(buf+1,buf+1,9);
if(strcmp(buf,"oo bar gazonk elefantsnabel.")) exit(1);
memmove(buf+1,buf,11);
if(strcmp(buf,"ooo bar gaznk elefantsnabel.")) exit(1);
exit(0);
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | ])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | MY_CHECK_FUNCTION(isspace,
[
#include <ctype.h>
|
1a3f88 | 2000-08-21 | Henrik Grubbström (Grubba) | | ], [
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | if(isspace(' ')) exit(0);
exit(1);
])
#############################################################################
|
85f59e | 1998-01-08 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(if we can declare environ)
AC_CACHE_VAL(pike_cv_declare_environ,[
AC_TRY_COMPILE([
#include <stdlib.h>
],[
extern char **environ;
exit(0);
],pike_cv_declare_environ=yes,pike_cv_declare_environ=no,pike_cv_declare_environ=yes)
])
AC_MSG_RESULT($pike_cv_declare_environ)
if test "x$pike_cv_declare_environ" = xyes ; then
AC_DEFINE(DECLARE_ENVIRON)
fi
#############################################################################
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | |
|
9dd220 | 1998-05-17 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING([for union wait (old BSD convention)])
AC_CACHE_VAL(pike_cv_union_wait, [ AC_TRY_COMPILE([
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
|
d6980f | 1998-05-17 | Henrik Grubbström (Grubba) | | #endif /* HAVE_SYS_WAIT_H */
|
9dd220 | 1998-05-17 | Henrik Grubbström (Grubba) | | ], [
union wait status;
exit(0);
], pike_cv_union_wait=yes, pike_cv_union_wait=no)
])
AC_MSG_RESULT($pike_cv_union_wait)
if test "x$pike_cv_union_wait" = "xyes" ; then
|
f37617 | 1998-05-22 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING([whether union wait is really needed])
AC_CACHE_VAL(pike_cv_union_wait_needed, [ AC_TRY_COMPILE([
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif /* HAVE_SYS_WAIT_H */
], [
int status;
return WIFEXITED(status) || 0;
], pike_cv_union_wait_needed=no, pike_cv_union_wait_needed=yes)
])
|
efad7a | 1998-10-28 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT($pike_cv_union_wait_needed)
|
f37617 | 1998-05-22 | Henrik Grubbström (Grubba) | | if test "x$pike_cv_union_wait_needed" = "xyes" ; then
AC_DEFINE(HAVE_UNION_WAIT)
else :; fi
else :; fi
|
9dd220 | 1998-05-17 | Henrik Grubbström (Grubba) | |
#############################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(how to extract an unsigned char)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_method_extract_uchar,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | int main()
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | {
char i,*p;
i=-10;
p=&i;
if(*(unsigned char *)(p)!= 0x100 - 10) exit(1);
exit(0);
}
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ],pike_cv_method_extract_uchar=by_cast,
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | pike_cv_method_extract_uchar=not_by_cast,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_method_extract_uchar=not_by_cast)])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_method_extract_uchar" = by_cast; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(by cast)
AC_DEFINE(EXTRACT_UCHAR_BY_CAST)
else
AC_MSG_RESULT(not by cast)
fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(how to extract a signed char)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_method_extract_char,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | int main()
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | {
char i,*p;
i=-10;
p=&i;
if(*(signed char *)(p)!= -10) exit(1);
exit(0);
}
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ],pike_cv_method_extract_char=by_cast,
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | pike_cv_method_extract_char=not_by_cast,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_method_extract_char=not_by_cast)])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_method_extract_char" = by_cast; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(by cast)
AC_DEFINE(EXTRACT_CHAR_BY_CAST)
else
AC_MSG_RESULT(not by cast)
fi
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
c724c4 | 1999-08-12 | Henrik Grubbström (Grubba) | | if test "x$ac_cv_header_mmx_h" = xyes ; then
|
27da5c | 1999-09-23 | Fredrik Noring | | AC_MSG_CHECKING(for working MMX)
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | |
|
c724c4 | 1999-08-12 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_sys_has_working_mmx,
[
AC_TRY_LINK([
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | | #include <mmx.h>
|
c724c4 | 1999-08-12 | Henrik Grubbström (Grubba) | | ],[
{
|
27da5c | 1999-09-23 | Fredrik Noring | | int try_use_mmx;
|
dd5074 | 1999-10-25 | Per Hedbor | | char a[8];
movq_m2r( *a, mm0 );
paddb_r2r( mm0, mm0 );
movq_r2m( mm0, *a );
|
27da5c | 1999-09-23 | Fredrik Noring | | try_use_mmx=mmx_ok();
|
c724c4 | 1999-08-12 | Henrik Grubbström (Grubba) | | }
], pike_cv_sys_has_working_mmx=yes,pike_cv_sys_has_working_mmx=no)
])
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | |
|
c724c4 | 1999-08-12 | Henrik Grubbström (Grubba) | | AC_MSG_RESULT($pike_cv_sys_has_working_mmx)
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | |
|
e8f42f | 1999-08-12 | Henrik Grubbström (Grubba) | | if test "x$pike_cv_sys_has_working_mmx" = xyes ; then
AC_DEFINE(TRY_USE_MMX)
else :; fi
else :; fi
|
9debfa | 1999-08-11 | Fredrik Hübinette (Hubbe) | |
|
d30082 | 1998-02-27 | Marcus Comstedt | | #############################################################################
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(if float conversion can cause SIGFPE)
AC_CACHE_VAL(pike_cv_sys_idiot_sigfpe,
[
AC_TRY_RUN([
#include <math.h>
|
3b7ea3 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
|
c371d4 | 1998-06-07 | Simon Coggins | | float foo_float = 0.0;
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | int main(int argc, char **argv)
{
|
c371d4 | 1998-06-07 | Simon Coggins | | float x=2.0, y=-128.0;
|
3b7ea3 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_FPSETMASK
fpsetmask(0);
#endif
|
c371d4 | 1998-06-07 | Simon Coggins | | x = pow(2.0, -128.0);
foo_float = x;
if (x == 2.0) exit(1);
x = pow(2.0, 1024.0);
foo_float = x;
if(x == 2.0) exit(1);
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | exit(0);
}
|
e33f4c | 1998-06-28 | Henrik Grubbström (Grubba) | | ],pike_cv_sys_idiot_sigfpe=no,pike_cv_sys_idiot_sigfpe=yes,
pike_cv_sys_idiot_sigfpe=yes)
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | ])
if test $pike_cv_sys_idiot_sigfpe = yes ; then
AC_MSG_RESULT(yes)
|
c371d4 | 1998-06-07 | Simon Coggins | | IEEE_FLAG=no
if test "x${GCC-}" = xyes ; then
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG(-mieee, mieee, CFLAGS,[],IEEE_FLAG=yes)
|
c371d4 | 1998-06-07 | Simon Coggins | | else
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | AC_SYS_COMPILER_FLAG(-ieee, ieee, CFLAGS,[],IEEE_FLAG=yes)
|
c371d4 | 1998-06-07 | Simon Coggins | | fi
TEST_IGNORE_SIGFPE=yes
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | |
|
c371d4 | 1998-06-07 | Simon Coggins | | 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,
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | [
|
8aa31a | 1998-06-07 | Henrik Grubbström (Grubba) | | OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $OPTIMIZE"
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | AC_TRY_RUN([
#include <math.h>
|
c371d4 | 1998-06-07 | Simon Coggins | |
|
3b7ea3 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
|
c371d4 | 1998-06-07 | Simon Coggins | | float foo_float = 0.0;
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | int main(int argc, char **argv)
{
|
c371d4 | 1998-06-07 | Simon Coggins | | float x=2.0, y=-128.0;
|
3b7ea3 | 1998-07-22 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_FPSETMASK
fpsetmask(0);
#endif
|
c371d4 | 1998-06-07 | Simon Coggins | | x = pow(2.0, -128.0);
foo_float = x;
if (x == 2.0) exit(1);
x = pow(2.0, 1024.0);
foo_float = x;
if(x == 2.0) exit(1);
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | exit(0);
}
|
e33f4c | 1998-06-28 | Henrik Grubbström (Grubba) | | ],pike_cv_sys_idiot_sigfpe_with_ieee=no,pike_cv_sys_idiot_sigfpe_with_ieee=yes,
pike_cv_sys_idiot_sigfpe_with_ieee=yes)
|
8aa31a | 1998-06-07 | Henrik Grubbström (Grubba) | | CFLAGS="$OLD_CFLAGS"
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | ])
|
c371d4 | 1998-06-07 | Simon Coggins | | if test $pike_cv_sys_idiot_sigfpe_with_ieee = yes ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
TEST_IGNORE_SIGFPE=no
fi
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | 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,
[
|
8aa31a | 1998-06-07 | Henrik Grubbström (Grubba) | | OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $OPTIMIZE"
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | AC_TRY_RUN([
|
8aa31a | 1998-06-07 | Henrik Grubbström (Grubba) | | #include <signal.h>
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | #include <math.h>
int counter=0;
RETSIGTYPE func(void)
{
if(counter++>10) exit(7);
signal(SIGFPE,func);
}
|
c371d4 | 1998-06-07 | Simon Coggins | | float foo_float = 0.0;
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | int main(int argc, char **argv)
{
|
c371d4 | 1998-06-07 | Simon Coggins | | float x=2.0, y=-128.0;
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | signal(SIGFPE,func);
|
c371d4 | 1998-06-07 | Simon Coggins | | x = pow(2.0, -128.0);
foo_float = x;
if (x == 2.0) exit(1);
x = pow(2.0, 1024.0);
foo_float = x;
if(x == 2.0) exit(1);
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | exit(0);
}
|
e33f4c | 1998-06-28 | Henrik Grubbström (Grubba) | | ],pike_cv_sys_ignore_sigfpe=yes,pike_cv_sys_ignore_sigfpe=no,
pike_cv_sys_ignore_sigfpe=yes)
|
8aa31a | 1998-06-07 | Henrik Grubbström (Grubba) | | CFLAGS="$OLD_CFLAGS"
|
71b44e | 1998-06-05 | Fredrik Hübinette (Hubbe) | | ])
if test "$pike_cv_sys_ignore_sigfpe" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(IGNORE_SIGFPE)
else
AC_MSG_RESULT(no)
fi
fi # TEST_IGNORE_SIGFPE
else
AC_MSG_RESULT(no)
fi # pike_cv_sys_idiot_sigfpe
#############################################################################
|
5ff14f | 1998-05-25 | Marcus Comstedt | | define(float_check, [[
#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;
#ifdef TEST_float
p = pf;
#else
p = pd;
#endif
for(i=0; i<sizeof(TY); i++)
#ifdef TEST_BIG
if(p[i] != p2[i])
exit(1);
#else
if(p[i] != p2[sizeof(TY)-i-1])
exit(1);
#endif
}
int main()
{
if(sizeof(TY)!=EXPECTED_SIZE_$1)
exit(1);
check((TY)0.0, "\000\000\000\000", "\000\000\000\000\000\000\000\000");
check((TY)1.0, "\077\200\000\000", "\077\360\000\000\000\000\000\000");
check((TY)-1.0, "\277\200\000\000", "\277\360\000\000\000\000\000\000");
check((TY)2.0, "\100\000\000\000", "\100\000\000\000\000\000\000\000");
check((TY)1.5, "\077\300\000\000", "\077\370\000\000\000\000\000\000");
check((TY)0.032999999821186065673828125, "\075\007\053\002", "\077\240\345\140\100\000\000\000");
exit(0);
}
]])
AC_MSG_CHECKING(for type of float)
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_float_type, [
AC_TRY_RUN(float_check(float,BIG), pike_cv_float_type=ieee_big, [
AC_TRY_RUN(float_check(float,LITTLE), pike_cv_float_type=ieee_little,
pike_cv_float_type=not_ieee, pike_cv_float_type=not_ieee)
], [
|
1f958f | 2000-08-21 | Henrik Grubbström (Grubba) | | echo $ac_n "crosscompiling... $ac_c" 1>&6
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | # Use some magical constants...
cat > conftest.$ac_ext <<EOF
dnl This sometimes fails to find confdefs.h, for some reason.
dnl [#]line __oline__ "[$]0"
[#]line __oline__ "configure"
#include "confdefs.h"
#include <stdio.h>
float float_info[[]] = {
0.0,
14914788644012054221422592.0, 16305677175569252352.0,
0.0
};
EOF
if AC_TRY_EVAL(ac_compile); then
if test -f "conftest.$ac_objext"; then
if strings "conftest.$ac_objext" | grep "iEeE_bIg" >/dev/null; then
pike_cv_float_type=ieee_big
else
if strings "conftest.$ac_objext" | grep "EeEigIb_" >/dev/null; then
pike_cv_float_type=ieee_little
else
pike_cv_float_type=not_ieee
fi
fi
else
AC_MSG_WARN([Object file not found.])
pike_cv_float_type=not_ieee
fi
else
pike_cv_float_type=not_ieee
fi
|
fdb698 | 2000-08-20 | Henrik Grubbström (Grubba) | | rm -rf conftest*
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | ])
])
|
5ff14f | 1998-05-25 | Marcus Comstedt | | if test "$pike_cv_float_type" = ieee_big; then
AC_MSG_RESULT(IEEE big endian)
AC_DEFINE(FLOAT_IS_IEEE_BIG)
else
if test "$pike_cv_float_type" = ieee_little; then
AC_MSG_RESULT(IEEE little endian)
AC_DEFINE(FLOAT_IS_IEEE_LITTLE)
else
AC_MSG_RESULT(not IEEE)
fi
fi
AC_MSG_CHECKING(for type of double)
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_double_type, [
AC_TRY_RUN(float_check(double,BIG), pike_cv_double_type=ieee_big, [
AC_TRY_RUN(float_check(double,LITTLE), pike_cv_double_type=ieee_little,
pike_cv_double_type=not_ieee, pike_cv_double_type=not_ieee)
], [
|
1f958f | 2000-08-21 | Henrik Grubbström (Grubba) | | echo $ac_n "crosscompiling... $ac_c" 1>&6
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | # Use some magical constants...
cat > conftest.$ac_ext <<EOF
dnl This sometimes fails to find confdefs.h, for some reason.
dnl [#]line __oline__ "[$]0"
[#]line __oline__ "configure"
#include "confdefs.h"
#include <stdio.h>
double double_info[[]] = {
0.0,
12794738495187527498222028847205909954314554441725728393516969126669975252147490126864122090122288822751876426313291683594796075946303753742007913302630260537160845833197547903208108732031187791380480.0,
0.0
};
EOF
if AC_TRY_EVAL(ac_compile); then
if test -f "conftest.$ac_objext"; then
if strings "conftest.$ac_objext" | grep "iEeE_bIg" >/dev/null; then
pike_cv_double_type=ieee_big
else
if strings "conftest.$ac_objext" | grep "gIb_EeEi" >/dev/null; then
pike_cv_double_type=ieee_little
else
pike_cv_double_type=not_ieee
fi
fi
else
AC_MSG_WARN([Object file not found.])
pike_cv_float_type=not_ieee
fi
else
pike_cv_float_type=not_ieee
fi
|
fdb698 | 2000-08-20 | Henrik Grubbström (Grubba) | | rm -rf conftest*
|
32cf26 | 2000-08-20 | Henrik Grubbström (Grubba) | | ])
])
|
5ff14f | 1998-05-25 | Marcus Comstedt | | if test "$pike_cv_double_type" = ieee_big; then
AC_MSG_RESULT(IEEE big endian)
AC_DEFINE(DOUBLE_IS_IEEE_BIG)
else
if test "$pike_cv_double_type" = ieee_little; then
AC_MSG_RESULT(IEEE little endian)
AC_DEFINE(DOUBLE_IS_IEEE_LITTLE)
else
AC_MSG_RESULT(not IEEE)
fi
fi
#############################################################################
|
d30082 | 1998-02-27 | Marcus Comstedt | | AC_MSG_CHECKING(for volatile)
AC_CACHE_VAL(pike_cv_volatile,
[
AC_TRY_COMPILE([],[ volatile int foo=1;], pike_cv_volatile=yes,pike_cv_volatile=no)
])
if test "$pike_cv_volatile" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(VOLATILE,volatile)
else
AC_MSG_RESULT(no)
AC_DEFINE(VOLATILE,)
fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | |
|
61d3cf | 1998-02-27 | Marcus Comstedt | | AC_MSG_CHECKING(for sig_atomic_t)
AC_CACHE_VAL(ac_cv_type_sig_atomic_t,
[
AC_EGREP_CPP(sig_atomic_t, [
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
|
9c9bf2 | 2000-08-04 | Henrik Grubbström (Grubba) | | #ifdef HAVE_CRT_SIGNAL_H
#include <crt/signal.h>
#endif
|
61d3cf | 1998-02-27 | Marcus Comstedt | | #include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif], ac_cv_type_sig_atomic_t=yes, ac_cv_type_sig_atomic_t=no)])
AC_MSG_RESULT($ac_cv_type_sig_atomic_t)
if test x"$ac_cv_type_sig_atomic_t" = xno; then
AC_DEFINE(sig_atomic_t, int)
else
:
fi
|
c8a4ce | 1995-11-20 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(if signal handlers reset automatically)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_sys_signal_oneshot,
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
|
61d3cf | 1998-02-27 | Marcus Comstedt | | #ifdef HAVE_SIGNAL_H
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | #include <signal.h>
|
61d3cf | 1998-02-27 | Marcus Comstedt | | #endif
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
|
d30082 | 1998-02-27 | Marcus Comstedt | | VOLATILE sig_atomic_t sigrun=0;
|
607710 | 1999-05-15 | Henrik Grubbström (Grubba) | | RETSIGTYPE func(int sig)
{
write(2, "func called\n", sizeof("func called\n") - sizeof(""));
sigrun=1;
}
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | |
int main()
{
#define sig SIGSEGV
#ifdef HAVE_SIGACTION
{
struct sigaction action;
action.sa_handler= func;
sigfillset(&action.sa_mask);
#ifdef SA_INTERRUPT
action.sa_flags=SA_INTERRUPT;
#endif
sigaction(sig,&action,0);
}
#else
#ifdef HAVE_SIGVEC
{
struct sigvec action;
action.sv_handler= func;
action.sv_mask=-1;
#ifdef SV_INTERRUPT
action.sv_flags=SV_INTERRUPT;
#endif
sigvec(sig,&action,0);
}
#else
signal(sig, func);
#endif
#endif
kill(getpid(), sig);
|
a3c9a7 | 2000-10-13 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_POLL
while(!sigrun) poll(0,0,100);
#else
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | while(!sigrun) sleep(1);
|
a3c9a7 | 2000-10-13 | Fredrik Hübinette (Hubbe) | | #endif
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | sigrun=0;
kill(getpid(), sig);
|
a3c9a7 | 2000-10-13 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_POLL
while(!sigrun) poll(0,0,100);
#else
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | while(!sigrun) sleep(1);
|
a3c9a7 | 2000-10-13 | Fredrik Hübinette (Hubbe) | | #endif
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | sigrun=0;
exit(0);
}
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ],pike_cv_sys_signal_oneshot=no,pike_cv_sys_signal_oneshot=yes,pike_cv_sys_signal_oneshot=yes)])
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_sys_signal_oneshot" = yes; then
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(yes)
AC_DEFINE(SIGNAL_ONESHOT)
else
AC_MSG_RESULT(no)
fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
93b808 | 1995-11-02 | Fredrik Hübinette (Hubbe) | |
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(available file descriptors)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_max_open_fd,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
#include <stdio.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifndef MAX_FD
|
c0d65d | 2000-05-20 | Per Hedbor | | #define MAX_FD 65536
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
int main()
{
FILE *f;
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | long limit;
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | |
|
2a5096 | 1995-08-23 | Fredrik Hübinette (Hubbe) | | #if !defined(RLIMIT_NOFILE) && defined(RLIMIT_OFILE)
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | #define RLIMIT_NOFILE RLIMIT_OFILE
#endif
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | |
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | struct rlimit lim;
if(getrlimit(RLIMIT_NOFILE,&lim))
{
limit = MAX_FD;
}else{
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | if(lim.rlim_max == RLIM_INFINITY)
{
|
c0d65d | 2000-05-20 | Per Hedbor | | limit = 1024 * 1024 * 2; /* Noone needs more :-) */
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | }else{
limit=lim.rlim_max;
|
c0d65d | 2000-05-20 | Per Hedbor | | if(limit > 1024 * 1024 * 2) limit= 1024 * 1024 * 2;
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | }
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | }
#else
limit = MAX_FD;
#endif
f=fopen("conftest.out.2","w");
|
f90e54 | 1995-08-17 | Fredrik Hübinette (Hubbe) | | fprintf(f,"%ld\n",(long)limit);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | fclose(f);
return 0;
}
],
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_max_open_fd=`cat conftest.out.2`
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | ,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_max_open_fd=256
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ,
pike_cv_max_open_fd=256
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | )])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_max_open_fd)
AC_DEFINE_UNQUOTED(MAX_OPEN_FILEDESCRIPTORS,$pike_cv_max_open_fd)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
AC_MSG_CHECKING(full availability of struct rusage members)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_func_getrusage_full,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_LINK([
#include <sys/time.h>
#ifdef HAVE_SYS_RUSAGE_H
#include <sys/rusage.h>
#endif
#include <sys/resource.h>
#ifndef RUSAGE_SELF
#define RUSAGE_SELF 0
#endif
],[
struct rusage rus;
long *v = (long *)main;
getrusage(RUSAGE_SELF, &rus);
*v++ = rus.ru_maxrss;
*v++ = rus.ru_ixrss;
*v++ = rus.ru_idrss;
*v++ = rus.ru_isrss;
*v++ = rus.ru_minflt;
*v++ = rus.ru_majflt;
*v++ = rus.ru_nswap;
*v++ = rus.ru_inblock;
*v++ = rus.ru_oublock;
*v++ = rus.ru_msgsnd;
*v++ = rus.ru_msgrcv;
*v++ = rus.ru_nsignals;
*v++ = rus.ru_nvcsw;
*v++ = rus.ru_nivcsw;
],
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_func_getrusage_full=yes
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | ,
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | pike_cv_func_getrusage_full=no
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | )])
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "$pike_cv_func_getrusage_full" = yes; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(all there)
else
AC_MSG_RESULT(getrusage is restricted)
AC_DEFINE(GETRUSAGE_RESTRICTED)
fi
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | ########################################################################
|
d20354 | 1998-06-10 | Fredrik Hübinette (Hubbe) | | #
# IRIX also has procfs support, but it it different, a separate test
# should be made. /Hubbe
#
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
221347 | 1997-09-16 | Henrik Grubbström (Grubba) | | if test "$ac_cv_header_sys_procfs_h" = "yes"; then
AC_MSG_CHECKING(getrusage() through procfs)
AC_CACHE_VAL(pike_cv_getrusage_procfs, [
AC_TRY_COMPILE([
|
c5f17c | 1998-06-04 | Henrik Grubbström (Grubba) | | #ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE 1
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #include <sys/procfs.h>
#include <sys/fcntl.h>
int proc_fd;
|
d20354 | 1998-06-10 | Fredrik Hübinette (Hubbe) | | long tmp;
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | char proc_name[20];
|
c5f17c | 1998-06-04 | Henrik Grubbström (Grubba) | | prusage_t pru;
|
221347 | 1997-09-16 | Henrik Grubbström (Grubba) | | ],[
sprintf(proc_name, "/proc/%05d", getpid());
proc_fd = open(proc_name, O_RDONLY);
ioctl(proc_fd, PIOCUSAGE, &pru);
|
d20354 | 1998-06-10 | Fredrik Hübinette (Hubbe) | | tmp=pru.pr_utime.tv_sec;
|
221347 | 1997-09-16 | Henrik Grubbström (Grubba) | | ],
pike_cv_getrusage_procfs=yes
,
pike_cv_getrusage_procfs=no
)
])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
eb42e8 | 1997-09-16 | Henrik Grubbström (Grubba) | | if test "$pike_cv_getrusage_procfs" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(GETRUSAGE_THROUGH_PROCFS)
else
AC_MSG_RESULT(no)
fi
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | fi
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
bdb509 | 1996-09-25 | Fredrik Hübinette (Hubbe) | |
|
76aa1f | 2000-03-25 | Fredrik Hübinette (Hubbe) | | if test "$ac_cv_getrusage_procfs" = "yes"; then
AC_MSG_CHECKING(prstatus_t contains pr_brksize and pr_stksize)
AC_CACHE_VAL(pike_cv_getrusage_procfs_prs, [
AC_TRY_COMPILE([
#ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE 1
#endif
#include <sys/procfs.h>
#include <sys/fcntl.h>
int proc_fd;
long tmp;
char proc_name[20];
prstatus_t prs;
],[
sprintf(proc_name, "/proc/%05d", getpid());
proc_fd = open(proc_name, O_RDONLY);
ioctl(proc_fd, PIOCSTATUS, &prs);
tmp=prs.pr_brksize + prs.pr_stksize;
],
pike_cv_getrusage_procfs_prs=yes
,
pike_cv_getrusage_procfs_prs=no
)
])
if test "$pike_cv_getrusage_procfs_prs" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(GETRUSAGE_THROUGH_PROCFS_PRS)
else
AC_MSG_RESULT(no)
fi
fi
#############################################################################
|
371176 | 1998-05-18 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(for isgraph)
|
b2018d | 1998-10-23 | Henrik Grubbström (Grubba) | | AC_CACHE_VAL(pike_cv_func_isgraph, [ AC_TRY_LINK([
|
371176 | 1998-05-18 | Henrik Grubbström (Grubba) | | #include <ctype.h>
], [
return(!isgraph('A'));
], pike_cv_func_isgraph=yes, pike_cv_func_isgraph=no)
])
AC_MSG_RESULT($pike_cv_func_isgraph)
if test "x$pike_cv_func_isgraph" = "xyes" ; then
AC_DEFINE(HAVE_ISGRAPH)
else :; fi
|
94cf72 | 1998-07-11 | Henrik Grubbström (Grubba) | | #############################################################################
#
# __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([
#ifdef HAVE_STRING_H
#include <string.h>
#else /* !HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRIGNS_H */
#endif /* HAVE_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
|
7f4195 | 1998-07-11 | Henrik Grubbström (Grubba) | | # gcc has __FUNCTION__ instead.
AC_MSG_CHECKING(if __FUNCTION__ exists and works)
AC_CACHE_VAL(pike_cv_have_working___FUNCTION__,
[
AC_TRY_RUN([
#ifdef HAVE_STRING_H
#include <string.h>
#else /* !HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRIGNS_H */
#endif /* HAVE_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__)
if test "$pike_cv_have_working___FUNCTION__" = yes; then
AC_DEFINE(HAVE_WORKING___FUNCTION__)
else :; fi
|
371176 | 1998-05-18 | Henrik Grubbström (Grubba) | | #############################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(for gcc function attributes)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_gcc_attributes,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
AC_TRY_RUN([
#include <stdarg.h>
void fatal(char *foo,...) __attribute__ ((noreturn,format (printf,1,2)));
int sqr(int x) __attribute__ ((const));
int sqr(int x) { return x*x; }
void fatal(char *foo,...)
{
va_list args;
va_start(foo,args);
printf(foo,args);
va_end(args);
exit(2);
}
|
efad7a | 1998-10-28 | Henrik Grubbström (Grubba) | |
int main() { exit(0); }
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ], pike_cv_gcc_attributes=yes, pike_cv_gcc_attributes=no, pike_cv_gcc_attributes=no)])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_gcc_attributes)
if test "$pike_cv_gcc_attributes" = yes; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_DEFINE(HAVE_FUNCTION_ATTRIBUTES)
fi
|
f96866 | 2000-08-21 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(for lc __declspec)
AC_CACHE_VAL(pike_cv_lc___declspec,
[
AC_TRY_RUN([
#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 <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);
}
], [
exit(0);
], pike_cv_lc___declspec=yes, pike_cv_lc___declspec=no)
])
])
AC_MSG_RESULT($pike_cv_lc___declspec)
if test "$pike_cv_lc___declspec" = yes; then
AC_DEFINE(HAVE_DECLSPEC)
fi
|
7a5e47 | 1999-11-22 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
68debd | 1997-09-12 | Henrik Grubbström (Grubba) | | AC_MSG_CHECKING(how to concatenate two symbols)
AC_CACHE_VAL(pike_cv_cpp_symbol_concat, [
AC_TRY_COMPILE([
|
897653 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | int AABB=0;
|
68debd | 1997-09-12 | Henrik Grubbström (Grubba) | | #define CONCAT(X,Y) X##Y
], [
return CONCAT(AA,BB);
], pike_cv_cpp_symbol_concat=ANSI, [
AC_TRY_COMPILE([
|
897653 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | int AABB=0;
|
68debd | 1997-09-12 | Henrik Grubbström (Grubba) | | #define CONCAT(X,Y) X/**/Y
], [
return CONCAT(AA,BB);
], pike_cv_cpp_symbol_concat=KR, [
pike_cv_cpp_symbol_concat=Unknown
])
])
])
AC_MSG_RESULT($pike_cv_cpp_symbol_concat)
case "$pike_cv_cpp_symbol_concat" in
"ANSI")
AC_DEFINE(HAVE_ANSI_CONCAT)
;;
"KR")
AC_DEFINE(HAVE_KR_CONCAT)
;;
esac
|
c411dc | 1997-04-21 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(how to set things nonblocking)
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_CACHE_VAL(pike_cv_sys_nonblock,
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | [
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | # Kludge needed for AmigaOS
|
092a0e | 1997-03-05 | Henrik Grubbström (Grubba) | | if test "$pike_cv_sys_os" = "AmigaOS" ; then
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | pike_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK
else
|
ed7aeb | 2000-06-16 | Henrik Grubbström (Grubba) | | # Make sure we can run configure in a separate directory.
OCPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$srcdir $CPPFLAGS"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | AC_TRY_RUN([
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #define TESTING
#define USE_FCNTL_FNDELAY
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "fd_control.c"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | ], pike_cv_sys_nonblock=USE_FCNTL_FNDELAY,
AC_TRY_RUN([
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #define TESTING
#define USE_FCNTL_O_NDELAY
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "fd_control.c"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | ], pike_cv_sys_nonblock=USE_FCNTL_O_NDELAY,
AC_TRY_RUN([
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #define TESTING
#define USE_FCNTL_O_NONBLOCK
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "fd_control.c"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | ], pike_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK,
AC_TRY_RUN([
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #define TESTING
#define USE_IOCTL_FIONBIO
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "fd_control.c"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | ], pike_cv_sys_nonblock=USE_IOCTL_FIONBIO,
|
bdfb86 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | AC_TRY_RUN([
#define TESTING
#define USE_IOCTLSOCKET_FIONBIO
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "fd_control.c"
|
bdfb86 | 1997-12-22 | Fredrik Hübinette (Hubbe) | | ], pike_cv_sys_nonblock=USE_IOCTLSOCKET_FIONBIO,
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | pike_cv_sys_nonblock=UNKNOWN,
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | unset pike_cv_sys_nonblock),
unset pike_cv_sys_nonblock),
unset pike_cv_sys_nonblock),
unset pike_cv_sys_nonblock),
unset pike_cv_sys_nonblock)
|
ed7aeb | 2000-06-16 | Henrik Grubbström (Grubba) | | # Restore CPPFLAGS
CPPFLAGS="$OCPPFLAGS"
|
59bc1b | 1997-01-22 | Bernhard Fastenrath | | fi
])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | if test "${pike_cv_sys_nonblock}" = ""; then
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT(none found)
else
|
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($pike_cv_sys_nonblock)
AC_DEFINE_UNQUOTED($pike_cv_sys_nonblock)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | fi
rm -f core
|
bcf946 | 1998-01-27 | Fredrik Hübinette (Hubbe) | | ##########################################################################
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | |
# Set info about shared libraries.
AC_SUBST(SO)
AC_SUBST(LDSHARED)
AC_SUBST(CCSHARED)
AC_SUBST(LINKFORSHARED)
# SO is the extension of shared libraries
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | # -- usually so, sl on HP-UX
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(SO)
if test -z "$SO"
then
|
092a0e | 1997-03-05 | Henrik Grubbström (Grubba) | | case "$pike_cv_sys_os" in
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | hp*|HP*) SO=sl;;
*) SO=so;;
esac
fi
AC_MSG_RESULT($SO)
# LDSHARED is the ld *command* used to create shared library
# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
AC_MSG_CHECKING(LDSHARED)
|
9ab446 | 1998-11-06 | Honza Petrous | | if test -z "$LDSHARED" ; then
case "$pike_cv_sys_os" in
AIX*)
if test "$GCC" = yes ; then
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | if test "`uname -r`" -ge 2 -a "`uname -v`" -eq 4 ; then
|
9ab446 | 1998-11-06 | Honza Petrous | | LDSHARED="ld -G -bexpall"
else if test "`uname -v`" -gt 4 ; then
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | # AIX 5L+
LDSHARED="ld -G"
|
e0a6aa | 1997-12-12 | Henrik Grubbström (Grubba) | | else
|
9ab446 | 1998-11-06 | Honza Petrous | | # AIX 4.1 and earlier don't have/have unreliable
# handling of dlopen et al.
#
# Even AIX 4.2.1 has buggy dlopen -- NEVER attempt
# to dlopen a file that hasn't been linked with -G.
pike_cv_sys_dynamic_loading=no
LDSHARED="ld"
|
e0a6aa | 1997-12-12 | Henrik Grubbström (Grubba) | | fi
|
9ab446 | 1998-11-06 | Honza Petrous | | fi
else
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | if test "`uname -r`" -ge 3 -a "`uname -v`" -eq 4 ; then
|
2a5054 | 2000-10-24 | Henrik Grubbström (Grubba) | | LDSHARED="ld -G -bexpall"
else if test "`uname -v`" -gt 4 ; then
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | # AIX 5L+
LDSHARED="ld -G"
|
2a5054 | 2000-10-24 | Henrik Grubbström (Grubba) | | else
# AIX 4.1 and earlier don't have/have unreliable
# handling of dlopen et al.
#
# Even AIX 4.2.1 has buggy dlopen -- NEVER attempt
# to dlopen a file that hasn't been linked with -G.
pike_cv_sys_dynamic_loading=no
LDSHARED="ld"
fi
fi
|
9ab446 | 1998-11-06 | Honza Petrous | | fi
;;
IRIX*)
if test "$GCC" = yes ; then
# egcs defaults to building -n32 objects
LDSHARED="ld -shared -n32"
else
LDSHARED="ld -shared"
fi
# -woff isn't understood by ld on Irix 5.
if test "`uname -r`" -ge 6 ; then
LDSHARED="$LDSHARED -woff 84,85,134"
else :; fi
;;
SunOS*) LDSHARED="ld";;
Solaris) LDSHARED="/usr/ccs/bin/ld -G";;
hp*|HP*) LDSHARED="ld -b";;
OSF*) LDSHARED="ld -expect_unresolved '*' -shared -msym -O3";;
DYNIX/ptx*) LDSHARED="ld -G";;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | next*) LDSHARED="$CC $CFLAGS -nostdlib -r";;
|
9ab446 | 1998-11-06 | Honza Petrous | | Linux*) LDSHARED="$CC -shared";;
GNU*) LDSHARED="ld -Bshareable";;
|
6da30c | 2000-02-19 | Fredrik Hübinette (Hubbe) | | FreeBSD*) LDSHARED="$CC -Wl,-Bshareable";;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | NetBSD*) LDSHARED="ld -Bshareable";;
|
9ab446 | 1998-11-06 | Honza Petrous | | OpenBSD*) LDSHARED="ld -Bshareable";;
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | BSD/OS*)
case "`uname -r`" in
4.*) LDSHARED="$CC -shared";;
*) LDSHARED="shlicc -r";;
esac
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | SCO_SV*) LDSHARED="cc -G -KPIC -Wl,-Bexport";;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | UNIX_SV*) LDSHARED="ld -G";;
UnixWare*)
|
9ab446 | 1998-11-06 | Honza Petrous | | if test "$GCC" = yes ; then
LDSHARED="ld -G"
else
LDSHARED="cc -G -KPIC -Wl,-Bexport"
fi
;;
|
9b15e0 | 2000-12-22 | Fredrik Hübinette (Hubbe) | | Windows_NT*)
LDSHARED="pntld"
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | *) LDSHARED="ld";;
esac
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | fi
AC_MSG_RESULT($LDSHARED)
# CCSHARED are the C *flags* used to create objects to go into a shared
# library -- this is only needed for a few systems
AC_MSG_CHECKING(CCSHARED)
|
371f75 | 1999-04-29 | Martin Stjernholm | | AC_CACHE_VAL(pike_cv_sys_ccshared,[
if test -z "$CCSHARED" ; then
if test "$GCC" = yes ; then
|
08af09 | 2000-04-12 | Marcus Comstedt | | case "$pike_cv_sys_os" in
|
371f75 | 1999-04-29 | Martin Stjernholm | | BSD/OS*)
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | case "`uname -r`" in
4.*) CCSHARED="-fPIC";;
*) CCSHARED="";;
esac
|
371f75 | 1999-04-29 | Martin Stjernholm | | ;;
Solaris*)
# The Image module runs out of symbol reference space unless we
# use the large PIC model:
# ld: fatal: too many symbols require `small' PIC references:
# have 2205, maximum 2048 -- recompile some modules -K PIC.
CCSHARED="-fPIC"
;;
*)
|
34e291 | 2000-08-29 | Fredrik Hübinette (Hubbe) | | CCSHARED="-fPIC"
|
371f75 | 1999-04-29 | Martin Stjernholm | | ;;
esac
else
|
08af09 | 2000-04-12 | Marcus Comstedt | | case "$pike_cv_sys_os" in
|
fcf073 | 2000-03-28 | Fredrik Hübinette (Hubbe) | | IRIX*)
AC_SYS_COMPILER_FLAG(-share,cc_shared,CCSHARED)
;;
|
371f75 | 1999-04-29 | Martin Stjernholm | | hp*|HP*) CCSHARED="+z"; ;;
FreeBSD*) CCSHARED="-fpic";;
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
ede481 | 1999-08-25 | Henrik Grubbström (Grubba) | | UnixWare*) CCSHARED="-KPIC -dy -Bdynamic";;
|
371f75 | 1999-04-29 | Martin Stjernholm | | Solaris*) CCSHARED="-KPIC -Bdynamic";;
Windows_NT*) CCSHARED="-shared" ;;
esac
fi
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | fi
|
371f75 | 1999-04-29 | Martin Stjernholm | | OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CCSHARED"
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | AC_TRY_COMPILE([], [exit(0);],
|
371f75 | 1999-04-29 | Martin Stjernholm | | pike_cv_sys_ccshared="$CCSHARED", pike_cv_sys_ccshared='')
CFLAGS="$OLD_CFLAGS"
])
CCSHARED="$pike_cv_sys_ccshared"
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($CCSHARED)
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | | AC_MSG_CHECKING(LINKFORSHARED)
AC_CACHE_VAL(pike_cv_sys_linkforshared,[
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | # LINKFORSHARED are the flags passed to the $(CC) command that links
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | # the pike executable -- this is only needed for a few systems
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | if test -z "$LINKFORSHARED"
then
|
964949 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | LINKFORSHARED=""
|
bb55f8 | 1997-03-16 | Fredrik Hübinette (Hubbe) | | if test "$GCC" = yes ; then
|
08af09 | 2000-04-12 | Marcus Comstedt | | case "$pike_cv_sys_os" in
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | AIX*)
if test "`uname -v`" -gt 4 ; then
# This is probably wrong, but I don't have a man page for ld yet.
LINKFORSHARED=""
else
LINKFORSHARED="-Wl,-bexpall -Wl,-brtl"
fi
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | hp*|HP*) LINKFORSHARED="-Wl,-E";;
Linux*) LINKFORSHARED="-rdynamic";;
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | BSD/OS*)
case "`uname -r`" in
4.*) LINKFORSHARED="-rdynamic";;
esac
;;
BSD/OS*)
case "`uname -r`" in
4.*) LINKFORSHARED="-rdynamic";;
esac
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | GNU*) LINKFORSHARED="-rdynamic";;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | next*) LINKFORSHARED="-u libsys_s";;
|
9ab446 | 1998-11-06 | Honza Petrous | | SCO_SV*) LINKFORSHARED="-fpic -Wl,-Bexport";;
# What about UNIX_SV?
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | UnixWare*) LINKFORSHARED="-fpic -Wl,-Bexport";;
|
9ab446 | 1998-11-06 | Honza Petrous | |
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | FreeBSD*)
|
9ab446 | 1998-11-06 | Honza Petrous | | AC_TRY_RUN([int main(){exit(
|
9db92d | 1998-11-06 | Fredrik Hübinette (Hubbe) | | #ifdef __ELF__
0
#else
1
#endif
);}
|
9ab446 | 1998-11-06 | Honza Petrous | | ],LINKFORSHARED=-rdynamic)
;;
|
bb55f8 | 1997-03-16 | Fredrik Hübinette (Hubbe) | | esac
else
|
08af09 | 2000-04-12 | Marcus Comstedt | | case "$pike_cv_sys_os" in
|
05ca9b | 2000-12-18 | Henrik Grubbström (Grubba) | | AIX*)
if test "`uname -v`" -gt 4 ; then
LINKFORSHARED="-Bexport"
else
LINKFORSHARED="-Wl,-bexpall -Wl,-brtl"
fi
;;
|
9ab446 | 1998-11-06 | Honza Petrous | | hp*|HP*) LINKFORSHARED="-Wl,-E";;
Linux*) LINKFORSHARED="-rdynamic";;
GNU*) LINKFORSHARED="-rdynamic";;
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | next*) LINKFORSHARED="-u libsys_s";;
|
9ab446 | 1998-11-06 | Honza Petrous | | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
# What about UNIX_SV?
|
372426 | 1999-08-25 | Henrik Grubbström (Grubba) | | UnixWare*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | esac
|
bb55f8 | 1997-03-16 | Fredrik Hübinette (Hubbe) | | fi
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | fi
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | |
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $LINKFORSHARED"
|
b298e0 | 1997-04-16 | Fredrik Hübinette (Hubbe) | | AC_TRY_RUN([int main() { exit(0); }],
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | pike_cv_sys_linkforshared="$LINKFORSHARED", pike_cv_sys_linkforshared='', pike_cv_sys_linkforshared='')
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | | CFLAGS="$OLD_CFLAGS"
])
LINKFORSHARED="$pike_cv_sys_linkforshared"
|
7b3941 | 1997-02-06 | Fredrik Hübinette (Hubbe) | | AC_MSG_RESULT($LINKFORSHARED)
#############################################################################
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | cat >conftest.c <<EOF
|
a99145 | 1997-07-08 | Fredrik Hübinette (Hubbe) | | #include <stdio.h>
|
559196 | 2000-12-05 | Marcus Comstedt | | #include <stdlib.h>
|
a99145 | 1997-07-08 | Fredrik Hübinette (Hubbe) | | void testfunc(void) {
fprintf(stderr,"Calling testfunc2\n");
testfunc2();
fprintf(stderr,"testfunc2 returned!\n");
exit(1);
}
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | EOF
AC_MSG_CHECKING(if dynamic loading works)
AC_CACHE_VAL(pike_cv_sys_dynamic_loading,
[
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | | echo $CC -c $CFLAGS $CCSHARED conftest.c -o conftest.o 1>&5
$CC -c $CFLAGS $CCSHARED conftest.c -o conftest.o 1>&5 2>&5
echo $BINDIR/smartlink $LDSHARED $LDFLAGS conftest.o -o conftest.$SO 1>&5
$BINDIR/smartlink $LDSHARED $LDFLAGS conftest.o -o conftest.$SO 1>&5 2>&5
if test -f conftest.$SO ; then
mv conftest.$SO myconftest.so
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $LINKFORSHARED"
|
080971 | 1998-02-27 | Marcus Comstedt | | OLD_CC="$CC"
case "$LD" in
|
633b03 | 1998-07-16 | Fredrik Hübinette (Hubbe) | | *shlicc)
CC="$BINDIR/smartlink shlicc"
;;
|
080971 | 1998-02-27 | Marcus Comstedt | | esac
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | AC_TRY_RUN([
#define TESTING
|
d4f9e9 | 2000-05-19 | Martin Stjernholm | | #include "dynamic_load.c"
|
b298e0 | 1997-04-16 | Fredrik Hübinette (Hubbe) | | void testfunc2(void) { exit(0); }
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | ], pike_cv_sys_dynamic_loading=yes, pike_cv_sys_dynamic_loading=no, pike_cv_sys_dynamic_loading=no)
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | | CFLAGS="$OLD_CFLAGS"
|
080971 | 1998-02-27 | Marcus Comstedt | | CC="$OLD_CC"
|
633b03 | 1998-07-16 | Fredrik Hübinette (Hubbe) | | else
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | pike_cv_sys_dynamic_loading=no
|
334e3d | 1997-04-16 | Fredrik Hübinette (Hubbe) | | fi
rm -f myconftest.so >/dev/null 2>/dev/null
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | ])
AC_MSG_RESULT($pike_cv_sys_dynamic_loading)
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | |
if test "x$with_dynamic_modules" = "x" ; then
if test x$pike_cv_sys_dynamic_loading = xno ; then
with_dynamic_modules=no
else
with_dynamic_modules=yes
if test x$pike_cv_func_dlopen$ac_cv_func_dld_link$ac_cv_func_shl_load = xnonono;
then
|
1807bd | 2000-11-28 | Fredrik Hübinette (Hubbe) | | # Dynamic loading is now WORKING (maybe)
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | | # if test x"$pike_cv_sys_os" != xWindows_NT ; then
with_dynamic_modules=no
# fi
fi
fi
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | fi
|
f038d3 | 1999-10-03 | Fredrik Hübinette (Hubbe) | | #######################################################################
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | # Since configure doesn't always know if we will be linking with ld or cc,
# We use this little code snippet to add flags to ld that would otherwise
# be given automatically by $(CC) $(CFLAGS)
# /Hubbe
#
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | if test "$ldflags_is_set" = no ; then
case "x$LD $LDFLAGS" in
*\$\(CFLAGS\)*)
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | # Options in CFLAGS, no stuff needs to be added
;;
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | x$CC*|x\$\(CC\)*)
LD="$LD \$(CFLAGS)"
;;
*)
LD="$LD ${LD_FALLBACK_FLAGS-}"
;;
esac
case "x$LDSHARED $LDFLAGS" in
*\$\(CFLAGS\)*)
|
b1466e | 2000-03-26 | Fredrik Hübinette (Hubbe) | | # Options in CFLAGS, no stuff needs to be added
;;
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | x$CC*|x\$\(CC\)*)
LDSHARED="$LDSHARED \$(CFLAGS)"
;;
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | *)
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | LDSHARED="$LDSHARED ${LD_FALLBACK_FLAGS-}"
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | | ;;
esac
|
7e4d4e | 2000-12-13 | Fredrik Hübinette (Hubbe) | | fi
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | |
|
f038d3 | 1999-10-03 | Fredrik Hübinette (Hubbe) | | #######################################################################
# Since all $OPTIMIZE flags have to be automatically included in $CFLAGS
# (because otherwise the tests will not be accurate) we have to remove all
# OPTIMIZE flags from the regular CFLAGS...
NEW_CFLAGS=
for opt in ${CFLAGS-}
do
case " $OPTIMIZE " in
*\ $opt\ *) ;;
*)
case "$opt" in
-O2|-pipe) OPTIMIZE="${OPTIMIZE-} $opt" ;;
*) NEW_CFLAGS="$NEW_CFLAGS $opt" ;;
esac
;;
esac
done
CFLAGS="$NEW_CFLAGS"
##########################################################################
|
119276 | 1999-05-26 | Fredrik Hübinette (Hubbe) | | case "x$pike_cv_sys_os" in
xSolaris | xAIX)
|
22c21e | 1999-06-19 | Fredrik Hübinette (Hubbe) | | if grep _REENTRANT confdefs.h >/dev/null 2>&1; then
AC_DEFINE(USE_WAIT_THREAD)
else
AC_DEFINE(USE_SIGCHILD)
fi
|
119276 | 1999-05-26 | Fredrik Hübinette (Hubbe) | | ;;
|
d0be14 | 1999-05-27 | Fredrik Hübinette (Hubbe) | | xWindows_NT)
|
119276 | 1999-05-26 | Fredrik Hübinette (Hubbe) | | ;;
*)
AC_DEFINE(USE_SIGCHILD)
;;
esac
|
284e06 | 1998-11-09 | Fredrik Hübinette (Hubbe) | |
|
43a6c8 | 1999-11-24 | Fredrik Hübinette (Hubbe) | | #############################################################################
if test "x$with_copt" = xno ; then
OPTIMIZE=
|
2f9254 | 2001-01-18 | Fredrik Hübinette (Hubbe) | |
dnl The unused code below can be used to implement a good/bad-list
dnl to determine when to zap the -O2 for buggy gccs...
dnl
dnl else
dnl
dnl if test "x$GCC" = xyes; then
dnl BAD=unknown
dnl case `gcc -v 2>&1` in
dnl */i?86-*/2.95.3/*19991030*) BAD=no ;;
dnl esac
dnl fi
|
43a6c8 | 1999-11-24 | Fredrik Hübinette (Hubbe) | | fi
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | |
#############################################################################
if test x$with_dynamic_modules = xyes ; then
dmmsrc="modules/dynamic_module_makefile.in"
CCSHARED="${CCSHARED} -DDYNAMIC_MODULE"
else
dmmsrc="modules/static_module_makefile.in"
fi
|
6052f6 | 1998-06-06 | Henrik Grubbström (Grubba) | | #############################################################################
echo
echo "Compiler summary:"
echo
echo "C Compiler: $CC"
echo "Linker: $LD"
echo "Shared linker: $LDSHARED"
echo
echo "Shared object extension: $SO"
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | | echo "Dynamic modules: $with_dynamic_modules"
|
6052f6 | 1998-06-06 | Henrik Grubbström (Grubba) | | echo
echo "CPPFLAGS: $CPPFLAGS"
echo "CFLAGS: $CFLAGS"
echo "CCSHARED: $CCSHARED"
echo "LINKFORSHARED: $LINKFORSHARED"
|
e48c38 | 1998-07-29 | Marcus Comstedt | | echo "LIBGCC: $LIBGCC"
|
6052f6 | 1998-06-06 | Henrik Grubbström (Grubba) | | echo "WARN: $WARN"
|
91006b | 2000-03-21 | Fredrik Hübinette (Hubbe) | | echo "PROFIL: $PROFIL"
|
6052f6 | 1998-06-06 | Henrik Grubbström (Grubba) | | echo "OPTIMIZE: $OPTIMIZE"
echo "LDFLAGS: $LDFLAGS"
|
c371d4 | 1998-06-07 | Simon Coggins | | echo "LIBS: $LIBS"
|
ab0bfa | 1998-07-06 | Martin Stjernholm | | echo "prefix: $prefix"
|
6052f6 | 1998-06-06 | Henrik Grubbström (Grubba) | | echo
|
e1195f | 1997-03-23 | Fredrik Hübinette (Hubbe) | | #############################################################################
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
f2328f | 1997-09-17 | Henrik Grubbström (Grubba) | | export LDFLAGS CFLAGS CPPFLAGS LIBS
|
2e99df | 1999-06-24 | Fredrik Hübinette (Hubbe) | | export prefix exec_prefix OTHERFLAGS
export TMP_BINDIR DEFINES INSTALL
|
b5d929 | 1997-01-30 | Henrik Grubbström (Grubba) | |
|
68e8ab | 1999-11-07 | Per Hedbor | | AC_CONFIG_SUBDIRS(modules post_modules)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
c37c7e | 1999-03-26 | Fredrik Hübinette (Hubbe) | | default_master=$prefix/pike/%d.%d.%d/lib/master.pike
|
af5647 | 1996-12-03 | Fredrik Hübinette (Hubbe) | | AC_DEFINE_UNQUOTED(DEFAULT_MASTER,"$default_master")
|
6265aa | 1997-01-18 | Fredrik Hübinette (Hubbe) | | AC_SUBST_FILE(dependencies)
dependencies=$srcdir/dependencies
|
26e7e7 | 1996-04-23 | Fredrik Hübinette (Hubbe) | | AC_SUBST(YACC)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_SUBST(INSTALL)
AC_SUBST(WARN)
|
91006b | 2000-03-21 | Fredrik Hübinette (Hubbe) | | AC_SUBST(PROFIL)
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | AC_SUBST(OPTIMIZE)
AC_SUBST(EXTRA_OBJS)
AC_SUBST(RANLIB)
|
51bd9e | 1996-10-09 | Fredrik Hübinette (Hubbe) | | AC_SUBST(DEBUGDEF)
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | | AC_SUBST(EXTRA_MODULE_REQUIREMENTS)
|
a4f7de | 1998-01-13 | Fredrik Hübinette (Hubbe) | | AC_SUBST(ac_configure_args)
|
8334e3 | 1999-01-29 | Fredrik Hübinette (Hubbe) | | pike_cv_prog_CC="${CC}"
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
6fa228 | 1997-11-04 | Henrik Grubbström (Grubba) | | AC_SUBST(dmmsrc)
|
3a5b1d | 2000-05-24 | Fredrik Hübinette (Hubbe) | | AC_OUTPUT(Makefile modules/static_module_makefile post_modules/static_module_makefile:modules/static_module_makefile.in modules/dynamic_module_makefile:$dmmsrc post_modules/dynamic_module_makefile:$dmmsrc precompile.sh,[echo foo >stamp-h ; chmod +x precompile.sh])
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|