Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

2150 lines (1697 sloc) 68.475 kb
# Configure template for Gambit-C system.
# Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
# Process this file with autoconf to produce a configure script.
AC_INIT(Gambit-C,v4.6.3,gambit@iro.umontreal.ca,gambc-v4_6_3)
AC_CONFIG_HEADERS(include/config.h)
PACKAGE_SHORTNAME="gambc"
AC_SUBST(PACKAGE_SHORTNAME)
AC_SUBST(PACKAGE_NAME)
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(PACKAGE_STRING)
AC_SUBST(PACKAGE_BUGREPORT)
AC_SUBST(PACKAGE_TARNAME)
AC_COPYRIGHT([[Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.]])
AC_CONFIG_SRCDIR(include/gambit.h.in)
AC_PREFIX_DEFAULT(/usr/local/$PACKAGE_NAME)
AC_CANONICAL_SYSTEM
###############################################################################
#
# Accumulate subsystems to include in runtime library.
RTLIBSUBSYS=""
###############################################################################
#
# To accumulate flags and definitions for C compilation.
GAMBCLIB_DEFS=""
FLAGS_OBJ=""
FLAGS_DYN=""
FLAGS_LIB=""
FLAGS_EXE=""
FLAGS_OBJ_DYN=""
FLAGS_OBJ_DYN_LIB_EXE=""
FLAGS_DYN_LIB=""
DEFS_OBJ=""
DEFS_DYN="-D___DYNAMIC"
DEFS_LIB=""
DEFS_EXE=""
DEFS_OBJ_DYN_LIB_EXE=""
###############################################################################
#
# Check if the system must be compiled using the C compiler or C++ compiler.
AC_ARG_ENABLE(cplusplus,
AC_HELP_STRING([--enable-cplusplus],
[compile using C++ compiler (default is NO)]),
ENABLE_CPLUSPLUS=$enableval,
ENABLE_CPLUSPLUS=no)
if test "${CFLAGS+set}" != set; then
CFLAGS=""
fi
if test "${CXXFLAGS+set}" != set; then
CXXFLAGS=""
fi
if test "${LDFLAGS+set}" != set; then
LDFLAGS=""
fi
case "$target_os" in
darwin*) if test "$CC" = ""; then
SEARCH_LIST_FOR_CC="i686-apple-darwin11-gcc-4.2.1 i686-apple-darwin10-gcc-4.2.1 clang"
for cc in $SEARCH_LIST_FOR_CC; do
AC_CHECK_PROG(HAVE_SPECIAL_CC, $cc, yes)
if test "$HAVE_SPECIAL_CC" = yes; then
CC=$cc
break
fi
unset ac_cv_prog_HAVE_SPECIAL_CC
done
fi
if test "$CXX" = "" -a "$ENABLE_CPLUSPLUS" = yes; then
SEARCH_LIST_FOR_CXX="i686-apple-darwin11-g++-4.2.1 i686-apple-darwin10-g++-4.2.1 clang++"
for cxx in $SEARCH_LIST_FOR_CXX; do
AC_CHECK_PROG(HAVE_SPECIAL_CXX, $cxx, yes)
if test "$HAVE_SPECIAL_CXX" = yes; then
CXX=$cxx
break
fi
unset ac_cv_prog_HAVE_SPECIAL_CXX
done
fi
;;
esac
AC_LANG(C)
AC_PROG_CC
AC_PROG_CPP
C_COMPILER=$CC
C_PREPROC=$CPP
if test "$ENABLE_CPLUSPLUS" = yes; then
AC_LANG(C++)
AC_PROG_CXX
AC_PROG_CXXCPP
C_COMPILER=$CXX
C_PREPROC=$CXXCPP
fi
AC_SUBST(C_COMPILER)
AC_SUBST(C_PREPROC)
AC_SUBST(C_COMPILER_MF)
AC_SUBST(C_PREPROC_MF)
AC_SUBST(C_COMPILER_SH)
AC_SUBST(C_PREPROC_SH)
AC_SUBST(C_COMPILER_BAT)
AC_SUBST(C_PREPROC_BAT)
###############################################################################
#
# Check if the system must include GUIDE (Gambit Universal IDE).
AC_ARG_ENABLE(guide,
AC_HELP_STRING([--enable-guide],
[include the Gambit Universal IDE (default is NO)]),
ENABLE_GUIDE=$enableval,
ENABLE_GUIDE=no)
if test "$ENABLE_GUIDE" = yes; then
if test "$ENABLE_CPLUSPLUS" = yes; then
# Determine if Qt is available, if the version is good, etc
ac_qmake='qmake -o conftest.qt /dev/null >&5'
rm -f conftest.qt
if { (eval echo "$as_me:$LINENO: \"$ac_qmake\"") >&5
(eval $ac_qmake) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
ac_qt_version_check="grep -q '^# Generated by qmake ([^)]*) (Qt 3\\.3\\..*' conftest.qt"
if { (eval echo "$as_me:$LINENO: \"$ac_qt_version_check\"") >&5
(eval $ac_qt_version_check) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
QTINCPATH=`sed -n -e '/^INCPATH[[ ]]*=[[ ]]*\(.*\)/s//\1/p' conftest.qt`
QTLIBS=`sed -n -e '/^LIBS[[ ]]*=[[ ]]*\\\$(SUBLIBS)[[ ]]*\(.*\)/s//\1/p' conftest.qt`
else
qt_version=`sed -n -e '/^# Generated by qmake (\([^)]*\)) (Qt \([0-9]*\.[0-9]*\).*/s//\2/p' conftest.qt`
ENABLE_GUIDE=no
AC_MSG_NOTICE([
************************************************************************
*** ***
*** The Gambit Universal IDE requires that the system be built using ***
*** the Qt GUI library version 3.3. Version $qt_version of Qt is currently ***
*** installed. ***
*** ***
************************************************************************
])
fi
else
ENABLE_GUIDE=no
AC_MSG_NOTICE([
************************************************************************
*** ***
*** The Gambit Universal IDE requires that the system be built using ***
*** the Qt GUI library. This library could not be located. Make ***
*** sure that the program qmake is in your PATH. ***
*** ***
************************************************************************
])
fi
else
ENABLE_GUIDE=no
AC_MSG_NOTICE([
************************************************************************
*** ***
*** The Gambit Universal IDE requires that the system be built using ***
*** a C++ compiler. You must specify both "--enable-cplusplus" and ***
*** "--enable-guide" to include the Gambit Universal IDE. ***
*** ***
************************************************************************
])
fi
fi
if test "$ENABLE_GUIDE" = yes; then
AC_DEFINE(___GUIDE)
AC_SUBST(QTINCPATH)
RTLIBSUBSYS="$RTLIBSUBSYS guide"
LIBS="$LIBS $QTLIBS"
fi
AC_SUBST(ENABLE_GUIDE)
###############################################################################
#
# Check if the system is to be debugged.
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[build system so that it can be debugged (default is NO)]),
ENABLE_DEBUG=$enableval,
ENABLE_DEBUG=no)
if test "$ENABLE_DEBUG" = yes; then
AC_DEFINE(___DEBUG)
DEFS_OBJ_DYN_LIB_EXE="$DEFS_OBJ_DYN_LIB_EXE -D___DEBUG"
fi
###############################################################################
#
# Check if the system is to be profiled.
AC_ARG_ENABLE(profile,
AC_HELP_STRING([--enable-profile],
[build system so that it can be profiled (default is NO)]),
ENABLE_PROFILE=$enableval,
ENABLE_PROFILE=no)
if test "$ENABLE_PROFILE" = yes; then
AC_DEFINE(___PROFILE)
DEFS_OBJ_DYN_LIB_EXE="$DEFS_OBJ_DYN_LIB_EXE -D___PROFILE"
fi
###############################################################################
#
# Check if the system is to be compiled to accumulate coverage statistics.
AC_ARG_ENABLE(coverage,
AC_HELP_STRING([--enable-coverage],
[build system to accumulate coverage statistics (default is NO)]),
ENABLE_COVERAGE=$enableval,
ENABLE_COVERAGE=no)
###############################################################################
#
# Check if the system is to be compiled with trial run feedback.
AC_ARG_ENABLE(feedback1,
AC_HELP_STRING([--enable-feedback1],
[build system to accumulate trial run data (default is NO)]),
ENABLE_FEEDBACK1=$enableval,
ENABLE_FEEDBACK1=no)
AC_ARG_ENABLE(feedback2,
AC_HELP_STRING([--enable-feedback2],
[build system using trial run feedback (default is NO)]),
ENABLE_FEEDBACK2=$enableval,
ENABLE_FEEDBACK2=no)
###############################################################################
#
# Check if a single C function should be generated for all the Scheme
# functions in a file. This makes the executable much faster but the
# compilation will be much longer and take much more memory.
AC_ARG_ENABLE(single-host,
AC_HELP_STRING([--enable-single-host],
[compile each Scheme module as a single C function (default is NO)]),
ENABLE_SINGLE_HOST=$enableval,
ENABLE_SINGLE_HOST=no)
if test "$ENABLE_SINGLE_HOST" = yes; then
AC_DEFINE(___SINGLE_HOST)
DEFS_OBJ_DYN_LIB_EXE="$DEFS_OBJ_DYN_LIB_EXE -D___SINGLE_HOST"
fi
###############################################################################
#
# Check if inline code should be generated for jumps. It is possible
# that on some platforms this will result in a faster but larger
# executable program.
AC_ARG_ENABLE(inline-jumps,
AC_HELP_STRING([--enable-inline-jumps],
[generate inline code for jumps (default is NO)]),
ENABLE_INLINE_JUMPS=$enableval,
ENABLE_INLINE_JUMPS=no)
if test "$ENABLE_INLINE_JUMPS" = yes; then
AC_DEFINE(___INLINE_JUMPS)
DEFS_OBJ_DYN_LIB_EXE="$DEFS_OBJ_DYN_LIB_EXE -D___INLINE_JUMPS"
fi
###############################################################################
#
# Check if expensive GCC optimizations should be used. This makes the
# executable faster but the compilation will be much longer and take
# much more memory.
AC_ARG_ENABLE(gcc-opts,
AC_HELP_STRING([--enable-gcc-opts],
[use expensive GCC optimizations (default is NO)]),
ENABLE_GCC_OPTS=$enableval,
ENABLE_GCC_OPTS=no)
###############################################################################
#
# Check the width of Scheme characters.
AC_ARG_ENABLE(char-size,
AC_HELP_STRING([--enable-char-size=N],
[Scheme character size in bytes (default is 4)]),
CHAR_SIZE=$enableval,
CHAR_SIZE=4)
if test "$CHAR_SIZE" = 1; then
CONF_MAX_CHR="0xff"
else
if test "$CHAR_SIZE" = 2; then
CONF_MAX_CHR="0xffff"
else
CONF_MAX_CHR="0x10ffff"
fi
fi
AC_SUBST(CONF_MAX_CHR)
###############################################################################
#
# Check the size of the type "void*". On many systems it is the same
# size as "long". If this isn't the case then define
# ___VOIDSTAR_WIDTH appropriately.
AC_CHECK_SIZEOF(void*)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_voidp" != "$ac_cv_sizeof_long"; then
CONF_VOIDSTAR_WIDTH="($ac_cv_sizeof_voidp * ___CHAR_WIDTH)"
else
CONF_VOIDSTAR_WIDTH="___LONG_WIDTH"
fi
AC_SUBST(CONF_VOIDSTAR_WIDTH)
###############################################################################
#
# Check if a shared library must be built.
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared],
[build the Scheme runtime system as a shared library (default is NO)]),
ENABLE_SHARED=$enableval,
ENABLE_SHARED=no)
if test "$ENABLE_SHARED" = yes; then
AC_DEFINE(___SHARED)
# don't add to DEFS_OBJ_DYN_LIB_EXE
fi
###############################################################################
#
# Check if only ANSI C headers and libraries should be used.
AC_ARG_ENABLE(ansi-c,
AC_HELP_STRING([--enable-ansi-c],
[link only with ANSI C libraries (default is NO)]),
ANSI_C=$enableval,
ANSI_C=no)
###############################################################################
#
# Check if symbolic links should be used for files not in the
# central installation directory.
AC_ARG_ENABLE(symlinks,
AC_HELP_STRING([--enable-symlinks],
[use symbolic links for installed files not in the central installation directory (default is YES)]),
ENABLE_SYMLINKS=$enableval,
ENABLE_SYMLINKS=no)
###############################################################################
#
# Determine the name to use for the Gambit interpreter and compiler.
AC_ARG_ENABLE(interpreter-name,
AC_HELP_STRING([--enable-interpreter-name=INTERP],
[Name to use for Gambit interpreter (default is gsi)]),
ENABLE_INTERPRETER_NAME=$enableval,
ENABLE_INTERPRETER_NAME="gsi")
AC_ARG_ENABLE(compiler-name,
AC_HELP_STRING([--enable-compiler-name=COMP],
[Name to use for Gambit compiler (default is gsc)]),
ENABLE_COMPILER_NAME=$enableval,
ENABLE_COMPILER_NAME="gsc")
###############################################################################
#
# Check if multiple installed versions are supported.
AC_ARG_ENABLE(multiple-versions,
AC_HELP_STRING([--enable-multiple-versions],
[multiple installed versions are supported (default is NO)]),
ENABLE_MULTIPLE_VERSIONS=$enableval,
ENABLE_MULTIPLE_VERSIONS=no)
###############################################################################
#
# Check if libraries should contain a version number suffix.
ENABLE_VERSIONNED_LIBS=no
# This option does not currently work. Some work is needed to make it
# work properly. Here is the documentation that should go in INSTALL.txt:
#The option --enable-versionned-libs will add a version number suffix
#to the libraries. For example the Gambit v4.3.2 runtime library which
#is normally libgambc.a will be named libgambc-v4_3_2.a and it must be
#linked to with the C compiler option -lgambc-v4_3_2 . If you give
#this option a value, as in --enable-versionned-libs=<suffix> then
#<suffix> will be appended to the name of the libraries.
#AC_ARG_ENABLE(versionned-libs,
# AC_HELP_STRING([--enable-versionned-libs],
# [libraries should contain a version number suffix (default is NO)]),
# ENABLE_VERSIONNED_LIBS=$enableval,
# ENABLE_VERSIONNED_LIBS=no)
###############################################################################
#
# Check if shared libraries should be linked to using an absolute path.
AC_ARG_ENABLE(absolute-shared-libs,
AC_HELP_STRING([--enable-absolute-shared-libs],
[shared libraries should be linked to using an absolute path (default is YES)]),
ENABLE_ABSOLUTE_SHARED_LIBS=$enableval,
ENABLE_ABSOLUTE_SHARED_LIBS=yes)
if test "$ENABLE_SHARED" != yes; then
ENABLE_ABSOLUTE_SHARED_LIBS=no
fi
###############################################################################
#
# Determine which browser to use for help.
AC_ARG_ENABLE(help-browser,
AC_HELP_STRING([--enable-help-browser=BROWSER],
[Browser to use for help (default is to search)]),
HELP_BROWSER=$enableval,
HELP_BROWSER="")
###############################################################################
#
# Check for C compiler.
AC_DEFUN(AC_CHECK_C_COMPILER_DEF,
[AC_CACHE_CHECK(whether $C_COMPILER defines [$1], [$2],
[AC_SUBST($2)
rm -f conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
int
main ()
{
#ifndef $1
choke me
#endif
;
return 0;
}
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
$2="yes"
else
$2=""
fi
])])
AC_DEFUN(AC_CHECK_C_COMPILER_OPT,
[AC_CACHE_CHECK(whether $C_COMPILER accepts [$1], [$2],
[AC_SUBST($2)
rm -f conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
int
main ()
{
return 0;
}
_ACEOF
ac_test_CFLAGS=${CFLAGS+set}
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CFLAGS=$CFLAGS
ac_save_CXXFLAGS=$CXXFLAGS
CFLAGS="$1$3"
CXXFLAGS="$1$3"
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
$2=" $1"
else
$2=""
fi
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
fi
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
fi
])])
AC_DEFUN(AC_CHECK_C_COMPILER_CPP_EXPR,
[AC_CACHE_CHECK(how $C_COMPILER's preprocessor evaluates [$1], [$2],
[AC_SUBST($2)
rm -f conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
int
main ()
{
#if $1
#else
choke me
#endif
;
return 0;
}
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
$2="yes"
else
$2=""
fi
])])
AC_CHECK_C_COMPILER_DEF(__GNUC__,C_COMP_GNUC)
AC_CHECK_C_COMPILER_DEF(__clang__,C_COMP_CLANG)
AC_CHECK_C_COMPILER_DEF(__llvm__,C_COMP_LLVM)
AC_CHECK_C_COMPILER_DEF(_MSC_VER,C_COMP_VISUALC)
#AC_CHECK_C_COMPILER_DEF(__WATCOMC__,C_COMP_WATCOMC)
#AC_CHECK_C_COMPILER_DEF(__BORLANDC__,C_COMP_BORLANDC)
###############################################################################
#
# Check for header files.
AC_CHECK_HEADERS(errno.h)
AC_CHECK_HEADERS(float.h)
AC_CHECK_HEADERS(signal.h)
AC_CHECK_HEADERS(stdio.h)
AC_CHECK_HEADERS(stdlib.h)
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(time.h)
if test "$ANSI_C" = yes; then
# Check if linking to the math library needs some special linker flags.
AC_SEARCH_LIBS(asin,m)
# The following functions should be provided by an ANSI-C conforming
# compiler, but it is safest to double check. If they are not
# available, the system will still compile but some functionality
# will be missing from the Gambit runtime system.
AC_CHECK_FUNCS(getenv)
AC_CHECK_FUNCS(time)
AC_CHECK_FUNCS(clock)
else
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(pwd.h)
AC_CHECK_HEADERS(dirent.h)
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_HEADERS(dl.h)
AC_CHECK_HEADERS(sys/dxe.h)
AC_CHECK_HEADERS(mach-o/dyld.h)
AC_CHECK_HEADERS(sys/types.h)
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(sys/times.h)
AC_CHECK_HEADERS(sys/timeb.h)
AC_CHECK_HEADERS(sys/timers.h)
AC_CHECK_HEADERS(sys/resource.h)
AC_CHECK_HEADERS(sys/stat.h)
AC_CHECK_HEADERS(sys/wait.h)
AC_CHECK_HEADERS(sys/mman.h)
AC_CHECK_HEADERS(stat.h)
AC_CHECK_HEADERS(netdb.h)
AC_CHECK_HEADERS(grp.h)
#AC_CHECK_HEADERS(windows.h)
#AC_CHECK_HEADERS(io.h)
#AC_CHECK_HEADERS(tchar.h)
AC_CHECK_HEADERS(fpu_control.h)
AC_CHECK_HEADERS(os2.h)
AC_CHECK_HEADERS(dos.h)
AC_CHECK_HEADERS(direct.h)
#AC_CHECK_HEADERS(Retrace.h)
#AC_CHECK_HEADERS(Files.h)
#AC_CHECK_HEADERS(Finder.h)
#AC_CHECK_HEADERS(Errors.h)
#AC_CHECK_HEADERS(Folders.h)
#AC_CHECK_HEADERS(OSUtils.h)
#AC_CHECK_HEADERS(Power.h)
#AC_CHECK_HEADERS(CodeFragments.h)
#AC_CHECK_HEADERS(SIOUX.h)
#AC_CHECK_HEADERS(mac_gui.h)
#AC_CHECK_HEADERS(unix.h)
AC_CHECK_HEADERS(wdefwin.h)
AC_CHECK_HEADERS(tfork.h)
AC_CHECK_HEADERS(curses.h)
AC_CHECK_HEADERS(ncurses.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(termios.h)
#AC_CHECK_HEADERS(term.h)
AC_CHECK_HEADERS(pty.h)
AC_CHECK_HEADERS(stropts.h)
AC_CHECK_HEADERS(libutil.h)
AC_CHECK_HEADERS(util.h)
AC_CHECK_HEADERS(sys/fpu.h)
AC_CHECK_HEADERS(fenv.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(sys/ioctl.h)
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(memory.h)
AC_CHECK_HEADERS(sys/sysctl.h)
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_HEADERS(ws2tcpip.h)
if test "$C_COMP_VISUALC" != yes; then
AC_DEFUN([AC_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif],
[socklen_t len = 42; return 0;],
ac_cv_type_socklen_t=yes,
ac_cv_type_socklen_t=no)
])
if test $ac_cv_type_socklen_t != yes; then
AC_DEFINE(socklen_t, int)
fi
])
AC_TYPE_SOCKLEN_T
fi
#AC_TYPE_MODE_T
#AC_TYPE_OFF_T
#AC_TYPE_PID_T
#AC_TYPE_SIGNAL
#AC_TYPE_SIZE_T
#AC_TYPE_UID_T
#AC_HEADER_DIRENT
#AC_HEADER_STAT
#AC_HEADER_STDC
#AC_HEADER_SYS_WAIT
#AC_HEADER_TIME
#AC_HEADER_TIOCGWINSZ
#AC_FUNC_SELECT_ARGTYPES
#AC_FUNC_CLOSEDIR_VOID
#AC_FUNC_FSEEKO
#AC_FUNC_STAT
#AC_FUNC_LSTAT
if test "$C_COMP_VISUALC" = yes; then
LIBS="$LIBS Kernel32.Lib User32.Lib Gdi32.Lib WS2_32.Lib"
FLAGS_OBJ="$FLAGS_OBJ -D_WINDOWS"
else
case "$target_os" in
mingw*) # add Windows libraries needed by MinGW
LIBS="$LIBS -lws2_32"
FLAGS_OBJ="$FLAGS_OBJ -D_WINDOWS"
;;
*) # check libraries for other systems
AC_SEARCH_LIBS(asin,m)
AC_SEARCH_LIBS(dlopen,dl)
AC_SEARCH_LIBS(shl_load,dld)
#AC_SEARCH_LIBS(tgetstr,ncurses curses)
#AC_SEARCH_LIBS(tigetstr,ncurses curses)
AC_SEARCH_LIBS(socket,socket)
AC_SEARCH_LIBS(gethostbyname,nsl resolv xnet)
AC_SEARCH_LIBS(hstrerror,resolv)
AC_SEARCH_LIBS(openpty,util)
AC_SEARCH_LIBS(WSAStartup,ws2_32)
;;
esac
fi
AC_CHECK_FUNCS(pipe)
AC_CHECK_FUNCS(socketpair)
AC_CHECK_FUNCS(chdir)
AC_CHECK_FUNCS(execvp)
AC_CHECK_FUNCS(getgrnam)
AC_CHECK_FUNCS(getpid)
AC_CHECK_FUNCS(getppid)
AC_CHECK_FUNCS(getpwnam)
AC_CHECK_FUNCS(ioctl)
AC_CHECK_FUNCS(link)
AC_CHECK_FUNCS(mkdir)
AC_CHECK_FUNCS(mkfifo)
AC_CHECK_FUNCS(opendir)
AC_CHECK_FUNCS(rename)
AC_CHECK_FUNCS(rmdir)
AC_CHECK_FUNCS(socket)
AC_CHECK_FUNCS(stat)
AC_CHECK_FUNCS(stat64)
AC_CHECK_FUNCS(strerror)
AC_CHECK_FUNCS(symlink)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(sysctl)
AC_CHECK_FUNCS(unlink)
AC_CHECK_FUNCS(waitpid)
AC_CHECK_FUNCS(mmap)
# The following checks for library functions have been written
# specially to catch the case where they are declared as inline
# functions. This was done when porting to the Android platform,
# but it may be useful for other platforms as well.
# used to be: AC_CHECK_FUNCS(tcgetattr)
AC_DEFUN([AC_CHECK_FUNC_TCGETATTR],
[AC_CACHE_CHECK([for tcgetattr], ac_cv_func_tcgetattr,
[
AC_TRY_COMPILE([
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
],[int fd = 1; struct termios tios; tcgetattr (fd, &tios);],
ac_cv_func_tcgetattr=yes,
ac_cv_func_tcgetattr=no)
])
if test $ac_cv_func_tcgetattr = yes; then
AC_DEFINE(HAVE_TCGETATTR)
fi
])
AC_CHECK_FUNC_TCGETATTR
# used to be: AC_CHECK_FUNCS(sigaction)
AC_DEFUN([AC_CHECK_FUNC_SIGACTION],
[AC_CACHE_CHECK([for sigaction], ac_cv_func_sigaction,
[
AC_TRY_COMPILE([
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
],[struct sigaction sa1, sa2; sigaction (1, &sa1, &sa2);],
ac_cv_func_sigaction=yes,
ac_cv_func_sigaction=no)
])
if test $ac_cv_func_sigaction = yes; then
AC_DEFINE(HAVE_SIGACTION)
fi
])
AC_CHECK_FUNC_SIGACTION
# used to be: AC_CHECK_FUNCS(sigemptyset)
# AC_CHECK_FUNCS(sigaddset)
AC_DEFUN([AC_CHECK_FUNC_SIGSET],
[AC_CACHE_CHECK([for sigemptyset/sigaddset], ac_cv_func_sigset,
[
AC_TRY_COMPILE([
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
],[sigset_t ss; sigemptyset (&ss); sigaddset (&ss, 1);],
ac_cv_func_sigset=yes,
ac_cv_func_sigset=no)
])
if test $ac_cv_func_sigset = yes; then
AC_DEFINE(HAVE_SIGEMPTYSET)
AC_DEFINE(HAVE_SIGADDSET)
fi
])
AC_CHECK_FUNC_SIGSET
# used to be: AC_CHECK_FUNCS(sigprocmask)
AC_DEFUN([AC_CHECK_FUNC_SIGPROCMASK],
[AC_CACHE_CHECK([for sigprocmask], ac_cv_func_sigprocmask,
[
AC_TRY_COMPILE([
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
],[sigset_t ss1, ss2; sigemptyset (&ss1); sigaddset (&ss1, 1); sigprocmask (SIG_BLOCK, &ss1, &ss2);],
ac_cv_func_sigprocmask=yes,
ac_cv_func_sigprocmask=no)
])
if test $ac_cv_func_sigprocmask = yes; then
AC_DEFINE(HAVE_SIGPROCMASK)
fi
])
AC_CHECK_FUNC_SIGPROCMASK
# used to be: AC_CHECK_FUNCS(signal)
AC_DEFUN([AC_CHECK_FUNC_SIGNAL],
[AC_CACHE_CHECK([for signal], ac_cv_func_signal,
[
AC_TRY_COMPILE([
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
],[signal (1, SIG_DFL);],
ac_cv_func_signal=yes,
ac_cv_func_signal=no)
])
if test $ac_cv_func_signal = yes; then
AC_DEFINE(HAVE_SIGNAL)
fi
])
AC_CHECK_FUNC_SIGNAL
AC_DEFUN([AC_CHECK_ENVIRON],
[AC_CACHE_CHECK([for environ], ac_cv_environ,
[
AC_TRY_COMPILE([
#ifdef __cplusplus
extern "C" {
#endif
extern char **environ;
#ifdef __cplusplus
}
#endif
],[char *arg0 = *environ;],
ac_cv_environ=yes,
ac_cv_environ=no)
])
if test $ac_cv_environ = yes; then
AC_DEFINE(HAVE_ENVIRON)
fi
])
AC_CHECK_ENVIRON
AC_DEFUN([AC_CHECK__NSGETENVIRON],
[AC_CACHE_CHECK([for _NSGetEnviron], ac_cv__NSGetEnviron,
[
AC_TRY_COMPILE([
#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h>
#endif
],[char *arg0 = *(*_NSGetEnviron());],
ac_cv__NSGetEnviron=yes,
ac_cv__NSGetEnviron=no)
])
if test $ac_cv__NSGetEnviron = yes; then
AC_DEFINE(HAVE__NSGETENVIRON)
fi
])
AC_CHECK__NSGETENVIRON
AC_CHECK_FUNCS(clock_gettime)
AC_CHECK_FUNCS(getclock)
#AC_CHECK_FUNCS(GetSystemTime)
AC_CHECK_FUNCS(gettimeofday)
AC_CHECK_FUNCS(ftime)
AC_CHECK_FUNCS(time)
AC_CHECK_FUNCS(nanosleep)
#AC_CHECK_FUNCS(Sleep)
AC_CHECK_FUNCS(sleep)
#AC_CHECK_FUNCS(GetProcessTimes)
AC_CHECK_FUNCS(getrusage)
AC_CHECK_FUNCS(times)
AC_CHECK_FUNCS(clock)
AC_CHECK_FUNCS(DosQuerySysInfo)
AC_CHECK_FUNCS(setitimer)
AC_CHECK_FUNCS(dos_setvect)
AC_CHECK_FUNCS(DosStartTimer)
AC_CHECK_FUNCS(VInstall)
#AC_CHECK_FUNCS(CreateThread)
AC_CHECK_FUNCS(shl_load)
#AC_CHECK_FUNCS(LoadLibrary)
AC_CHECK_FUNCS(DosLoadModule)
AC_CHECK_FUNCS(dxe_load)
AC_CHECK_FUNCS(GetDiskFragment)
AC_CHECK_FUNCS(dlopen)
AC_CHECK_FUNCS(NSLinkModule) # has been deprecated by Apple
AC_CHECK_FUNCS(gethostname)
AC_CHECK_FUNCS(inet_pton)
AC_CHECK_FUNCS(getaddrinfo)
AC_CHECK_FUNCS(gethostbyname)
AC_CHECK_FUNCS(gethostbyaddr)
AC_CHECK_FUNCS(getservbyname)
AC_CHECK_FUNCS(getservbyport)
AC_CHECK_FUNCS(getprotobyname)
AC_CHECK_FUNCS(getprotobynumber)
AC_CHECK_FUNCS(getnetbyname)
AC_CHECK_FUNCS(select)
#AC_CHECK_FUNCS(MsgWaitForMultipleObjects)
#AC_CHECK_FUNCS(tgetstr)
#AC_CHECK_FUNCS(tigetstr)
AC_CHECK_FUNCS(openpty)
AC_CHECK_FUNCS(getpt)
AC_CHECK_FUNCS(ptsname)
AC_CHECK_FUNCS(ctermid)
AC_CHECK_FUNCS(isastream)
AC_CHECK_FUNCS(hstrerror)
AC_CHECK_FUNCS(get_fpc_csr)
fi
AC_CHECK_TYPE([struct stat64],
[AC_DEFINE(HAVE_STRUCT_STAT64, 1, [])],
[],
[#include <sys/stat.h>])
###############################################################################
#
# Check which command line options are supported by $C_COMPILER.
if test "$C_COMP_GNUC" = yes; then
########## Using gcc...
# Determine which gcc version is being used.
AC_CHECK_C_COMPILER_CPP_EXPR((__GNUC__*1000+__GNUC_MINOR__)>=4002&&(__GNUC__*1000+__GNUC_MINOR__)<=4003,GCC_42_OR_43)
AC_CHECK_C_COMPILER_CPP_EXPR(__llvm__ && !__clang__ && (__GNUC__*1000+__GNUC_MINOR__)<4005,POSSIBLE_LLVM_GCC_LABEL_VALUES_BUG)
if test "$C_COMP_CLANG" = yes; then
# clang does not support these options:
DASH_no_cpp_precomp=""
DASH_fschedule_insns2=""
DASH_fno_trapping_math=""
DASH_fno_move_loop_invariants=""
DASH_mieee=""
DASH_mieee_with_inexact=""
DASH_mieee_fp=""
else
# preprocessor options:
AC_CHECK_C_COMPILER_OPT(-no-cpp-precomp,DASH_no_cpp_precomp)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-fschedule-insns2,DASH_fschedule_insns2)
AC_CHECK_C_COMPILER_OPT(-fno-trapping-math,DASH_fno_trapping_math)
AC_CHECK_C_COMPILER_OPT(-fno-move-loop-invariants,DASH_fno_move_loop_invariants)
# machine specific options:
AC_CHECK_C_COMPILER_OPT(-mieee,DASH_mieee)
AC_CHECK_C_COMPILER_OPT(-mieee-with-inexact,DASH_mieee_with_inexact)
AC_CHECK_C_COMPILER_OPT(-mieee-fp,DASH_mieee_fp)
fi
# debugging options:
AC_CHECK_C_COMPILER_OPT(-Wall,DASH_Wall)
AC_CHECK_C_COMPILER_OPT(-W,DASH_W)
AC_CHECK_C_COMPILER_OPT(-Wno-unused,DASH_Wno_unused)
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
AC_CHECK_C_COMPILER_OPT(-pg,DASH_pg)
AC_CHECK_C_COMPILER_OPT(-ftest-coverage,DASH_ftest_coverage)
AC_CHECK_C_COMPILER_OPT(-fprofile-arcs,DASH_fprofile_arcs)
AC_CHECK_C_COMPILER_OPT(-fbranch-probabilities,DASH_fbranch_probabilities)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O1,DASH_O1)
AC_CHECK_C_COMPILER_OPT(-fno-math-errno,DASH_fno_math_errno)
AC_CHECK_C_COMPILER_OPT(-fno-strict-aliasing,DASH_fno_strict_aliasing)
AC_CHECK_C_COMPILER_OPT(-fwrapv,DASH_fwrapv)
AC_CHECK_C_COMPILER_OPT(-fomit-frame-pointer,DASH_fomit_frame_pointer)
# It isn't clear these are useful:
# AC_CHECK_C_COMPILER_OPT(-fexpensive-optimizations,DASH_fexpensive_optimizations)
# AC_CHECK_C_COMPILER_OPT(-fforce-addr,DASH_fforce_addr)
# AC_CHECK_C_COMPILER_OPT(-fpeephole2,DASH_fpeephole2)
# AC_CHECK_C_COMPILER_OPT(-falign-jumps,DASH_falign_jumps)
# AC_CHECK_C_COMPILER_OPT(-falign-functions,DASH_falign_functions)
# AC_CHECK_C_COMPILER_OPT(-fno-function-cse,DASH_fno_function_cse)
# AC_CHECK_C_COMPILER_OPT(-ftree-copyrename,DASH_ftree_copyrename)
# AC_CHECK_C_COMPILER_OPT(-ftree-fre,DASH_ftree_fre)
# AC_CHECK_C_COMPILER_OPT(-ftree-dce,DASH_ftree_dce)
# AC_CHECK_C_COMPILER_OPT(-fschedule-interblock,DASH_fschedule_interblock)
# AC_CHECK_C_COMPILER_OPT(-fregmove,DASH_fregmove)
# AC_CHECK_C_COMPILER_OPT(-fgcse-las,DASH_fgcse_las)
# AC_CHECK_C_COMPILER_OPT(-freorder-functions,DASH_freorder_functions)
# AC_CHECK_C_COMPILER_OPT(-fcaller-saves,DASH_fcaller_saves)
# AC_CHECK_C_COMPILER_OPT(-fno-if-conversion2,DASH_fno_if_conversion2)
# AC_CHECK_C_COMPILER_OPT(-foptimize-sibling-calls,DASH_foptimize_sibling_calls)
# AC_CHECK_C_COMPILER_OPT(-fcse-skip-blocks,DASH_fcse_skip_blocks)
# AC_CHECK_C_COMPILER_OPT(-funit-at-a-time,DASH_funit_at_a_time)
# AC_CHECK_C_COMPILER_OPT(-finline-functions,DASH_finline_functions)
if test "$ENABLE_GCC_OPTS" = yes; then
AC_CHECK_C_COMPILER_OPT(-fmodulo-sched,DASH_fmodulo_sched)
AC_CHECK_C_COMPILER_OPT(-freschedule-modulo-scheduled-loops,DASH_freschedule_modulo_scheduled_loops)
fi
# code generation options:
case "$target_os" in
mingw*) # no special code generation options needed by MinGW
;;
cygwin*) # no special code generation options needed by cygwin
;;
*) # check for code generation options for other systems
AC_CHECK_C_COMPILER_OPT(-fPIC,DASH_fPIC)
AC_CHECK_C_COMPILER_OPT(-fpic,DASH_fpic)
;;
esac
AC_CHECK_C_COMPILER_OPT(-fno-common,DASH_fno_common)
# linking options:
case "$target_os" in
mingw*) # no special options needed by MinGW
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared,$DASH_fPIC$DASH_fpic)
;;
cygwin*) # no special options needed by cygwin
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared,$DASH_fPIC$DASH_fpic)
;;
solaris*) # check for options needed by Solaris
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared,$DASH_fPIC$DASH_fpic)
;;
hpux*) # check for options needed by HP-UX
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared,$DASH_fPIC$DASH_fpic)
;;
darwin*) # check for special options added by Apple
AC_CHECK_C_COMPILER_OPT(-dynamiclib,DASH_dynamiclib)
AC_CHECK_C_COMPILER_OPT(-bundle,DASH_bundle)
AC_CHECK_C_COMPILER_OPT(-flat_namespace -undefined suppress,DASH_flat_namespace_undefined_suppress)
;;
*) # for other systems
AC_CHECK_C_COMPILER_OPT(-rdynamic,DASH_rdynamic)
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared,$DASH_fPIC$DASH_fpic)
;;
esac
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
case "$target_os" in
darwin*) # avoid the default C preprocessor which is setup for Objective-C
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_no_cpp_precomp"
;;
esac
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_Wno_unused"
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
if test "x$DASH_pg" != x; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_pg"
else
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O1$DASH_fno_math_errno$DASH_fschedule_insns2"
fi
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fno_trapping_math$DASH_fno_strict_aliasing$DASH_fwrapv"
# It isn't clear these are useful:
# FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fno_trapping_math$DASH_fno_strict_aliasing$DASH_fwrapv$DASH_fexpensive_optimizations$DASH_fforce_addr$DASH_fpeephole2$DASH_falign_jumps$DASH_falign_functions$DASH_fno_function_cse$DASH_ftree_copyrename$DASH_ftree_fre$DASH_ftree_dce$DASH_fschedule_interblock$DASH_fregmove$DASH_fgcse_las$DASH_freorder_functions$DASH_fcaller_saves$DASH_fno_if_conversion2$DASH_foptimize_sibling_calls$DASH_fcse_skip_blocks$DASH_funit_at_a_time$DASH_finline_functions"
if test "$ENABLE_GCC_OPTS" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fmodulo_sched$DASH_freschedule_modulo_scheduled_loops"
fi
case "$target_os" in
mingw*) # MinGW's setjmp seems to need the frame pointer
;;
*) # other systems are fine as far as I can tell
if test "$ENABLE_DEBUG" != yes -a "$ENABLE_PROFILE" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fomit_frame_pointer"
fi
;;
esac
ENABLE_GCC_MOVE_LOOP_INVARIANTS=yes
if test "$ENABLE_SINGLE_HOST" = yes -a "$GCC_42_OR_43" = yes -a "$C_COMP_CLANG" != yes; then
ENABLE_GCC_MOVE_LOOP_INVARIANTS=no
fi
if test "$ENABLE_GCC_MOVE_LOOP_INVARIANTS" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fno_move_loop_invariants"
fi
if test "$ENABLE_FEEDBACK1" = yes -o "$ENABLE_COVERAGE" = yes; then
AC_DEFINE(___DONT_UNLOAD_DYN_CODE)
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_fprofile_arcs"
if test "$ENABLE_COVERAGE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_ftest_coverage"
fi
fi
if test "$ENABLE_FEEDBACK2" = yes; then
AC_DEFINE(___DONT_UNLOAD_DYN_CODE)
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_fbranch_probabilities"
fi
if test "x$DASH_fPIC" != x; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fPIC"
else
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fpic"
fi
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fno_common"
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_mieee$DASH_mieee_with_inexact$DASH_mieee_fp"
case "$target_os" in
darwin*) # check for special options added by Apple
FLAGS_DYN="$FLAGS_DYN$DASH_bundle"
FLAGS_LIB="$FLAGS_LIB$DASH_dynamiclib -install_name \$(libdir)/\$(LIBRARY)"
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_flat_namespace_undefined_suppress"
;;
*) # for other systems
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_rdynamic$DASH_shared"
FLAGS_EXE="$FLAGS_EXE$DASH_rdynamic"
;;
esac
else if test "$C_COMP_VISUALC" = yes; then
########## Microsoft Visual C++ compiler
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE -nologo -Oityb1 -MT -D_CRT_SECURE_NO_DEPRECATE"
FLAGS_DYN="$FLAGS_DYN -LD"
#else if test "$C_COMP_WATCOMC" = yes; then
#else if test "$C_COMP_BORLANDC" = yes; then
else
########## Need to guess the C compiler from the OS...
case "$target_os" in
solaris*) ########## Probably using the Sun Workshop C/C++ compiler...
# debugging options:
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-xO2,DASH_xO2)
# code generation options:
AC_CHECK_C_COMPILER_OPT(-KPIC,DASH_KPIC)
# linking options:
AC_CHECK_C_COMPILER_OPT(-G,DASH_G)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_xO2"
fi
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_KPIC"
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_G"
;;
osf*) ########## Probably using the Compaq Tru64 UNIX C/C++ compiler...
# debugging options:
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O2,DASH_O2)
# code generation options:
AC_CHECK_C_COMPILER_OPT(-ieee,DASH_ieee)
AC_CHECK_C_COMPILER_OPT(-call_shared,DASH_call_shared)
#AC_CHECK_C_COMPILER_OPT(-taso,DASH_taso)
# linking options:
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared)
AC_CHECK_C_COMPILER_OPT(-expect_unresolved,DASH_expect_unresolved)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O2"
fi
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_ieee$DASH_call_shared"
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_shared$DASH_expect_unresolved"
;;
irix*) ########## Probably using the MIPSpro C/C++ compiler...
# debugging options:
AC_CHECK_C_COMPILER_OPT(-fullwarn,DASH_fullwarn)
AC_CHECK_C_COMPILER_OPT([-woff 1110,1174,1209,1552,3201],DASH_woff_1110_1174_1209_1552_3201)
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O1,DASH_O1)
AC_CHECK_C_COMPILER_OPT(-OPT:Olimit=0,DASH_OPT_Olimit_0)
# code generation options:
#AC_CHECK_C_COMPILER_OPT(-KPIC,DASH_KPIC)
#AC_CHECK_C_COMPILER_OPT(-non_shared,DASH_non_shared)
AC_CHECK_C_COMPILER_OPT(-TENV:large_GOT,DASH_TENV_large_GOT)
AC_CHECK_C_COMPILER_OPT(-OPT:IEEE_comparisons=ON,DASH_OPT_IEEE_comparisons_ON)
AC_CHECK_C_COMPILER_OPT(-OPT:IEEE_NaN_inf=ON,DASH_OPT_IEEE_NaN_inf_ON)
# linking options:
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_fullwarn$DASH_woff_1110_1174_1209_1552_3201"
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O1$DASH_OPT_Olimit_0"
fi
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_TENV_large_GOT$DASH_OPT_IEEE_comparisons_ON$DASH_OPT_IEEE_NaN_inf_ON"
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_shared"
;;
hpux*) ########## Probably using the HP-UX compiler...
# debugging options:
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O1,DASH_O1)
# linking options:
AC_CHECK_C_COMPILER_OPT(-b,DASH_b)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O1"
fi
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_b"
;;
aix*) ########## Probably using the AIX xlC compiler...
# debugging options:
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O1,DASH_O1)
# linking options:
AC_CHECK_C_COMPILER_OPT(-G,DASH_G)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O1"
fi
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_G"
;;
*) ########## Unsupported operating system
AC_MSG_NOTICE([
*********************************************************************
*** ***
*** The GCC compiler is not being used and the operating system ***
*** is not one that has been tested with the Gambit-C system. ***
*** The configure script will use certain compiler options that ***
*** may not be correct or sufficient for compiling the system. ***
*** Please report success or failure to gambit@iro.umontreal.ca. ***
*** This will help us support this operating system in the ***
*** future. ***
*** ***
*********************************************************************
])
# debugging options:
AC_CHECK_C_COMPILER_OPT(-g,DASH_g)
# profiling options:
AC_CHECK_C_COMPILER_OPT(-p,DASH_p)
# optimization options:
AC_CHECK_C_COMPILER_OPT(-O1,DASH_O1)
# linking options:
AC_CHECK_C_COMPILER_OPT(-shared,DASH_shared)
# determine which flags to add to CFLAGS, CXXFLAGS and LDFLAGS
if test "$ENABLE_DEBUG" = yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_g"
fi
if test "$ENABLE_PROFILE" = yes; then
FLAGS_OBJ_DYN_LIB_EXE="$FLAGS_OBJ_DYN_LIB_EXE$DASH_p"
fi
if test "$ENABLE_DEBUG" != yes; then
FLAGS_OBJ_DYN="$FLAGS_OBJ_DYN$DASH_O1"
fi
FLAGS_DYN_LIB="$FLAGS_DYN_LIB$DASH_shared"
;;
esac
fi
fi
if test "$ENABLE_CPLUSPLUS" = yes; then
CORCXXFLAGS="$CXXFLAGS"
else
CORCXXFLAGS="$CFLAGS"
fi
FLAGS_OBJ="$CORCXXFLAGS $FLAGS_OBJ $FLAGS_OBJ_DYN $FLAGS_OBJ_DYN_LIB_EXE"
FLAGS_DYN="$LDFLAGS $CORCXXFLAGS $FLAGS_DYN $FLAGS_OBJ_DYN $FLAGS_OBJ_DYN_LIB_EXE $FLAGS_DYN_LIB"
FLAGS_LIB="$LDFLAGS $CORCXXFLAGS $FLAGS_LIB $FLAGS_OBJ_DYN_LIB_EXE $FLAGS_DYN_LIB"
#FLAGS_EXE="$LDFLAGS $CORCXXFLAGS $FLAGS_EXE $FLAGS_OBJ_DYN_LIB_EXE"
FLAGS_EXE="$LDFLAGS $FLAGS_OBJ $FLAGS_EXE"
DEFS_OBJ="$DEFS_OBJ_DYN_LIB_EXE $DEFS_OBJ"
DEFS_DYN="$DEFS_OBJ_DYN_LIB_EXE $DEFS_DYN"
DEFS_LIB="$DEFS_OBJ_DYN_LIB_EXE $DEFS_LIB"
DEFS_EXE="$DEFS_OBJ_DYN_LIB_EXE $DEFS_EXE"
AC_SUBST(FLAGS_OBJ)
AC_SUBST(FLAGS_DYN)
AC_SUBST(FLAGS_LIB)
AC_SUBST(FLAGS_EXE)
AC_SUBST(DEFS_OBJ)
AC_SUBST(DEFS_DYN)
AC_SUBST(DEFS_LIB)
AC_SUBST(DEFS_EXE)
AC_SUBST(FLAGS_OBJ_MF)
AC_SUBST(FLAGS_DYN_MF)
AC_SUBST(FLAGS_LIB_MF)
AC_SUBST(FLAGS_EXE_MF)
AC_SUBST(DEFS_OBJ_MF)
AC_SUBST(DEFS_DYN_MF)
AC_SUBST(DEFS_LIB_MF)
AC_SUBST(DEFS_EXE_MF)
AC_SUBST(FLAGS_OBJ_SH)
AC_SUBST(FLAGS_DYN_SH)
AC_SUBST(FLAGS_LIB_SH)
AC_SUBST(FLAGS_EXE_SH)
AC_SUBST(DEFS_OBJ_SH)
AC_SUBST(DEFS_DYN_SH)
AC_SUBST(DEFS_LIB_SH)
AC_SUBST(DEFS_EXE_SH)
AC_SUBST(FLAGS_OBJ_BAT)
AC_SUBST(FLAGS_DYN_BAT)
AC_SUBST(FLAGS_LIB_BAT)
AC_SUBST(FLAGS_EXE_BAT)
AC_SUBST(DEFS_OBJ_BAT)
AC_SUBST(DEFS_DYN_BAT)
AC_SUBST(DEFS_LIB_BAT)
AC_SUBST(DEFS_EXE_BAT)
###############################################################################
AC_SUBST(RTLIBSUBSYS)
###############################################################################
AC_PATH_XTRA
#AC_SYS_INTERPRETER
#AC_SYS_LARGEFILE
#AC_SYS_POSIX_TERMIOS
AC_PROG_LN_S
AC_PROG_RANLIB
RC="git"
GIT="git"
HG="hg"
exe="$EXEEXT"
obj=".$OBJEXT"
case "$target_os" in
mingw*) bat=".bat"
;;
*) bat=""
;;
esac
if test "$ENABLE_SHARED" = yes; then
case "$target_os" in
mingw* | cygwin*)
LIB_PREFIX="lib"
LIB_EXTENSION=".dll"
SETDLPATH="PATH=\"\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${PATH}\""
;;
darwin*) LIB_PREFIX="lib"
LIB_EXTENSION=".dylib"
SETDLPATH="DYLD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${DYLD_LIBRARY_PATH}"
;;
hpux*) LIB_PREFIX="lib"
LIB_EXTENSION=".so"
SETDLPATH="SHLIB_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${SHLIB_PATH}"
;;
aix*) LIB_PREFIX="lib"
LIB_EXTENSION=".so"
SETDLPATH="LIBPATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LIBPATH}"
;;
*) LIB_PREFIX="lib"
LIB_EXTENSION=".so"
SETDLPATH="LD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LD_LIBRARY_PATH}"
;;
esac
MAKE_LIBRARY='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_LIBS) $(LIBS)'
MAKE_LIBRARY_FOR_INSTALL='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_FOR_INSTALL_LIBS) $(LIBS)'
FIXLIB=':'
LINK_FOR_INSTALL='$(C_COMPILER) $(FLAGS_EXE) $(EXECUTABLE_OBJECTS) $(LINK_FOR_INSTALL_LIBS) $(LIBS) -o $(EXECUTABLE)'
else
SETDLPATH=""
if test "$C_COMP_VISUALC" = yes; then
########## Microsoft Visual C++ compiler
LIB_PREFIX="lib"
LIB_EXTENSION=".lib"
MAKE_LIBRARY='lib -out:$(LIBRARY) $(LIBRARY_OBJECTS)'
MAKE_LIBRARY_FOR_INSTALL=':'
FIXLIB=':'
LINK_FOR_INSTALL=':'
# else if test "$C_COMP_WATCOMC" = yes; then
# else if test "$C_COMP_BORLANDC" = yes; then
else
########## Other C compiler
LIB_PREFIX="lib"
LIB_EXTENSION=".a"
MAKE_LIBRARY='ar rc $(LIBRARY) $(LIBRARY_OBJECTS) && $(RANLIB) $(LIBRARY)'
MAKE_LIBRARY_FOR_INSTALL=':'
FIXLIB='$(RANLIB)'
LINK_FOR_INSTALL=':'
fi
fi
if test "$ENABLE_VERSIONNED_LIBS" = no; then
LIB_SUFFIX=""
else
if test "$ENABLE_VERSIONNED_LIBS" = yes; then
LIB_SUFFIX=`echo -$PACKAGE_VERSION | sed -e 's/\./_/g'`
else
LIB_SUFFIX="$ENABLE_VERSIONNED_LIBS"
fi
fi
GAMBCLIB="gambc$LIB_SUFFIX"
GAMBCGSCLIB="gambcgsc$LIB_SUFFIX"
GAMBCGSILIB="gambcgsi$LIB_SUFFIX"
if test "yes" = yes; then
GAMBCLIB_LOC=""
GAMBCLIB_LINK="\"\${GAMBCDIR_LIB}/$LIB_PREFIX$GAMBCLIB$LIB_EXTENSION\""
GAMBCGSILIB_LOC=""
GAMBCGSILIB_LINK="\"\${GAMBCDIR_LIB_GSI}/$LIB_PREFIX$GAMBCGSILIB$LIB_EXTENSION\" \"\${GAMBCDIR_LIB}/$LIB_PREFIX$GAMBCLIB$LIB_EXTENSION\""
GAMBCGSCLIB_LOC=""
GAMBCGSCLIB_LINK="\"\${GAMBCDIR_LIB_GSC}/$LIB_PREFIX$GAMBCGSCLIB$LIB_EXTENSION\" \"\${GAMBCDIR_LIB}/$LIB_PREFIX$GAMBCLIB$LIB_EXTENSION\""
else
GAMBCLIB_LOC="-L\"\${GAMBCDIR_LIB}\""
GAMBCLIB_LINK="-l$GAMBCLIB"
GAMBCGSILIB_LOC="-L\"\${GAMBCDIR_LIB_GSI}\" -L\"\${GAMBCDIR_LIB}\""
GAMBCGSILIB_LINK="-l$GAMBCGSILIB -l$GAMBCLIB"
GAMBCGSCLIB_LOC="-L\"\${GAMBCDIR_LIB_GSC}\" -L\"\${GAMBCDIR_LIB}\""
GAMBCGSCLIB_LINK="-l$GAMBCGSCLIB -l$GAMBCLIB"
fi
if test "$C_COMP_VISUALC" = yes; then
########## Microsoft Visual C++ compiler
BUILD_OBJ="\${C_COMPILER} \${FLAGS_OBJ} \${DEFS_OBJ} -I\"\${GAMBCDIR_INCLUDE}\" -c -Fo\"\${BUILD_OBJ_OUTPUT_FILENAME}\" \${BUILD_OBJ_CC_OPTIONS} \${BUILD_OBJ_INPUT_FILENAMES}"
BUILD_DYN="\${C_COMPILER} \${FLAGS_DYN} \${DEFS_DYN} -I\"\${GAMBCDIR_INCLUDE}\" -Fe\"\${BUILD_DYN_OUTPUT_FILENAME}\" \${BUILD_DYN_CC_OPTIONS} \${BUILD_DYN_LD_OPTIONS_PRELUDE} \${BUILD_DYN_INPUT_FILENAMES} \${BUILD_DYN_LD_OPTIONS}"
BUILD_LIB="echo BUILD_LIB not yet implemented"
BUILD_EXE="\${C_COMPILER} \${FLAGS_EXE} \${DEFS_EXE} -I\"\${GAMBCDIR_INCLUDE}\" ${GAMBCLIB_LOC} -Fe\"\${BUILD_EXE_OUTPUT_FILENAME}\" \${BUILD_EXE_CC_OPTIONS} \${BUILD_EXE_LD_OPTIONS_PRELUDE} \${BUILD_EXE_INPUT_FILENAMES} ${GAMBCLIB_LINK} \${LIBS} \${BUILD_EXE_LD_OPTIONS}"
else
BUILD_OBJ="\${C_COMPILER} \${FLAGS_OBJ} \${DEFS_OBJ} -I\"\${GAMBCDIR_INCLUDE}\" -c -o \"\${BUILD_OBJ_OUTPUT_FILENAME}\" \${BUILD_OBJ_CC_OPTIONS} \${BUILD_OBJ_INPUT_FILENAMES}"
BUILD_DYN="\${C_COMPILER} \${FLAGS_DYN} \${DEFS_DYN} -I\"\${GAMBCDIR_INCLUDE}\" -o \"\${BUILD_DYN_OUTPUT_FILENAME}\" \${BUILD_DYN_CC_OPTIONS} \${BUILD_DYN_LD_OPTIONS_PRELUDE} \${BUILD_DYN_INPUT_FILENAMES} \${BUILD_DYN_LD_OPTIONS}"
BUILD_LIB="echo BUILD_LIB not yet implemented"
BUILD_EXE="\${C_COMPILER} \${FLAGS_EXE} \${DEFS_EXE} -I\"\${GAMBCDIR_INCLUDE}\" ${GAMBCLIB_LOC} -o \"\${BUILD_EXE_OUTPUT_FILENAME}\" \${BUILD_EXE_CC_OPTIONS} \${BUILD_EXE_LD_OPTIONS_PRELUDE} \${BUILD_EXE_INPUT_FILENAMES} ${GAMBCLIB_LINK} \${LIBS} \${BUILD_EXE_LD_OPTIONS}"
fi
# The following code for making installed libraries may benefit from
# a rewrite so that it reuses the "BUILD_XXX" command infrastructure.
if test "$ENABLE_ABSOLUTE_SHARED_LIBS" = yes; then
MAKE_LIBRARY_FOR_INSTALL_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
LINK_FOR_INSTALL_GSI_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSILIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
LINK_FOR_INSTALL_GSC_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSCLIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
else
MAKE_LIBRARY_FOR_INSTALL_LIBS='-L$(rootfromhere)/lib -l$(GAMBCLIB)'
LINK_FOR_INSTALL_GSI_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSILIB) -l$(GAMBCLIB)'
LINK_FOR_INSTALL_GSC_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSCLIB) -l$(GAMBCLIB)'
fi
###############################################################################
#
# Determine what prefix and suffix are added to function names by the
# C compiler or linker.
case "$target_os" in
mingw*) # empty prefix and suffix
;;
cygwin*) # empty prefix and suffix
;;
*) # for other systems
ac_link_obj_file='$C_COMPILER $FLAGS_DYN $DEFS_DYN -Iinclude -o conftest.o1 conftest.$ac_ext >&5'
rm -f conftest.$ac_ext conftest.o1 conftest1.sed
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#define ___VERSION 400000
#define ___MODULE_NAME " GAMBCCHECKMODULEPREFIXSUFFIX"
#define ___LINKER_ID ____20_GAMBCCHECKMODULEPREFIXSUFFIX
#define ___MH_PROC ___H__20_GAMBCCHECKMODULEPREFIXSUFFIX
#define ___SCRIPT_LINE 0
#define ___MAX_CHR 0x10ffff
#define ___VOIDSTAR_WIDTH ___LONG_WIDTH
#include "gambit.h.in"
___BEGIN_MOD1
___END_MOD1
___BEGIN_MOD2
___END_MOD2
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_link_obj_file\"") >&5
(eval $ac_link_obj_file) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
cat >conftest1.sed <<_ACEOF
/^.* \([[a-zA-Z0-9_$]]*\)____20_GAMBCCHECKMODULEPREFIXSUFFIX\([[a-zA-Z0-9_$]]*\)$/s//#define ___IMPORTED_ID_PREFIX "\1"\\
#define ___IMPORTED_ID_SUFFIX "\2"/p
_ACEOF
# The nm program will extract the symbols in the object file
# conftest.o1. The following option is used:
# -g shows the external symbols only (to avoid confusion with
# internal symbols generated by the compiler)
nm -g conftest.o1 | sed -n -f conftest1.sed | sed -n -e "1,2p" >>confdefs.h
fi
;;
esac
###############################################################################
#
# Determine where the installation directories are located.
if test "$prefix" = NONE; then
prefix="/usr/local/$PACKAGE_NAME"
fi
if test "$ENABLE_MULTIPLE_VERSIONS" = yes; then
prefix="$prefix/$PACKAGE_VERSION"
fi
if test "$bindir" = "\${exec_prefix}/bin"; then
bindir="\${prefix}/bin"
fi
if test "$includedir" = "\${prefix}/include"; then
includedir="\${prefix}/include"
fi
if test "$libdir" = "\${exec_prefix}/lib"; then
libdir="\${prefix}/lib"
fi
if test "$docdir" = "\${datarootdir}/doc/\${PACKAGE_TARNAME}"; then
docdir="\${prefix}/doc"
fi
if test "$infodir" = "\${datarootdir}/info"; then
infodir="\${prefix}/info"
fi
if test "$datadir" = "\${datarootdir}"; then
datadir="\${prefix}/share"
fi
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR=\"\\\"$prefix\\\"\""
if test "$ENABLE_SYMLINKS" != yes; then
if test "$bindir" != "\${prefix}/bin"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_BIN=\"\\\"$bindir\\\"\""
fi
if test "$includedir" != "\${prefix}/include"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_INCLUDE=\"\\\"$includedir\\\"\""
fi
if test "$libdir" != "\${prefix}/lib"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_LIB=\"\\\"$libdir\\\"\""
fi
if test "$docdir" != "\${prefix}/doc"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_DOC=\"\\\"$docdir\\\"\""
fi
if test "$infodir" != "\${prefix}/info"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_INFO=\"\\\"$infodir\\\"\""
fi
if test "$datadir" != "\${prefix}/share"; then
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___GAMBCDIR_SHARE=\"\\\"$datadir\\\"\""
fi
fi
emacsdir="\${datadir}/emacs/site-lisp"
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___SYS_TYPE_CPU=\"\\\"$target_cpu\\\"\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___SYS_TYPE_VENDOR=\"\\\"$target_vendor\\\"\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___SYS_TYPE_OS=\"\\\"$target_os\\\"\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___CONFIGURE_COMMAND=\"\\\"`echo "$0$ac_configure_args" | sed -e s/\\\\\\\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/g -e s/\\\\\\\"/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"/g`\"\\\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___OBJ_EXTENSION=\"\\\"$obj\\\"\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___EXE_EXTENSION=\"\\\"$exe\\\"\""
GAMBCLIB_DEFS="$GAMBCLIB_DEFS -D___BAT_EXTENSION=\"\\\"$bat\\\"\""
###############################################################################
# Escape strings before substitution.
ESC_MF="sed -e s/\\\\\\\$/\\\$\\\$/g"
ESC_SH="sed -e s/\\\\/\\\\\\\\\\\\\\\\/g -e s/\\\"/\\\\\\\"/g -e s/\\\$/\\\\\\\$/g -e s/^/\"/ -e s/$/\"/"
ESC_ECHO="sed -e s/\\\\/\\\\\\\\\\\\\\\\/g -e s/\\\"/\\\\\\\"/g -e s/^/\"/ -e s/$/\"/"
ESC_BAT="sed -e s/\${/%%/g -e s/}/%%/g"
ESC_ECHO_BAT="sed -e s/\${/%/g -e s/}/%/g"
C_COMPILER_MF=`echo "$C_COMPILER" | $ESC_MF`
C_PREPROC_MF=`echo "$C_PREPROC" | $ESC_MF`
FLAGS_OBJ_MF=`echo "$FLAGS_OBJ" | $ESC_MF`
FLAGS_DYN_MF=`echo "$FLAGS_DYN" | $ESC_MF`
FLAGS_LIB_MF=`echo "$FLAGS_LIB" | $ESC_MF`
FLAGS_EXE_MF=`echo "$FLAGS_EXE" | $ESC_MF`
DEFS_OBJ_MF=`echo "$DEFS_OBJ" | $ESC_MF`
DEFS_DYN_MF=`echo "$DEFS_DYN" | $ESC_MF`
DEFS_LIB_MF=`echo "$DEFS_LIB" | $ESC_MF`
DEFS_EXE_MF=`echo "$DEFS_EXE" | $ESC_MF`
BUILD_OBJ_MF=`echo "$BUILD_OBJ" | $ESC_MF`
BUILD_DYN_MF=`echo "$BUILD_DYN" | $ESC_MF`
BUILD_LIB_MF=`echo "$BUILD_LIB" | $ESC_MF`
BUILD_EXE_MF=`echo "$BUILD_EXE" | $ESC_MF`
DEFS_MF=`echo "$DEFS" | $ESC_MF`
LIBS_MF=`echo "$LIBS" | $ESC_MF`
GAMBCLIB_DEFS_MF=`echo "$GAMBCLIB_DEFS" | $ESC_MF`
GAMBCLIB_MF=`echo "$GAMBCLIB" | $ESC_MF`
GAMBCGSCLIB_MF=`echo "$GAMBCGSCLIB" | $ESC_MF`
GAMBCGSILIB_MF=`echo "$GAMBCGSILIB" | $ESC_MF`
LIB_PREFIX_MF=`echo "$LIB_PREFIX" | $ESC_MF`
LIB_EXTENSION_MF=`echo "$LIB_EXTENSION" | $ESC_MF`
C_COMPILER_SH=`echo "$C_COMPILER" | $ESC_SH`
C_PREPROC_SH=`echo "$C_PREPROC" | $ESC_SH`
FLAGS_OBJ_SH=`echo "$FLAGS_OBJ" | $ESC_SH`
FLAGS_DYN_SH=`echo "$FLAGS_DYN" | $ESC_SH`
FLAGS_LIB_SH=`echo "$FLAGS_LIB" | $ESC_SH`
FLAGS_EXE_SH=`echo "$FLAGS_EXE" | $ESC_SH`
DEFS_OBJ_SH=`echo "$DEFS_OBJ" | $ESC_SH`
DEFS_DYN_SH=`echo "$DEFS_DYN" | $ESC_SH`
DEFS_LIB_SH=`echo "$DEFS_LIB" | $ESC_SH`
DEFS_EXE_SH=`echo "$DEFS_EXE" | $ESC_SH`
BUILD_OBJ_SH=`echo "$BUILD_OBJ" | $ESC_SH`
BUILD_DYN_SH=`echo "$BUILD_DYN" | $ESC_SH`
BUILD_LIB_SH=`echo "$BUILD_LIB" | $ESC_SH`
BUILD_EXE_SH=`echo "$BUILD_EXE" | $ESC_SH`
DEFS_SH=`echo "$DEFS" | $ESC_SH`
LIBS_SH=`echo "$LIBS" | $ESC_SH`
GAMBCLIB_DEFS_SH=`echo "$GAMBCLIB_DEFS" | $ESC_SH`
GAMBCLIB_SH=`echo "$GAMBCLIB" | $ESC_SH`
GAMBCGSCLIB_SH=`echo "$GAMBCGSCLIB" | $ESC_SH`
GAMBCGSILIB_SH=`echo "$GAMBCGSILIB" | $ESC_SH`
LIB_PREFIX_SH=`echo "$LIB_PREFIX" | $ESC_SH`
LIB_EXTENSION_SH=`echo "$LIB_EXTENSION" | $ESC_SH`
C_COMPILER_BAT=`echo "$C_COMPILER" | $ESC_BAT`
C_PREPROC_BAT=`echo "$C_PREPROC" | $ESC_BAT`
FLAGS_OBJ_BAT=`echo "$FLAGS_OBJ" | $ESC_BAT`
FLAGS_DYN_BAT=`echo "$FLAGS_DYN" | $ESC_BAT`
FLAGS_LIB_BAT=`echo "$FLAGS_LIB" | $ESC_BAT`
FLAGS_EXE_BAT=`echo "$FLAGS_EXE" | $ESC_BAT`
DEFS_OBJ_BAT=`echo "$DEFS_OBJ" | $ESC_BAT`
DEFS_DYN_BAT=`echo "$DEFS_DYN" | $ESC_BAT`
DEFS_LIB_BAT=`echo "$DEFS_LIB" | $ESC_BAT`
DEFS_EXE_BAT=`echo "$DEFS_EXE" | $ESC_BAT`
BUILD_OBJ_BAT=`echo "$BUILD_OBJ" | $ESC_BAT`
BUILD_DYN_BAT=`echo "$BUILD_DYN" | $ESC_BAT`
BUILD_LIB_BAT=`echo "$BUILD_LIB" | $ESC_BAT`
BUILD_EXE_BAT=`echo "$BUILD_EXE" | $ESC_BAT`
DEFS_BAT=`echo "$DEFS" | $ESC_BAT`
LIBS_BAT=`echo "$LIBS" | $ESC_BAT`
GAMBCLIB_DEFS_BAT=`echo "$GAMBCLIB_DEFS" | $ESC_BAT`
GAMBCLIB_BAT=`echo "$GAMBCLIB" | $ESC_BAT`
GAMBCGSCLIB_BAT=`echo "$GAMBCGSCLIB" | $ESC_BAT`
GAMBCGSILIB_BAT=`echo "$GAMBCGSILIB" | $ESC_BAT`
LIB_PREFIX_BAT=`echo "$LIB_PREFIX" | $ESC_BAT`
LIB_EXTENSION_BAT=`echo "$LIB_EXTENSION" | $ESC_BAT`
BUILD_OBJ_ECHO=`echo "$BUILD_OBJ" | $ESC_ECHO`
BUILD_DYN_ECHO=`echo "$BUILD_DYN" | $ESC_ECHO`
BUILD_LIB_ECHO=`echo "$BUILD_LIB" | $ESC_ECHO`
BUILD_EXE_ECHO=`echo "$BUILD_EXE" | $ESC_ECHO`
BUILD_OBJ_ECHO_BAT=`echo "$BUILD_OBJ" | $ESC_ECHO_BAT`
BUILD_DYN_ECHO_BAT=`echo "$BUILD_DYN" | $ESC_ECHO_BAT`
BUILD_LIB_ECHO_BAT=`echo "$BUILD_LIB" | $ESC_ECHO_BAT`
BUILD_EXE_ECHO_BAT=`echo "$BUILD_EXE" | $ESC_ECHO_BAT`
###############################################################################
if test "$srcdir" = "."; then
srcdirpfx=""
else
srcdirpfx="\$(srcdir)/"
fi
INSTALL='$(rootfromhere)/install-sh -c'
INSTALL_DATA='$(rootfromhere)/install-sh -c -m 644'
INSTALL_LIB='$(rootfromhere)/install-sh -c -m 644'
INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755'
AC_SUBST(srcdirpfx)
AC_SUBST(exe)
AC_SUBST(obj)
AC_SUBST(bat)
AC_SUBST(SETDLPATH)
AC_SUBST(BUILD_OBJ)
AC_SUBST(BUILD_DYN)
AC_SUBST(BUILD_LIB)
AC_SUBST(BUILD_EXE)
AC_SUBST(DEFS)
AC_SUBST(LIBS)
AC_SUBST(GAMBCLIB_DEFS)
AC_SUBST(GAMBCLIB)
AC_SUBST(GAMBCGSCLIB)
AC_SUBST(GAMBCGSILIB)
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_EXTENSION)
AC_SUBST(BUILD_OBJ_MF)
AC_SUBST(BUILD_DYN_MF)
AC_SUBST(BUILD_LIB_MF)
AC_SUBST(BUILD_EXE_MF)
AC_SUBST(DEFS_MF)
AC_SUBST(LIBS_MF)
AC_SUBST(GAMBCLIB_DEFS_MF)
AC_SUBST(GAMBCLIB_MF)
AC_SUBST(GAMBCGSCLIB_MF)
AC_SUBST(GAMBCGSILIB_MF)
AC_SUBST(LIB_PREFIX_MF)
AC_SUBST(LIB_EXTENSION_MF)
AC_SUBST(BUILD_OBJ_SH)
AC_SUBST(BUILD_DYN_SH)
AC_SUBST(BUILD_LIB_SH)
AC_SUBST(BUILD_EXE_SH)
AC_SUBST(DEFS_SH)
AC_SUBST(LIBS_SH)
AC_SUBST(GAMBCLIB_DEFS_SH)
AC_SUBST(GAMBCLIB_SH)
AC_SUBST(GAMBCGSCLIB_SH)
AC_SUBST(GAMBCGSILIB_SH)
AC_SUBST(LIB_PREFIX_SH)
AC_SUBST(LIB_EXTENSION_SH)
AC_SUBST(BUILD_OBJ_BAT)
AC_SUBST(BUILD_DYN_BAT)
AC_SUBST(BUILD_LIB_BAT)
AC_SUBST(BUILD_EXE_BAT)
AC_SUBST(DEFS_BAT)
AC_SUBST(LIBS_BAT)
AC_SUBST(GAMBCLIB_DEFS_BAT)
AC_SUBST(GAMBCLIB_BAT)
AC_SUBST(GAMBCGSCLIB_BAT)
AC_SUBST(GAMBCGSILIB_BAT)
AC_SUBST(LIB_PREFIX_BAT)
AC_SUBST(LIB_EXTENSION_BAT)
AC_SUBST(BUILD_OBJ_ECHO)
AC_SUBST(BUILD_DYN_ECHO)
AC_SUBST(BUILD_LIB_ECHO)
AC_SUBST(BUILD_EXE_ECHO)
AC_SUBST(BUILD_OBJ_ECHO_BAT)
AC_SUBST(BUILD_DYN_ECHO_BAT)
AC_SUBST(BUILD_LIB_ECHO_BAT)
AC_SUBST(BUILD_EXE_ECHO_BAT)
AC_SUBST(MAKE_LIBRARY)
AC_SUBST(MAKE_LIBRARY_FOR_INSTALL)
AC_SUBST(MAKE_LIBRARY_FOR_INSTALL_LIBS)
AC_SUBST(LINK)
AC_SUBST(LINK_FOR_INSTALL)
AC_SUBST(LINK_FOR_INSTALL_GSI_LIBS)
AC_SUBST(LINK_FOR_INSTALL_GSC_LIBS)
AC_SUBST(INSTALL)
AC_SUBST(INSTALL_DATA)
AC_SUBST(INSTALL_LIB)
AC_SUBST(INSTALL_PROGRAM)
AC_SUBST(LN_S)
AC_SUBST(RANLIB)
AC_SUBST(RC)
AC_SUBST(GIT)
AC_SUBST(HG)
AC_SUBST(FIXLIB)
AC_SUBST(X_FLAGS)
AC_SUBST(X_LIBS)
AC_SUBST(ENABLE_SYMLINKS)
AC_SUBST(ENABLE_INTERPRETER_NAME)
AC_SUBST(ENABLE_COMPILER_NAME)
AC_SUBST(ENABLE_MULTIPLE_VERSIONS)
AC_SUBST(ENABLE_SHARED)
AC_SUBST(ENABLE_ABSOLUTE_SHARED_LIBS)
AC_SUBST(ENABLE_VERSIONNED_LIBS)
AC_SUBST(emacsdir)
AC_SUBST(HELP_BROWSER)
AC_PROG_MAKE_SET
AC_OUTPUT(makefile include/makefile include/gambit.h lib/makefile lib/guide/guidepro lib/guide/makefile lib/guide/images/makefile gsi/makefile gsc/makefile bin/makefile bin/gambc-cc.unix bin/gambc-cc.bat.windows bin/gambc-doc.unix bin/gambc-doc.bat.windows misc/makefile doc/makefile tests/makefile examples/makefile examples/distr-comp/makefile examples/pi/makefile examples/ring/makefile examples/web-repl/makefile examples/web-server/makefile examples/tcltk/makefile examples/Xlib-simple/makefile examples/pthread/makefile examples/misc/makefile examples/iOS/makefile prebuilt/makefile prebuilt/macosx/makefile prebuilt/macosx/build-phase2 prebuilt/windows/makefile prebuilt/windows/build-phase2)
if test "$ENABLE_SINGLE_HOST" != yes -a "$C_COMP_LLVM" != yes; then
AC_MSG_NOTICE([
**************************************************************************
*** ***
*** The option "--enable-single-host" was not specified to the ***
*** configure script. The Gambit-C system will compile correctly but ***
*** typically the executables will run considerably slower than when ***
*** "--enable-single-host" is specified. On the other hand the build ***
*** with "--enable-single-host" is typically slower and requires lots ***
*** of RAM memory (>= 1 GB). If you are willing to wait for the ***
*** longer build, try the configure option "--enable-single-host". ***
*** ***
**************************************************************************
])
fi
if test "$ENABLE_SINGLE_HOST" = yes -a "$C_COMP_LLVM" = yes; then
AC_MSG_NOTICE([
**************************************************************************
*** ***
*** The option "--enable-single-host" was specified to the configure ***
*** script and a LLVM C compiler is being used (clang or LLVM GCC). ***
*** This combination is not recommended as the build may require a ***
*** lot of memory and a very long time (over 30 minutes on a fairly ***
*** fast machine with clang 3.0). Configuring with GNU GCC will give ***
*** a faster build (1 min on the same machine with GNU GCC 4.2.1) and ***
*** the executable will be faster. ***
*** ***
**************************************************************************
])
fi
if test "$ENABLE_SINGLE_HOST" != yes -a "$C_COMP_CLANG" = yes; then
AC_MSG_NOTICE([
**************************************************************************
*** ***
*** The clang compiler is being used. Please be aware that the build ***
*** may take a very long time (over 30 minutes on a fairly fast ***
*** machine with clang 3.0). Configuring with GNU GCC will give a ***
*** faster build (1 min on the same machine with GNU GCC 4.2.1) and ***
*** the executable will be faster. ***
*** ***
**************************************************************************
])
fi
if test "$C_COMP_GNUC" = yes; then
if test "$ENABLE_GCC_MOVE_LOOP_INVARIANTS" != yes; then
AC_MSG_NOTICE([
**************************************************************************
*** ***
*** The GCC compiler that is being used has problems compiling Gambit ***
*** generated code when the normal set of C compiler optimizations are ***
*** enabled and the configure flag "--enable-single-host" is ***
*** specified. It can take over 20 GB of virtual memory to ***
*** compile some files. For this reason the GCC compiler optimization ***
*** which performs loop invariant code motion has been disabled by ***
*** adding the GCC command line option "-fno-move-loop-invariants". ***
*** This greatly reduces compile time space requirements and it has a ***
*** small impact on overall run time performance, but for some tight ***
*** loops the effect is larger. If you want to avoid this problem ***
*** then upgrade your version of GCC to 4.4 (or above hopefully) or ***
*** downgrade to a version prior to 4.2 . ***
*** ***
**************************************************************************
])
fi
if test "$POSSIBLE_LLVM_GCC_LABEL_VALUES_BUG" = yes ; then
AC_MSG_NOTICE([
**************************************************************************
*** ***
*** The LLVM GCC compiler that is being used may have a bug in the ***
*** compilation of label values (i.e. &&label). This bug was ***
*** discovered when compiling Gambit with Xcode on Mac OS X (see bug ***
*** ID# 9956714). For this reason the use of computed gotos in the ***
*** generated code has been disabled. This greatly reduces the run ***
*** time performance. The system runs 5 times slower than when it is ***
*** compiled with GNU GCC. It is highly recommended that you use ***
*** another C compiler if possible. ***
*** ***
**************************************************************************
])
fi
# if test "$ENABLE_GCC_OPTS" != yes; then
# AC_MSG_NOTICE([
#**************************************************************************
#*** The GCC compiler is being used but the option "--enable-gcc-opts" ***
#*** was not specified to the configure script. The Gambit-C system ***
#*** will compile correctly but the code generated by the GCC compiler ***
#*** will be suboptimal and the executables will run slightly slower ***
#*** than if "--enable-gcc-opts" is specified. On the other hand the ***
#*** build process will be faster and require less memory. If you have ***
#*** lots of RAM memory (>= 2 Gbytes) and you are willing to wait for ***
#*** the longer build try the configure option "--enable-gcc-opts". ***
#**************************************************************************
#])
# fi
fi
Jump to Line
Something went wrong with that request. Please try again.