2001-02-17 13:19:19 +01:00
|
|
|
# Process this file with autoconf to produce a configure script
|
2001-02-20 21:34:47 +01:00
|
|
|
AC_INIT
|
2001-04-06 19:37:31 +02:00
|
|
|
AC_CANONICAL_SYSTEM
|
2001-02-20 21:34:47 +01:00
|
|
|
AM_MAINTAINER_MODE
|
2001-02-17 13:19:19 +01:00
|
|
|
AM_CONFIG_HEADER(ib_config.h)
|
|
|
|
AM_INIT_AUTOMAKE(ib, 0.90)
|
2001-04-23 02:28:08 +02:00
|
|
|
|
|
|
|
# This is need before AC_PROG_CC
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "x${CFLAGS-}" = x ; then
|
|
|
|
cflags_is_set=no
|
|
|
|
else
|
|
|
|
cflags_is_set=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${CPPFLAGS-}" = x ; then
|
|
|
|
cppflags_is_set=no
|
|
|
|
else
|
|
|
|
cppflags_is_set=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${LDFLAGS-}" = x ; then
|
|
|
|
ldflags_is_set=no
|
|
|
|
else
|
|
|
|
ldflags_is_set=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The following hack should ensure that configure doesn't add optimizing
|
|
|
|
# or debugging flags to CFLAGS or CXXFLAGS
|
|
|
|
CFLAGS="$CFLAGS "
|
|
|
|
CXXFLAGS="$CXXFLAGS "
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_RANLIB
|
2001-04-06 19:37:31 +02:00
|
|
|
AC_PROG_INSTALL
|
2001-04-18 16:23:06 +02:00
|
|
|
AC_CHECK_HEADERS(aio.h sched.h)
|
2001-02-17 13:19:19 +01:00
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
2002-06-30 17:57:21 +02:00
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
2001-04-18 16:23:06 +02:00
|
|
|
AC_CHECK_FUNCS(sched_yield)
|
2001-05-14 16:45:38 +02:00
|
|
|
AC_CHECK_FUNCS(fdatasync)
|
2001-10-11 11:49:44 +02:00
|
|
|
#AC_CHECK_FUNCS(localtime_r) # Already checked by MySQL
|
2001-04-20 14:18:46 +02:00
|
|
|
#AC_C_INLINE Already checked in MySQL
|
2001-02-17 13:19:19 +01:00
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
2001-04-19 13:43:32 +02:00
|
|
|
# Build optimized or debug version ?
|
|
|
|
# First check for gcc and g++
|
|
|
|
if test "$ac_cv_prog_gcc" = "yes"
|
|
|
|
then
|
|
|
|
DEBUG_CFLAGS="-g"
|
|
|
|
DEBUG_OPTIMIZE_CC="-O"
|
|
|
|
OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
|
|
|
|
else
|
|
|
|
DEBUG_CFLAGS="-g"
|
|
|
|
DEBUG_OPTIMIZE_CC=""
|
|
|
|
OPTIMIZE_CFLAGS="-O"
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_prog_cxx_g" = "yes"
|
|
|
|
then
|
|
|
|
DEBUG_CXXFLAGS="-g"
|
|
|
|
DEBUG_OPTIMIZE_CXX="-O"
|
|
|
|
OPTIMIZE_CXXFLAGS="-O3"
|
|
|
|
else
|
|
|
|
DEBUG_CXXFLAGS="-g"
|
|
|
|
DEBUG_OPTIMIZE_CXX=""
|
|
|
|
OPTIMIZE_CXXFLAGS="-O"
|
|
|
|
fi
|
|
|
|
AC_ARG_WITH(debug,
|
|
|
|
[ --without-debug Build a production version without debugging code],
|
|
|
|
[with_debug=$withval],
|
|
|
|
[with_debug=no])
|
|
|
|
if test "$with_debug" = "yes"
|
|
|
|
then
|
|
|
|
# Medium debug.
|
|
|
|
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
|
|
|
|
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
|
|
|
|
elif test "$with_debug" = "full"
|
|
|
|
then
|
|
|
|
# Full debug. Very slow in some cases
|
|
|
|
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
|
|
|
|
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
|
|
|
|
else
|
|
|
|
# Optimized version. No debug
|
2001-04-19 14:25:03 +02:00
|
|
|
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS -DDEBUG_OFF"
|
|
|
|
CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS -DDEBUG_OFF"
|
2001-04-19 13:43:32 +02:00
|
|
|
fi
|
|
|
|
|
2001-04-06 19:37:31 +02:00
|
|
|
case "$target_os" in
|
2002-10-29 22:26:21 +01:00
|
|
|
lin*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_LINUX";;
|
2002-08-06 21:59:13 +02:00
|
|
|
hpux10*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
|
2001-04-20 14:18:46 +02:00
|
|
|
hp*)
|
2002-07-23 03:24:09 +02:00
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
|
2002-08-25 09:26:40 +02:00
|
|
|
aix*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_AIX";;
|
2001-04-20 14:18:46 +02:00
|
|
|
irix*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
2001-04-23 02:28:08 +02:00
|
|
|
osf*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
2001-04-20 14:18:46 +02:00
|
|
|
sysv5uw7*)
|
|
|
|
# Problem when linking on SCO
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
2002-08-23 14:18:46 +02:00
|
|
|
openbsd*)
|
2002-08-18 15:07:19 +02:00
|
|
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
2001-04-06 19:37:31 +02:00
|
|
|
esac
|
2001-02-17 13:19:19 +01:00
|
|
|
|
2001-05-26 20:58:59 +02:00
|
|
|
case "$target" in
|
|
|
|
i[[4567]]86-*-*)
|
|
|
|
CFLAGS="$CFLAGS -DUNIV_INTEL_X86";;
|
|
|
|
esac
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile
|
|
|
|
buf/Makefile com/Makefile data/Makefile
|
|
|
|
dict/Makefile dyn/Makefile
|
|
|
|
eval/Makefile fil/Makefile fsp/Makefile fut/Makefile
|
2001-03-06 00:55:02 +01:00
|
|
|
ha/Makefile ibuf/Makefile include/Makefile
|
|
|
|
lock/Makefile log/Makefile
|
2001-02-17 13:19:19 +01:00
|
|
|
mach/Makefile mem/Makefile mtr/Makefile odbc/Makefile
|
|
|
|
page/Makefile pars/Makefile que/Makefile
|
|
|
|
read/Makefile rem/Makefile row/Makefile
|
|
|
|
srv/Makefile sync/Makefile thr/Makefile trx/Makefile
|
|
|
|
usr/Makefile)
|