2000-06-16 11:06:06 +00:00
|
|
|
AC_INIT(Source/NSArray.m)
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
# configure.in for GNU Objective-C library
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
#
|
1997-03-03 21:32:37 +00:00
|
|
|
# Copyright (C) 1993,1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
1994-11-04 16:29:24 +00:00
|
|
|
#
|
1996-04-17 20:17:45 +00:00
|
|
|
# Written by: Andrew Kachites McCallum <mccallum@cs.rochester.edu>
|
1994-11-04 16:29:24 +00:00
|
|
|
# Dept. of Computer Science, U. of Rochester, Rochester, NY 14627
|
|
|
|
#
|
|
|
|
# This file is part of the GNU Objective-C library.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Library General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this library; if not, write to the Free
|
1999-09-09 02:56:20 +00:00
|
|
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
|
1994-11-04 16:29:24 +00:00
|
|
|
|
1996-09-16 20:38:37 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Use a .h file with #define's, instead of -D command-line switches
|
|
|
|
#--------------------------------------------------------------------
|
1999-07-09 02:18:50 +00:00
|
|
|
AC_CONFIG_HEADER(Headers/gnustep/base/config.h)
|
1994-11-04 16:29:24 +00:00
|
|
|
|
1997-03-03 20:07:35 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Determine the host, build, and target systems
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find the compiler
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
2000-06-27 21:11:01 +00:00
|
|
|
AC_PATH_PROG(WHOAMI, whoami, echo, $PATH:/usr/ucb)
|
|
|
|
|
1997-09-13 17:52:31 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# -pipe option for compiler
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
PIPE='-pipe'
|
|
|
|
AC_SUBST(PIPE)
|
|
|
|
|
2000-10-28 21:58:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# specific target_os options
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
case "$target_os" in
|
|
|
|
freebsd*) CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
|
|
|
LIBS="$LIBS -L/usr/local/lib";;
|
|
|
|
esac
|
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find out if we\'re using NeXT\'s compiler.
|
|
|
|
# if yes:
|
|
|
|
# add -cpp-traditional to CPP
|
|
|
|
# if no:
|
1996-04-17 19:37:36 +00:00
|
|
|
# include implementations of List, HashTable etc.
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether we are using NeXT's compiler)
|
1996-01-05 22:35:03 +00:00
|
|
|
AC_TRY_CPP([#include "$srcdir/config/config.nextcc.h"], NeXTCC=0, NeXTCC=1)
|
1994-11-04 16:29:24 +00:00
|
|
|
# Was using this too: -o `basename $CC` = "gcc" -o `basename $CC` = "xgcc"
|
|
|
|
if test $NeXTCC = 0; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Find out if nested functions work on this machine
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether nested functions work)
|
1996-01-05 22:35:03 +00:00
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.nested.c"],
|
1995-05-05 22:42:07 +00:00
|
|
|
gcc_nested=1, gcc_nested=0,
|
1994-11-04 16:29:24 +00:00
|
|
|
gcc_nested=1)
|
|
|
|
if test $gcc_nested = 0; then
|
1999-04-23 02:54:45 +00:00
|
|
|
AC_MSG_RESULT(no)
|
1994-11-04 16:29:24 +00:00
|
|
|
echo
|
|
|
|
echo "The GCC 'nested functions' feature does not seem to be working on"
|
1999-04-23 02:54:45 +00:00
|
|
|
echo "this machine. "
|
1994-11-04 16:29:24 +00:00
|
|
|
echo "Read the bug-report instructions in the GCC texinfo manual"
|
|
|
|
echo "and submit a bug report."
|
1999-04-23 02:54:45 +00:00
|
|
|
echo "I'm not even sure gstep-base uses nested functions anymore"
|
|
|
|
echo "but if it does, gstep-base will not compile. Try it"
|
1994-11-04 16:29:24 +00:00
|
|
|
echo "The program this configure script used to test nested functions"
|
1995-05-05 22:42:07 +00:00
|
|
|
echo "can be found in the file 'config/config.nested.c' in this"
|
1994-11-04 16:29:24 +00:00
|
|
|
echo "distribution. Under sparc-sun-sunos4.1.3 with gcc-2.6.1 the"
|
|
|
|
echo "file compiles, runs and returns exit status 0."
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Find out if we're on a NEXTSTEP machine
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether we are running under NEXTSTEP)
|
|
|
|
AC_TRY_CPP([#if defined(NeXT)
|
|
|
|
#error
|
|
|
|
#endif], NeXTSTEP=0, NeXTSTEP=1)
|
|
|
|
if test $NeXTSTEP = 0; then
|
|
|
|
AC_MSG_RESULT(no)
|
1995-05-19 15:24:47 +00:00
|
|
|
OBJS_INSTALL='$(GNU_OBJS) $(NEXTSTEP_OBJS) $(GNUSTEP_OBJS)'
|
|
|
|
HEADERS_INSTALL='$(GNU_HEADERS) $(NEXTSTEP_HEADERS) $(GNUSTEP_HEADERS)'
|
1996-04-17 14:47:17 +00:00
|
|
|
NEXT_INCLUDES='$(GNU_NEXT_INCLUDES)'
|
1994-11-04 16:29:24 +00:00
|
|
|
NeXT_runtime=0
|
|
|
|
NeXT_cc=0
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Find out if we are using NeXT or GNU runtime
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
saved_ac_ext=$ac_ext
|
|
|
|
ac_ext=m
|
|
|
|
AC_MSG_CHECKING(whether we are using GNU Objective C runtime)
|
1996-01-05 22:35:03 +00:00
|
|
|
AC_TRY_LINK([#include "$srcdir/config/config.nextrt.m"], ;,
|
1994-11-04 16:29:24 +00:00
|
|
|
NeXT_runtime=1, NeXT_runtime=0)
|
|
|
|
ac_ext=$saved_ac_ext
|
|
|
|
if test $NeXT_runtime = 1; then
|
|
|
|
AC_MSG_RESULT(no: NeXT runtime)
|
1996-09-24 17:43:33 +00:00
|
|
|
echo "Sorry GNUstep does not yet work with the NeXT runtime."
|
|
|
|
echo "Type \"setenv CC gcc -fgnu-runtime\", and run ./configure again."
|
|
|
|
echo "If you are interested in having GNUstep work with the NeXT"
|
|
|
|
echo "runtime, contact Andrew McCallum <mccallum@gnu.ai.mit.edu>."
|
|
|
|
AC_MSG_ERROR(Unsupported Objective C runtime.)
|
1996-09-24 15:55:56 +00:00
|
|
|
# Not reached, for now...
|
1994-11-04 16:29:24 +00:00
|
|
|
LIBOBJC=''
|
|
|
|
CC="$CC -fnext-runtime"
|
|
|
|
# Make sure that we get NeXTs objc/*.h files
|
|
|
|
NEXT_INCLUDES='$(NEXT_NEXT_INCLUDES)'
|
1995-05-19 15:24:47 +00:00
|
|
|
OBJS_INSTALL='$(GNU_OBJS)'
|
|
|
|
HEADERS_INSTALL='$(GNU_HEADERS)'
|
1994-11-04 16:29:24 +00:00
|
|
|
NeXT_cc=0
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
LIBOBJC='-lobjc'
|
|
|
|
CC="$CC -fgnu-runtime"
|
1996-04-17 14:47:17 +00:00
|
|
|
# Get objc/List.h, etc. files from this library.
|
|
|
|
NEXT_INCLUDES='$(GNU_NEXT_INCLUDES)'
|
1996-01-19 16:37:32 +00:00
|
|
|
OBJS_INSTALL='$(GNU_OBJS) $(NEXTSTEP_OBJS) $(GNUSTEP_OBJS)'
|
1995-05-19 15:24:47 +00:00
|
|
|
HEADERS_INSTALL='$(GNU_HEADERS) $(NEXTSTEP_HEADERS) $(GNUSTEP_HEADERS)'
|
1994-11-04 16:29:24 +00:00
|
|
|
NeXT_cc=0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
AC_MSG_RESULT(yes)
|
1996-04-17 14:47:17 +00:00
|
|
|
AC_MSG_ERROR(Sorry, $(LIBRARY_NAME) does not currently work with NeXT's cc; use gcc)
|
1994-11-04 16:29:24 +00:00
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Find out if we have NEXTSTEP 3.2 or lower
|
|
|
|
#----------------------------------------------------------------
|
|
|
|
AC_CHECKING(NEXTSTEP version)
|
|
|
|
AC_TRY_CPP([#if NX_CURRENT_COMPILER_RELEASE < 320
|
|
|
|
#error
|
|
|
|
#endif], NeXT32plus=1, NeXT32plus=0)
|
|
|
|
if test $NeXT32plus = 0; then
|
|
|
|
echo "aborting"
|
|
|
|
echo
|
|
|
|
echo "It looks like your compiler is NEXTSTEP 3.2 or earlier."
|
1996-04-17 14:47:17 +00:00
|
|
|
echo "$(LIBRARY_NAME) makes extensive use of nested functions. In 3.2,"
|
|
|
|
echo "NeXT's cc did not support nested functions. To compile $(LIBRARY_NAME)"
|
1994-11-04 16:29:24 +00:00
|
|
|
echo "you can either (1) use gcc instead of NeXT's cc (no loss, since"
|
|
|
|
echo "gcc can compile AppKit programs without problems), or (2) upgrade"
|
|
|
|
echo "to the later release of NEXTSTEP when it is available."
|
|
|
|
exit
|
|
|
|
fi
|
1995-05-19 15:24:47 +00:00
|
|
|
OBJS_INSTALL='$(GNU_OBJS)'
|
|
|
|
HEADERS_INSTALL='$(GNU_HEADERS)'
|
1994-11-04 16:29:24 +00:00
|
|
|
LIBOBJC=''
|
|
|
|
NeXT_runtime=1
|
|
|
|
NeXT_cc=1
|
|
|
|
# NeXT default cpp doesn't accept nested functions
|
|
|
|
CC='cc -traditional-cpp'
|
|
|
|
fi
|
1995-05-19 15:24:47 +00:00
|
|
|
AC_SUBST(OBJS_INSTALL)
|
|
|
|
AC_SUBST(HEADERS_INSTALL)
|
1996-09-16 20:38:37 +00:00
|
|
|
AC_DEFINE_UNQUOTED(NeXT_runtime, $NeXT_runtime)
|
|
|
|
AC_DEFINE_UNQUOTED(NeXT_cc, $NeXT_cc)
|
1994-11-04 16:29:24 +00:00
|
|
|
AC_SUBST(NEXT_INCLUDES)
|
|
|
|
|
2000-06-22 03:15:27 +00:00
|
|
|
#--------------------------------------------------------------------
|
2001-01-18 19:47:40 +00:00
|
|
|
# Miscellaneous flags
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Set location of GNUstep dirs for later use
|
|
|
|
GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Headers
|
|
|
|
if test "$GNUSTEP_FLATTENED" = yes; then
|
|
|
|
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries
|
|
|
|
else
|
|
|
|
clean_target_os=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $target_os`
|
|
|
|
clean_target_cpu=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $target_cpu`
|
|
|
|
obj_dir=$clean_target_cpu/$clean_target_os
|
|
|
|
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir
|
2000-06-22 03:15:27 +00:00
|
|
|
fi
|
|
|
|
|
2001-01-30 14:17:50 +00:00
|
|
|
#
|
|
|
|
# The following one is so that headers of custom libraries into
|
|
|
|
# $GNUSTEP_HDIR are used before the standard ones
|
|
|
|
#
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR"
|
|
|
|
|
2001-01-18 19:47:40 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check if Objective-C is installed
|
|
|
|
#--------------------------------------------------------------------
|
1999-09-24 22:24:08 +00:00
|
|
|
AC_CHECK_HEADERS(objc/objc.h)
|
|
|
|
if test $ac_cv_header_objc_objc_h = no; then
|
|
|
|
echo "Could not find Objective-C headers"
|
|
|
|
echo "Check to make sure you have a full installation of the GCC"
|
|
|
|
echo "compiler that includes the Objective-C headers and libraries"
|
|
|
|
AC_MSG_ERROR(Could not find Objective-C headers)
|
|
|
|
fi
|
|
|
|
|
1999-09-09 02:56:20 +00:00
|
|
|
#--------------------------------------------------------------------
|
2001-01-19 11:50:46 +00:00
|
|
|
# Check for thread flags for libobjc.
|
1999-09-09 02:56:20 +00:00
|
|
|
#--------------------------------------------------------------------
|
2001-01-19 11:50:46 +00:00
|
|
|
#
|
|
|
|
AC_MSG_CHECKING(for objc threading flags)
|
|
|
|
#
|
|
|
|
# Get them from gnustep-make which contains the real code to get them
|
|
|
|
#
|
|
|
|
objc_threaded=`grep objc_threaded: $GNUSTEP_SYSTEM_ROOT/Makefiles/$obj_dir/config.make | sed -e 's/objc_threaded:=//'`
|
|
|
|
#
|
|
|
|
AC_MSG_RESULT($objc_threaded)
|
1999-09-09 02:56:20 +00:00
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
#--------------------------------------------------------------------
|
1999-01-27 12:49:49 +00:00
|
|
|
# Byte order information needed for foundation headers.
|
1999-01-05 16:55:29 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
if test $ac_cv_c_bigendian = yes; then
|
|
|
|
GS_WORDS_BIGENDIAN=1
|
|
|
|
else
|
|
|
|
GS_WORDS_BIGENDIAN=0
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_WORDS_BIGENDIAN)
|
|
|
|
|
1999-01-27 12:49:49 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Type size information needed for foundation headers.
|
|
|
|
#--------------------------------------------------------------------
|
1999-01-28 12:15:51 +00:00
|
|
|
AC_CHECK_SIZEOF(void*)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
GS_SINT8="signed char"
|
|
|
|
GS_UINT8="unsigned char"
|
|
|
|
AC_SUBST(GS_SINT8)
|
|
|
|
AC_SUBST(GS_UINT8)
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(short)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_short)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
AC_CHECK_SIZEOF(int)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_int)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
AC_CHECK_SIZEOF(long)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_long)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
AC_CHECK_SIZEOF(long long)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_long_long)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
AC_CHECK_SIZEOF(float)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_float)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
AC_CHECK_SIZEOF(double)
|
1999-01-26 11:32:02 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_double)
|
1999-01-05 16:55:29 +00:00
|
|
|
|
2000-08-07 22:00:31 +00:00
|
|
|
AC_SUBST(ac_cv_sizeof_voidp)
|
1999-01-28 12:15:51 +00:00
|
|
|
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_int; then
|
|
|
|
GS_ADDR="unsigned int"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_long; then
|
|
|
|
GS_ADDR="unsigned long"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_long_long; then
|
|
|
|
GS_ADDR="unsigned long long"
|
|
|
|
else
|
|
|
|
echo "Unable to find integer of same size as void* - abort configuration"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_ADDR)
|
|
|
|
|
1999-01-05 16:55:29 +00:00
|
|
|
if test $ac_cv_sizeof_short = 2; then
|
|
|
|
GS_SINT16="signed short"
|
|
|
|
GS_UINT16="unsigned short"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_int = 2; then
|
|
|
|
GS_SINT16="signed int"
|
|
|
|
GS_UINT16="unsigned int"
|
|
|
|
else
|
|
|
|
echo "Unable to determine type for 16-bit integer - abort configuration"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_SINT16)
|
|
|
|
AC_SUBST(GS_UINT16)
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_int = 4; then
|
|
|
|
GS_SINT32="signed int"
|
|
|
|
GS_UINT32="unsigned int"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long = 4; then
|
|
|
|
GS_SINT32="signed long"
|
|
|
|
GS_UINT32="unsigned long"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_short = 4; then
|
|
|
|
GS_SINT32="signed short"
|
|
|
|
GS_UINT32="unsigned short"
|
|
|
|
else
|
|
|
|
echo "Unable to determine type for 32-bit integer - abort configuration"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_SINT32)
|
|
|
|
AC_SUBST(GS_UINT32)
|
|
|
|
|
1999-01-27 12:49:49 +00:00
|
|
|
GS_HAVE_I64=1
|
|
|
|
if test $ac_cv_sizeof_int = 8; then
|
|
|
|
GS_SINT64="signed int"
|
|
|
|
GS_UINT64="unsigned int"
|
1999-01-05 16:55:29 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long = 8; then
|
|
|
|
GS_SINT64="signed long"
|
|
|
|
GS_UINT64="unsigned long"
|
|
|
|
else
|
1999-01-27 12:49:49 +00:00
|
|
|
if test $ac_cv_sizeof_long_long = 8; then
|
|
|
|
GS_SINT64="signed long long"
|
|
|
|
GS_UINT64="unsigned long long"
|
|
|
|
else
|
|
|
|
# 64-bit ints not supported - but we need a dummy type for byte-swapping
|
|
|
|
# of 64-bit values arriving from another system.
|
|
|
|
GS_SINT64="struct { gsu8 a[8]; }"
|
|
|
|
GS_SINT64="struct { gsu8 a[9]; }"
|
|
|
|
GS_HAVE_I64=0
|
|
|
|
fi
|
1999-01-05 16:55:29 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_SINT64)
|
|
|
|
AC_SUBST(GS_UINT64)
|
1999-01-27 12:49:49 +00:00
|
|
|
AC_SUBST(GS_HAVE_I64)
|
|
|
|
|
|
|
|
GS_HAVE_I128=1
|
|
|
|
if test $ac_cv_sizeof_long = 16; then
|
|
|
|
GS_SINT128="signed long"
|
|
|
|
GS_UINT128="unsigned long"
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long_long = 16; then
|
|
|
|
GS_SINT128="signed long long"
|
|
|
|
GS_UINT128="unsigned long long"
|
|
|
|
else
|
|
|
|
# 128-bit ints not supported - but we need a dummy type for byte-swapping
|
|
|
|
# of 128-bit values arriving from another system.
|
|
|
|
GS_SINT128="struct { gsu8 a[16]; }"
|
1999-01-28 12:05:23 +00:00
|
|
|
GS_UINT128="struct { gsu8 a[16]; }"
|
1999-01-27 12:49:49 +00:00
|
|
|
GS_HAVE_I128=0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_SINT128)
|
|
|
|
AC_SUBST(GS_UINT128)
|
|
|
|
AC_SUBST(GS_HAVE_I128)
|
1999-01-05 16:55:29 +00:00
|
|
|
|
|
|
|
if test $ac_cv_sizeof_float = 4; then
|
|
|
|
GS_FLT32="float"
|
|
|
|
else
|
1999-01-27 12:49:49 +00:00
|
|
|
echo "Unable to determine type for 32-bit float - abort configuration"
|
|
|
|
exit
|
1999-01-05 16:55:29 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(GS_FLT32)
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_double = 8; then
|
|
|
|
GS_FLT64="double"
|
|
|
|
else
|
1999-01-27 12:49:49 +00:00
|
|
|
echo "Unable to determine type for 64-bit float - abort configuration"
|
|
|
|
exit
|
1999-01-05 16:55:29 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(GS_FLT64)
|
|
|
|
|
1999-01-26 16:24:40 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Type-size information for encoding into archives using NSArchiver etc.
|
|
|
|
#--------------------------------------------------------------------
|
1999-01-27 12:49:49 +00:00
|
|
|
if test $ac_cv_sizeof_short = 2; then
|
|
|
|
_GSC_S_SHT=_GSC_I16
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_SHT=_GSC_I32
|
1999-01-26 16:24:40 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(_GSC_S_SHT)
|
|
|
|
|
1999-01-27 12:49:49 +00:00
|
|
|
if test $ac_cv_sizeof_int = 2; then
|
|
|
|
_GSC_S_INT=_GSC_I16
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
1999-01-27 12:49:49 +00:00
|
|
|
if test $ac_cv_sizeof_int = 4; then
|
|
|
|
_GSC_S_INT=_GSC_I32
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_int = 8; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_INT=_GSC_I64
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_int = 16; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_INT=_GSC_I128
|
1999-01-26 16:24:40 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(_GSC_S_INT)
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_long = 4; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_LNG=_GSC_I32
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long = 8; then
|
1999-01-28 10:48:51 +00:00
|
|
|
_GSC_S_LNG=_GSC_I64
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long = 16; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_LNG=_GSC_I128
|
1999-01-26 16:24:40 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(_GSC_S_LNG)
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_long_long = 4; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_LNG_LNG=_GSC_I32
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long_long = 8; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_LNG_LNG=_GSC_I64
|
1999-01-26 16:24:40 +00:00
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long_long = 16; then
|
1999-01-27 12:49:49 +00:00
|
|
|
_GSC_S_LNG_LNG=_GSC_I128
|
1999-01-26 16:24:40 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(_GSC_S_LNG_LNG)
|
|
|
|
|
1995-04-03 22:22:07 +00:00
|
|
|
#--------------------------------------------------------------------
|
1995-09-12 22:30:13 +00:00
|
|
|
# Setup dynamic linking
|
1995-04-03 22:22:07 +00:00
|
|
|
#--------------------------------------------------------------------
|
1998-10-06 20:06:01 +00:00
|
|
|
OBJC_SYS_DYNAMIC_LINKER()
|
1995-04-03 22:22:07 +00:00
|
|
|
|
1999-07-22 14:17:27 +00:00
|
|
|
#---------------------------------------------------------------------
|
|
|
|
# Guess if we are using a compiler which has the (GNU extension) +load
|
|
|
|
# method which is executed before main.
|
|
|
|
# Defines HAVE_LOAD_METHOD if +load methods are called before main.
|
|
|
|
# Needed by NSProcessInfo.m
|
|
|
|
#--------------------------------------------------------------------
|
1999-09-09 02:56:20 +00:00
|
|
|
saved_LIBS="$LIBS"
|
|
|
|
saved_CPPFLAGS="$CPPFLAGS"
|
|
|
|
LIBS="$LIBS -lobjc"
|
|
|
|
CPPFLAGS="$CPPFLAGS -x objective-c"
|
2001-01-19 11:50:46 +00:00
|
|
|
if test x"$objc_threaded" != x""; then
|
|
|
|
LIBS="$LIBS $objc_threaded"
|
1999-09-09 02:56:20 +00:00
|
|
|
fi
|
|
|
|
LIBS="$LIBS $extra_LIBS"
|
1999-07-22 14:17:27 +00:00
|
|
|
AC_MSG_CHECKING(if +load method is executed before main)
|
|
|
|
AC_CACHE_VAL(objc_load_method_worked,
|
1999-09-09 02:56:20 +00:00
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.loadtest.m"],
|
|
|
|
objc_load_method_worked=yes,
|
|
|
|
objc_load_method_worked=no,
|
|
|
|
objc_load_method_worked=no)
|
|
|
|
)
|
1999-07-22 14:17:27 +00:00
|
|
|
if test $objc_load_method_worked = yes; then
|
|
|
|
AC_DEFINE(HAVE_LOAD_METHOD)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
1999-09-09 02:56:20 +00:00
|
|
|
CPPFLAGS="$saved_CPPFLAGS"
|
|
|
|
# Don't revert LIBS, need it for the next test
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by NSLock.m for conditioned wait
|
2000-06-22 03:15:27 +00:00
|
|
|
# get_uninstalled_dtable used by behavior.m and objc-load.m
|
1999-09-09 02:56:20 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(objc_condition_timedwait)
|
|
|
|
|
2000-06-22 03:15:27 +00:00
|
|
|
AC_EGREP_HEADER(objc_get_uninstalled_dtable, objc/objc-api.h,
|
|
|
|
AC_DEFINE(HAVE_OBJC_GET_UNINSTALLED_DTABLE),)
|
|
|
|
|
1999-09-09 02:56:20 +00:00
|
|
|
LIBS="$saved_LIBS"
|
|
|
|
|
1997-09-01 21:59:51 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Generic settings needed by NSZone.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_C_INLINE
|
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Following header checks needed for bzero in Storage.m and other places
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(string.h memory.h)
|
|
|
|
|
1996-09-24 15:45:33 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Following header check needed BinaryCStream.h
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_HEADERS(values.h)
|
|
|
|
|
1997-09-13 17:52:31 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Header files and functions for files and filesystems
|
|
|
|
#--------------------------------------------------------------------
|
1998-12-03 16:49:25 +00:00
|
|
|
AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h grp.h)
|
2000-10-30 05:03:28 +00:00
|
|
|
AC_CHECK_HEADERS(sys/mount.h sys/types.h windows.h locale.h langinfo.h)
|
2000-09-25 03:10:55 +00:00
|
|
|
saved_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -lm"
|
2000-09-22 04:20:52 +00:00
|
|
|
AC_CHECK_FUNCS(statvfs symlink readlink geteuid rint)
|
2000-09-25 03:10:55 +00:00
|
|
|
LIBS="$saved_LIBS"
|
1997-09-13 17:52:31 +00:00
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# These two headers (functions) needed by Time.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
dnl AC_REPLACE_FUNCS(getrusage gettimeofday)
|
|
|
|
|
2000-06-06 16:50:52 +00:00
|
|
|
AC_CHECK_HEADERS(sys/time.h sys/rusage.h ucbinclude/sys/resource.h)
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
2000-11-15 14:32:18 +00:00
|
|
|
# These headers/functions needed by GSTcpPort.m
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-06-13 14:50:40 +00:00
|
|
|
AC_CHECK_HEADERS(sys/socket.h netinet/in.h)
|
1994-11-04 16:29:24 +00:00
|
|
|
dnl AC_REPLACE_FUNCS(recvfrom)
|
|
|
|
|
1999-03-09 05:55:19 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# These headers/functions needed by NSLog.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_HEADERS(syslog.h)
|
|
|
|
AC_CHECK_FUNCS(syslog)
|
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
1995-03-31 15:30:28 +00:00
|
|
|
# This function needed by StdioStream.m
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-03-23 18:49:34 +00:00
|
|
|
AC_CHECK_FUNCS(vsprintf vasprintf)
|
1997-12-11 19:09:56 +00:00
|
|
|
if test $ac_cv_func_vsprintf = yes ; then
|
1996-10-31 18:12:44 +00:00
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.vsprintf.c"],
|
|
|
|
VSPRINTF_RETURNS_LENGTH=1,
|
|
|
|
VSPRINTF_RETURNS_LENGTH=0,
|
|
|
|
VSPRINTF_RETURNS_LENGTH=1)
|
1997-09-01 21:59:51 +00:00
|
|
|
AC_DEFINE_UNQUOTED(VSPRINTF_RETURNS_LENGTH, $VSPRINTF_RETURNS_LENGTH)
|
1996-10-31 18:12:44 +00:00
|
|
|
fi
|
2000-03-23 18:49:34 +00:00
|
|
|
if test $ac_cv_func_vasprintf = yes ; then
|
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.vasprintf.c"],
|
|
|
|
VASPRINTF_RETURNS_LENGTH=1,
|
|
|
|
VASPRINTF_RETURNS_LENGTH=0,
|
|
|
|
VASPRINTF_RETURNS_LENGTH=1)
|
|
|
|
AC_DEFINE_UNQUOTED(VASPRINTF_RETURNS_LENGTH, $VASPRINTF_RETURNS_LENGTH)
|
|
|
|
fi
|
1994-11-04 16:29:24 +00:00
|
|
|
|
1997-09-01 21:59:51 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-06-13 14:50:40 +00:00
|
|
|
# This function needed by NSFileManager.m
|
1997-09-01 21:59:51 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(getcwd)
|
2000-06-13 14:50:40 +00:00
|
|
|
AC_HEADER_DIRENT
|
1997-01-06 22:30:33 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
2000-06-13 14:50:40 +00:00
|
|
|
# This function needed by gdomap.c
|
1997-01-06 22:30:33 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-06-13 14:50:40 +00:00
|
|
|
AC_CHECK_HEADERS(getopt.h)
|
1997-01-06 22:30:33 +00:00
|
|
|
|
1997-09-01 21:59:51 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by NSPage.m
|
1995-03-31 15:30:28 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(valloc)
|
|
|
|
|
1995-03-31 15:34:32 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by Time.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(times)
|
|
|
|
|
1996-10-31 16:43:58 +00:00
|
|
|
#--------------------------------------------------------------------
|
1997-09-01 21:59:51 +00:00
|
|
|
# These functions needed by NSData.m
|
|
|
|
#--------------------------------------------------------------------
|
1999-03-09 05:55:19 +00:00
|
|
|
AC_CHECK_FUNCS(mkstemp)
|
1997-09-01 21:59:51 +00:00
|
|
|
AC_CHECK_FUNCS(shmctl)
|
|
|
|
AC_CHECK_FUNCS(mmap)
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by UnixFileHandle.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(inet_aton)
|
|
|
|
|
1998-05-29 15:25:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
1999-01-05 16:55:29 +00:00
|
|
|
# These functions needed by NSTask.m
|
1998-05-29 15:25:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
1999-01-05 18:17:38 +00:00
|
|
|
AC_CHECK_FUNCS(killpg setpgrp setpgid)
|
1999-06-26 05:28:11 +00:00
|
|
|
AC_FUNC_SETPGRP
|
1998-05-29 15:25:41 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by NSThread.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(usleep)
|
|
|
|
|
1997-09-01 21:59:51 +00:00
|
|
|
#--------------------------------------------------------------------
|
1999-07-22 14:17:27 +00:00
|
|
|
# This function needed by NSDebug.m and NSProcessInfo.m
|
1996-10-31 16:43:58 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(strerror)
|
|
|
|
|
1996-01-24 03:24:33 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by NSString for handling of %@ printf directive.
|
|
|
|
#--------------------------------------------------------------------
|
1999-02-05 06:10:49 +00:00
|
|
|
AC_CHECK_FUNC(register_printf_function, register_printf=1,
|
|
|
|
register_printf=0)
|
|
|
|
if test $register_printf = 1; then
|
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.printf.c"],
|
|
|
|
working_register_printf=1, working_register_printf=0,
|
|
|
|
working_register_printf=1)
|
|
|
|
if test $working_register_printf = 1; then
|
|
|
|
AC_DEFINE(HAVE_REGISTER_PRINTF_FUNCTION)
|
|
|
|
fi
|
|
|
|
fi
|
1996-01-24 03:24:33 +00:00
|
|
|
|
1999-07-12 04:21:05 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# This function needed by NSString.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_FUNCS(realpath)
|
|
|
|
|
1999-07-22 14:17:27 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check if the C Library defines extern char *program_invocation_name
|
|
|
|
# Used in critical cases by NSProcessInfo.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(program_invocation_name in C Library)
|
|
|
|
AC_CACHE_VAL(program_invocation_name_worked,
|
|
|
|
[AC_TRY_RUN([
|
|
|
|
#include <string.h>
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
extern char *program_invocation_name;
|
|
|
|
return (strcmp (program_invocation_name, argv[0]));
|
|
|
|
}
|
|
|
|
], program_invocation_name_worked=yes, program_invocation_name_worked=no, program_invocation_name_worked=no)])
|
|
|
|
if test $program_invocation_name_worked = yes; then
|
|
|
|
AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Defines HAVE_PROC_FS if the kernel supports the /proc filesystem.
|
|
|
|
# Needed by NSProcessInfo.m
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(kernel support for /proc filesystem)
|
|
|
|
if (grep proc /etc/fstab >/dev/null 2>/dev/null); then
|
|
|
|
sys_proc_fs=yes;
|
|
|
|
AC_DEFINE(HAVE_PROC_FS)
|
|
|
|
AC_MSG_RESULT(yes)
|
1999-09-09 02:56:20 +00:00
|
|
|
# Solaris has proc, but for some reason the dir is not readable
|
|
|
|
#elif (grep proc /etc/vfstab >/dev/null 2>/dev/null); then
|
|
|
|
# sys_proc_fs=yes;
|
|
|
|
# AC_DEFINE(HAVE_PROC_FS)
|
|
|
|
# AC_MSG_RESULT(yes)
|
1999-07-22 14:17:27 +00:00
|
|
|
else
|
|
|
|
sys_proc_fs=no;
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
2000-04-18 21:34:59 +00:00
|
|
|
# Linux (and others?) /proc contains a symlink to the executable
|
|
|
|
# file from which the process loaded its code. This can be used
|
|
|
|
# by NSBundle.m to locate the main bundle.
|
2000-05-03 03:14:14 +00:00
|
|
|
sys_proc_fs_exe=no;
|
2000-04-18 21:34:59 +00:00
|
|
|
if test $sys_proc_fs = yes; then
|
|
|
|
AC_MSG_CHECKING(link to executable in /proc)
|
|
|
|
if test -L /proc/self/exe; then
|
2000-05-03 03:14:14 +00:00
|
|
|
sys_proc_fs_exe=yes;
|
2000-04-18 21:34:59 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-05-03 03:14:14 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check if short and int values need to be word aligned
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(short/int needs to be word aligned)
|
|
|
|
AC_TRY_RUN([#include "$srcdir/config/config.align.c"],
|
|
|
|
NEED_WORD_ALIGNMENT=0,
|
|
|
|
NEED_WORD_ALIGNMENT=1,
|
|
|
|
NEED_WORD_ALIGNMENT=1)
|
|
|
|
AC_DEFINE_UNQUOTED(NEED_WORD_ALIGNMENT, $NEED_WORD_ALIGNMENT)
|
|
|
|
if test $NEED_WORD_ALIGNMENT = 1; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
1999-07-22 14:17:27 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
1999-09-09 02:56:20 +00:00
|
|
|
# Include redefinition of main () only if needed.
|
|
|
|
# On some systems - force redefinition to be used as the /proc stuff
|
2000-06-29 03:51:06 +00:00
|
|
|
# doesn't work. Allow NSProcessInfo initialization method also.
|
1999-07-22 14:17:27 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-06-29 03:51:06 +00:00
|
|
|
AC_MSG_CHECKING("use of pass-through arguments")
|
|
|
|
AC_ARG_ENABLE(pass-arguments,
|
2000-12-08 19:06:00 +00:00
|
|
|
[ --enable-pass-arguments Force user main call to NSProcessInfo initialize],,
|
2000-06-29 03:51:06 +00:00
|
|
|
enable_pass_arguments=no)
|
|
|
|
|
|
|
|
case "$target_os" in
|
2000-06-30 22:42:48 +00:00
|
|
|
cygwin*) enable_pass_arguments=yes;;
|
2000-06-29 03:51:06 +00:00
|
|
|
esac
|
|
|
|
if test "$enable_pass_arguments" = "yes"; then
|
|
|
|
GS_PASS_ARGUMENTS=1
|
|
|
|
else
|
|
|
|
GS_PASS_ARGUMENTS=0
|
|
|
|
fi
|
|
|
|
AC_SUBST(GS_PASS_ARGUMENTS)
|
|
|
|
AC_MSG_RESULT($enable_pass_arguments)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("use of fake-main definition")
|
1999-07-22 14:17:27 +00:00
|
|
|
AC_ARG_ENABLE(fake-main,
|
2000-12-08 19:06:00 +00:00
|
|
|
[ --enable-fake-main Force redefine of user main function],,
|
1999-07-22 14:17:27 +00:00
|
|
|
enable_fake_main=no)
|
1999-09-09 02:56:20 +00:00
|
|
|
|
2000-06-29 03:51:06 +00:00
|
|
|
if test "$enable_pass_arguments" = "no"; then
|
|
|
|
case "$target_os" in
|
2000-09-30 22:08:21 +00:00
|
|
|
freebsdelf*) ;;
|
2000-06-29 03:51:06 +00:00
|
|
|
freebsd*) enable_fake_main=yes;;
|
|
|
|
netbsd*) enable_fake_main=yes;;
|
|
|
|
openbsd*) enable_fake_main=yes;;
|
|
|
|
*sysv*) enable_fake_main=yes;;
|
|
|
|
esac
|
|
|
|
fi
|
1999-09-09 02:56:20 +00:00
|
|
|
|
2000-06-29 03:51:06 +00:00
|
|
|
GS_FAKE_MAIN=0
|
1999-07-22 14:17:27 +00:00
|
|
|
if test "$enable_fake_main" = "yes"; then
|
|
|
|
GS_FAKE_MAIN=1
|
2000-06-29 03:51:06 +00:00
|
|
|
elif test "$enable_pass_arguments" = "no"; then
|
1999-07-22 14:17:27 +00:00
|
|
|
if test $objc_load_method_worked = yes -a $sys_proc_fs = yes; then
|
|
|
|
GS_FAKE_MAIN=0
|
|
|
|
else
|
|
|
|
GS_FAKE_MAIN=1
|
2000-06-29 03:51:06 +00:00
|
|
|
enable_fake_main=yes
|
1999-07-22 14:17:27 +00:00
|
|
|
fi
|
2000-05-03 03:14:14 +00:00
|
|
|
if test $sys_proc_fs_exe = yes; then
|
|
|
|
AC_DEFINE(HAVE_PROC_FS_EXE_LINK)
|
|
|
|
fi
|
1999-07-22 14:17:27 +00:00
|
|
|
fi
|
2000-09-15 22:06:01 +00:00
|
|
|
case "$target_os" in
|
|
|
|
mingw*) enable_fake_main=no; GS_FAKE_MAIN=0;;
|
|
|
|
esac
|
1999-07-22 14:17:27 +00:00
|
|
|
AC_SUBST(GS_FAKE_MAIN)
|
2000-06-29 03:51:06 +00:00
|
|
|
AC_MSG_RESULT($enable_fake_main)
|
1999-07-22 14:17:27 +00:00
|
|
|
|
2000-12-08 19:06:00 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check for FFI interface libraries for invocations
|
2001-01-09 03:53:02 +00:00
|
|
|
# We enable ffcall by default now.
|
2000-12-08 19:06:00 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(libffi,
|
|
|
|
[ --enable-libffi Enable use of libffi library],,
|
|
|
|
enable_libffi=no)
|
|
|
|
AC_ARG_ENABLE(ffcall,
|
|
|
|
[ --enable-ffcall Enable use of ffcall library],,
|
2001-01-09 03:53:02 +00:00
|
|
|
enable_ffcall=yes)
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADER(ffi.h, , enable_libffi=no)
|
|
|
|
|
2001-01-03 17:09:40 +00:00
|
|
|
AC_MSG_CHECKING("for forwarding callback in runtime")
|
|
|
|
AC_EGREP_HEADER(__objc_msg_forward, objc/objc-api.h, AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no); enable_ffcall=no)
|
2000-12-08 19:06:00 +00:00
|
|
|
AC_CHECK_HEADERS(callback.h, , enable_ffcall=no)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("FFI library usage")
|
|
|
|
WITH_FFI=none
|
|
|
|
if test $enable_libffi = yes; then
|
|
|
|
AC_DEFINE(USE_LIBFFI)
|
|
|
|
WITH_FFI=libffi
|
2001-01-29 19:39:09 +00:00
|
|
|
LIBS="$LIBS -lffi"
|
2000-12-08 19:06:00 +00:00
|
|
|
AC_MSG_RESULT(libffi)
|
|
|
|
elif test $enable_ffcall = yes; then
|
|
|
|
AC_DEFINE(USE_FFCALL)
|
|
|
|
WITH_FFI=ffcall
|
2001-01-29 19:39:09 +00:00
|
|
|
LIBS="$LIBS -lcallback -lavcall"
|
2000-12-08 19:06:00 +00:00
|
|
|
AC_MSG_RESULT(ffcall)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(none)
|
2001-01-09 03:53:02 +00:00
|
|
|
AC_WARN(No ffcall interface library found)
|
|
|
|
echo
|
|
|
|
echo "GNUstep requires the ffcall library to do invocations and DO"
|
2001-01-29 19:39:09 +00:00
|
|
|
echo "Make sure this library is installed (see installation instructions)"
|
2001-01-09 03:53:02 +00:00
|
|
|
echo "Otherwise DO will not be compatible with other systems"
|
2000-12-08 19:06:00 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_FFI)
|
|
|
|
|
2000-06-20 13:17:22 +00:00
|
|
|
#--------------------------------------------------------------------
|
2001-01-05 10:12:17 +00:00
|
|
|
# Check recent libxml for Properytlists, GSXML, GSDoc etc.
|
|
|
|
#--------------------------------------------------------------------
|
2001-01-31 19:02:09 +00:00
|
|
|
|
|
|
|
# Save CFLAGS and LIBS as AM_PATH_XML clobbers these variables regardless
|
|
|
|
# of the success of the macro.
|
|
|
|
saved_LIBS="$LIBS"
|
|
|
|
saved_CFLAGS="$CFLAGS"
|
|
|
|
|
2001-01-05 10:12:17 +00:00
|
|
|
AM_PATH_XML(2.2.3, enable_libxml=yes, enable_libxml=no)
|
|
|
|
if test $enable_libxml = yes; then
|
|
|
|
CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
|
|
|
|
LIBS="$LIBS $XML_LIBS"
|
|
|
|
HAVE_LIBXML=1
|
|
|
|
AC_DEFINE(HAVE_LIBXML)
|
2000-06-20 13:17:22 +00:00
|
|
|
else
|
2001-01-05 10:12:17 +00:00
|
|
|
HAVE_LIBXML=0
|
2001-01-31 19:02:09 +00:00
|
|
|
# Restore the CFLAGS and LIBS because AM_PATH_XML messes them
|
|
|
|
LIBS="$saved_LIBS"
|
|
|
|
CFLAGS="$saved_CFLAGS"
|
2000-06-20 13:17:22 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_LIBXML)
|
|
|
|
|
2000-11-15 14:32:18 +00:00
|
|
|
#--------------------------------------------------------------------
|
2000-11-18 08:54:32 +00:00
|
|
|
# Check OpenSSL for HTTPS support.
|
2000-11-15 14:32:18 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
echo "Checking for OpenSSL"
|
|
|
|
AC_ARG_WITH(openssl-include,
|
|
|
|
[ --with-openssl-include=PATH include path for openssl headers],
|
|
|
|
openssl_incdir="$withval", openssl_incdir="no")
|
|
|
|
|
|
|
|
AC_ARG_WITH(openssl-library,
|
|
|
|
[ --with-openssl-library=PATH library path for openssl libraries],
|
|
|
|
openssl_libdir="$withval", openssl_libdir="no")
|
|
|
|
|
|
|
|
cppflags_temp=$CFLAGS
|
|
|
|
libs_temp=$LIBS
|
|
|
|
|
|
|
|
if test "$openssl_incdir" != "no"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$openssl_incdir"
|
|
|
|
fi
|
|
|
|
if test "$openssl_libdir" != "no"; then
|
|
|
|
LIBS="$LIBS -L$openssl_libdir"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(openssl/ssl.h)
|
|
|
|
if test $ac_cv_header_openssl_ssl_h = no; then
|
|
|
|
echo "Could not find openssl headers"
|
|
|
|
echo "Check to make sure you have a recent version of openssl installed"
|
|
|
|
AC_MSG_WARN(Could not find openssl headers)
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(crypto, CRYPTO_malloc, ssl_ok=yes, ssl_ok=no)
|
|
|
|
if test "$ssl_ok" = yes; then
|
|
|
|
base_libs="$LIBS"
|
|
|
|
LIBS="$LIBS -lcrypto"
|
|
|
|
AC_CHECK_LIB(ssl, ssl2_clear, ssl_ok=yes, ssl_ok=no)
|
|
|
|
if test "$ssl_ok" = yes; then
|
|
|
|
LIBS="$base_libs -lssl -lcrypto"
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$HAVE_LIBSSL" = "0"; then
|
|
|
|
CPPFLAGS="$cppflags_temp";
|
|
|
|
LIBS="$libs_temp";
|
|
|
|
fi
|
|
|
|
if test "$HAVE_LIBCRYPTO" = "0"; then
|
|
|
|
CPPFLAGS="$cppflags_temp";
|
|
|
|
LIBS="$libs_temp";
|
|
|
|
fi
|
|
|
|
|
2000-11-18 08:54:32 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check GMP for NSDecimal
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
echo "Checking for GMP"
|
|
|
|
AC_ARG_WITH(gmp-include,
|
|
|
|
[ --with-gmp-include=PATH include path for gmp headers],
|
|
|
|
gmp_incdir="$withval", gmp_incdir="no")
|
|
|
|
|
|
|
|
AC_ARG_WITH(gmp-library,
|
|
|
|
[ --with-gmp-library=PATH library path for gmp libraries],
|
|
|
|
gmp_libdir="$withval", gmp_libdir="no")
|
|
|
|
|
2001-01-29 22:27:10 +00:00
|
|
|
cppflags_temp=$CPPFLAGS
|
2000-11-18 08:54:32 +00:00
|
|
|
libs_temp=$LIBS
|
|
|
|
|
|
|
|
if test "$gmp_incdir" != "no"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$gmp_incdir"
|
|
|
|
fi
|
|
|
|
if test "$gmp_libdir" != "no"; then
|
|
|
|
LIBS="$LIBS -L$gmp_libdir"
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAVE_GMP=0
|
|
|
|
AC_CHECK_HEADERS(gmp.h)
|
|
|
|
if test $ac_cv_header_gmp_h = no; then
|
|
|
|
echo "Could not find gmp headers"
|
|
|
|
echo "Check to make sure you have gmp installed"
|
|
|
|
AC_MSG_WARN(Could not find gmp headers)
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(gmp, mpf_abs, gmp_ok=yes, gmp_ok=no)
|
2001-01-25 17:38:07 +00:00
|
|
|
if test "$gmp_ok" = no; then
|
|
|
|
AC_CHECK_LIB(gmp, __gmpf_abs, gmp_ok=yes, gmp_ok=no)
|
|
|
|
fi
|
2000-11-18 08:54:32 +00:00
|
|
|
if test "$gmp_ok" = yes; then
|
|
|
|
base_libs="$LIBS"
|
|
|
|
LIBS="$LIBS -lgmp"
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
HAVE_GMP=1
|
|
|
|
else
|
|
|
|
echo "Could not find gmp library"
|
|
|
|
echo "Check to make sure you have gmp installed"
|
|
|
|
AC_MSG_WARN(Could not find gmp library)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$HAVE_GMP" = "0"; then
|
|
|
|
CPPFLAGS="$cppflags_temp";
|
|
|
|
LIBS="$libs_temp";
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_GMP)
|
|
|
|
|
2001-01-29 19:39:09 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check for iconv support (for Unicode conversion).
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check in the glibc library
|
|
|
|
AC_CHECK_FUNCS(iconv)
|
|
|
|
if test $ac_cv_func_iconv = no; then
|
|
|
|
# Check if we have a libiconv library
|
|
|
|
AC_ARG_WITH(libiconv-library,
|
|
|
|
[ --with-libiconv-library=PATH library path for libiconv libraries],
|
|
|
|
libiconv_libdir="$withval", libiconv_libdir="no")
|
|
|
|
libs_temp=$LIBS
|
|
|
|
|
|
|
|
if test "$libiconv_libdir" != "no"; then
|
|
|
|
LIBS="$LIBS -L$libiconv_libdir"
|
|
|
|
fi
|
2000-11-18 08:54:32 +00:00
|
|
|
|
2001-01-29 19:39:09 +00:00
|
|
|
AC_CHECK_LIB(iconv, main)
|
|
|
|
if test x"$av_cv_lib_iconv_main" = xyes; then
|
|
|
|
LIBS="$LIBS -liconv"
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
SYSTEM_DEFS="-DHAVE_ICONV $SYSTEM_DEFS"
|
|
|
|
else
|
|
|
|
LIBS="$libs_temp";
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
SYSTEM_DEFS="-DHAVE_ICONV $SYSTEM_DEFS"
|
|
|
|
fi
|
1999-07-22 14:17:27 +00:00
|
|
|
|
2001-01-29 19:39:09 +00:00
|
|
|
AC_SUBST(SYSTEM_DEFS)
|
1997-03-03 20:07:35 +00:00
|
|
|
AC_SUBST(whole_archive)
|
|
|
|
AC_SUBST(no_whole_archive)
|
|
|
|
|
1999-01-28 19:37:16 +00:00
|
|
|
AC_CONFIG_SUBDIRS(Source/mframe)
|
1999-01-02 18:29:44 +00:00
|
|
|
|
2000-09-13 14:19:43 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Record the version
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
if test -f "Version"; then
|
|
|
|
. Version
|
|
|
|
fi
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(MAJOR_VERSION)
|
|
|
|
AC_SUBST(MINOR_VERSION)
|
|
|
|
AC_SUBST(SUBMINOR_VERSION)
|
|
|
|
AC_SUBST(GCC_VERSION)
|
|
|
|
|
1994-11-04 16:29:24 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Write the Makefiles
|
|
|
|
#--------------------------------------------------------------------
|
2001-01-29 19:39:09 +00:00
|
|
|
AC_OUTPUT(config.mak base.make Headers/gnustep/base/GSConfig.h
|
2000-09-13 14:19:43 +00:00
|
|
|
Headers/gnustep/base/preface.h)
|
1996-04-10 20:30:02 +00:00
|
|
|
|
|
|
|
dnl Local Variables:
|
|
|
|
dnl comment-start: "dnl "
|
|
|
|
dnl comment-end: ""
|
|
|
|
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
|
|
|
dnl compile-command: "autoconf"
|
|
|
|
dnl End:
|