qse/ase/configure.ac

199 lines
5.1 KiB
Plaintext
Raw Normal View History

2007-03-24 04:24:54 +00:00
#
2007-04-22 13:55:18 +00:00
# $Id: configure.ac,v 1.88 2007-04-22 13:51:44 bacon Exp $
2007-03-24 04:24:54 +00:00
#
2005-02-04 15:39:11 +00:00
AC_PREREQ(2.53)
2006-10-24 04:02:22 +00:00
AC_INIT([ase], [deb-0.1.0])
2007-04-22 13:55:18 +00:00
AC_REVISION([$Revision: 1.88 $])
2007-03-06 14:16:53 +00:00
AC_CONFIG_HEADER([cmn/conf_unx.h])
2007-04-06 14:34:23 +00:00
AC_CONFIG_AUX_DIR(config)
2005-01-18 15:26:29 +00:00
# Checks for programs.
AC_PROG_CC
2007-04-06 14:34:23 +00:00
#AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
2007-03-24 04:24:54 +00:00
2007-03-24 04:19:48 +00:00
# Overrides the default CFLAGS setting
if test "$ac_test_CFLAGS" = "set"
then
CFLAGS=$ac_save_CFLAGS
else
if test "$GCC" = "yes"
then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
2005-01-18 15:26:29 +00:00
2007-04-22 13:55:18 +00:00
if test "$ac_test_CXXFLAGS" = "set"
then
CXXFLAGS=$ac_save_CXXFLAGS
else
if test "$GCC" = "yes"
then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
2005-01-18 15:26:29 +00:00
# Checks for header files.
2005-01-20 15:56:42 +00:00
AC_HEADER_STDC
2006-01-30 17:25:35 +00:00
2005-01-18 15:26:29 +00:00
# Checks for typedefs, structures, and compiler characteristics.
2005-01-19 10:23:38 +00:00
AC_C_BIGENDIAN(
2006-10-26 09:31:28 +00:00
[AC_DEFINE([ASE_ENDIAN_BIG],[],[Big Endian])],
[AC_DEFINE([ASE_ENDIAN_LITTLE],[],[Little Endian])],
[AC_DEFINE([ASE_ENDIAN_UNKNOWN],[],[Unknown Endian])])
2005-01-18 15:26:29 +00:00
2005-02-13 11:27:35 +00:00
# Checks for data types
2006-10-26 09:31:28 +00:00
AC_CHECK_TYPE(long long, [AC_DEFINE([ASE_HAVE_LONG_LONG],[],[long long])])
AC_CHECK_TYPE(long double, [AC_DEFINE([ASE_HAVE_LONG_DOUBLE],[],[long double])])
2005-02-13 11:27:35 +00:00
2005-02-13 14:22:22 +00:00
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
2005-02-13 16:04:56 +00:00
AC_CHECK_SIZEOF(__int8)
AC_CHECK_SIZEOF(__int16)
AC_CHECK_SIZEOF(__int32)
2005-02-13 14:48:02 +00:00
AC_CHECK_SIZEOF(__int64)
2006-04-14 14:17:09 +00:00
AC_CHECK_SIZEOF(__int96)
2005-02-14 03:13:32 +00:00
AC_CHECK_SIZEOF(__int128)
AC_CHECK_SIZEOF(void *)
2005-02-13 14:48:02 +00:00
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(long double)
2006-05-06 16:05:12 +00:00
AC_CHECK_SIZEOF(wchar_t)
2006-04-14 14:17:09 +00:00
2006-10-26 09:31:28 +00:00
AC_DEFINE_UNQUOTED(ASE_SIZEOF_CHAR,${ac_cv_sizeof_char})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_SHORT,${ac_cv_sizeof_short})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_INT,${ac_cv_sizeof_int})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_LONG,${ac_cv_sizeof_long})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_LONG_LONG,${ac_cv_sizeof_long_long})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT8,${ac_cv_sizeof___int8})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT16,${ac_cv_sizeof___int16})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT32,${ac_cv_sizeof___int32})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT64,${ac_cv_sizeof___int64})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT96,${ac_cv_sizeof___int96})
AC_DEFINE_UNQUOTED(ASE_SIZEOF___INT128,${ac_cv_sizeof___int128})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_VOID_P,${ac_cv_sizeof_void_p})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_FLOAT,${ac_cv_sizeof_float})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_DOUBLE,${ac_cv_sizeof_double})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_LONG_DOUBLE,${ac_cv_sizeof_long_double})
AC_DEFINE_UNQUOTED(ASE_SIZEOF_WCHAR_T,${ac_cv_sizeof_wchar_t})
2007-03-24 04:19:48 +00:00
# Defines extra options
2005-08-11 07:36:33 +00:00
AC_ARG_ENABLE([wchar], [AC_HELP_STRING([--enable-wchar],
[use wchar_t a default charater type when enabled (default. yes)])],
enable_wchar_is=$enableval,enable_wchar_is=yes)
if test "$enable_wchar_is" = "yes"
2005-04-18 04:44:09 +00:00
then
2006-10-26 09:31:28 +00:00
AC_DEFINE([ASE_CHAR_IS_WCHAR],[],[char is wchar])
2005-04-18 04:44:09 +00:00
else
2006-10-26 09:31:28 +00:00
AC_DEFINE([ASE_CHAR_IS_MCHAR],[],[char is mchar])
2005-04-18 04:44:09 +00:00
fi
2005-01-19 11:21:55 +00:00
2007-03-24 04:19:48 +00:00
AC_ARG_ENABLE([mode], [AC_HELP_STRING([--enable-debug],
[build the library in the debug mode (default. no)])],
enable_debug_is=$enableval,enable_debug_is=no)
if test "$enable_debug_is" = "yes"
then
[CFLAGS="$CFLAGS -g -D_DEBUG -UNDEBUG"]
2007-04-22 13:55:18 +00:00
[CXXFLAGS="$CXXFLAGS -g -D_DEBUG -UNDEBUG"]
2007-03-24 04:19:48 +00:00
AC_SUBST(BUILDMODE, "debug")
else
[CFLAGS="$CFLAGS -DNDEBUG -U_DEBUG"]
2007-04-22 13:55:18 +00:00
[CXXFLAGS="$CXXFLAGS -DNDEBUG -U_DEBUG"]
2007-03-24 04:19:48 +00:00
AC_SUBST(BUILDMODE, "release")
fi
# Configure makefiles
2005-08-11 07:36:33 +00:00
AC_ARG_ENABLE([reentrant], [AC_HELP_STRING([--enable-reentrant],
[define _REENTRANT (default. yes)])],
enable_reentrant_is=$enableval,enable_reentrant_is=yes)
if test "$enable_reentrant_is" = "yes"
2005-08-07 13:38:41 +00:00
then
[CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"]
2007-04-22 13:55:18 +00:00
[CXXFLAGS="$CXXFLAGS -D_REENTRANT -D_THREAD_SAFE"]
2005-08-07 13:38:41 +00:00
fi
2007-04-05 10:14:36 +00:00
# Java & JNI Configuration
AC_PATH_PROG(JAVAC_PATH, javac, :)
2007-04-05 10:37:59 +00:00
AC_PATH_PROG(JAR_PATH, jar, :)
2007-04-04 14:45:52 +00:00
2007-04-05 10:14:36 +00:00
if test "$JAVAC_PATH" != ":"
then
CUR_JAVAC_PATH="$JAVAC_PATH"
while ls -ld "$CUR_JAVAC_PATH" 2>/dev/null | grep " -> " >/dev/null
do
AC_MSG_CHECKING(symlink for $CUR_JAVAC_PATH)
REAL_JAVAC_PATH=`ls -ld "$CUR_JAVAC_PATH" | sed 's/.* -> //'`
case "$REAL_JAVAC_PATH" in
/*) CUR_JAVAC_PATH="$REAL_JAVAC_PATH";;
*) CUR_JAVAC_PATH=`echo "X$CUR_JAVAC_PATH" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$REAL_JAVAC_PATH";;
esac
AC_MSG_RESULT($CUR_JAVAC_PATH)
done
JAVA_DIR="$CUR_JAVAC_PATH"
while true
do
JAVA_DIR=`echo "$JAVA_DIR" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
if test "$JAVA_DIR" = ""
then
break
fi
AC_MSG_CHECKING($JAVA_DIR/include/jni.h)
if test -f "$JAVA_DIR/include/jni.h"
then
AC_MSG_RESULT(yes)
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_DIR/include"
break;
else
AC_MSG_RESULT(no)
fi
done
for i in $JNI_INCLUDE_DIRS
do
JNI_MD_H=`find "$i" -name jni_md.h -print`
if test "$JNI_MD_H" != ""
then
tmp=`echo "$JNI_MD_H" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
JNI_MD_INCLUDE_DIRS="$JNI_MD_INCLUDE_DIRS $tmp"
fi
done
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JNI_MD_INCLUDE_DIRS"
for i in $JNI_INCLUDE_DIRS
do
CFLAGS_JNI="$CFLAGS_JNI -I$i"
done
JNI="jni"
2007-04-04 14:45:52 +00:00
else
2007-04-05 10:14:36 +00:00
JAVAC_PATH=""
CFLAGS_JNI=""
JNI=""
2007-04-04 14:45:52 +00:00
fi
2007-04-05 10:14:36 +00:00
AC_SUBST(CFLAGS_JNI, $CFLAGS_JNI)
AC_SUBST(JAVAC, $JAVAC_PATH)
2007-04-05 10:37:59 +00:00
AC_SUBST(JAR, $JAR_PATH)
2007-04-05 10:14:36 +00:00
AC_SUBST(JNI, $JNI)
2007-04-04 14:45:52 +00:00
2007-02-23 06:43:30 +00:00
AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile])
2005-01-18 15:26:29 +00:00
AC_OUTPUT