2004-01-21 02:22:51 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
AC_INIT(vpi_config.h.in)
|
|
|
|
|
AC_CONFIG_HEADER(vpi_config.h)
|
|
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
AC_CANONICAL_HOST
|
2004-01-21 02:22:51 +01:00
|
|
|
dnl Checks for programs.
|
|
|
|
|
AC_PROG_CC
|
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
AC_CHECK_TOOL(STRIP, strip, true)
|
|
|
|
|
AC_CHECK_PROGS(LEX,flex,none)
|
|
|
|
|
if test "$LEX" = "none"
|
|
|
|
|
then
|
|
|
|
|
echo "*** Error: No suitable flex found. ***"
|
|
|
|
|
echo " Please install the 'flex' package."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2007-11-19 02:36:03 +01:00
|
|
|
AC_CHECK_PROGS(YACC,bison,none)
|
|
|
|
|
if test "$YACC" = "none"
|
|
|
|
|
then
|
|
|
|
|
echo "*** Error: No suitable bison found. ***"
|
|
|
|
|
echo " Please install the 'bison' package."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2004-01-21 02:22:51 +01:00
|
|
|
AC_EXEEXT
|
|
|
|
|
AC_SUBST(EXEEXT)
|
|
|
|
|
|
2004-02-15 04:17:36 +01:00
|
|
|
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
|
|
|
|
AX_WIN32
|
|
|
|
|
|
2004-01-21 02:22:51 +01:00
|
|
|
AX_CPP_IDENT
|
|
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(malloc.h inttypes.h)
|
|
|
|
|
|
|
|
|
|
AC_CHECK_LIB(z, gzwrite)
|
|
|
|
|
AC_CHECK_LIB(z, gzwrite, HAVE_LIBZ=yes, HAVE_LIBZ=no)
|
|
|
|
|
AC_SUBST(HAVE_LIBZ)
|
|
|
|
|
if test "$WIN32" = "yes"; then
|
|
|
|
|
AC_CHECK_LIB(bz2, main)
|
2007-09-16 20:23:19 +02:00
|
|
|
AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
|
2004-01-21 02:22:51 +01:00
|
|
|
else
|
|
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzdopen)
|
2007-09-16 20:23:19 +02:00
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
|
2004-01-21 02:22:51 +01:00
|
|
|
fi
|
2007-09-16 20:23:19 +02:00
|
|
|
AC_SUBST(HAVE_LIBBZ2)
|
2004-01-21 02:22:51 +01:00
|
|
|
|
2008-04-30 06:20:39 +02:00
|
|
|
# fmin and fmax are needed by va_math.vpi
|
2008-05-09 18:55:41 +02:00
|
|
|
AC_CHECK_FUNCS(fmin fmax)
|
2004-01-21 02:22:51 +01:00
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
|
|
AC_LANG_C
|
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# may modify CPPFLAGS and CFLAGS
|
|
|
|
|
AX_CPP_PRECOMP
|
|
|
|
|
|
|
|
|
|
# Do some more operating system specific setup. We put the file64_support
|
2004-01-26 22:52:46 +01:00
|
|
|
# define in a substitution instead of simply a define because there
|
|
|
|
|
# are source files (namely lxt support files) that don't include any
|
|
|
|
|
# config.h header file.
|
|
|
|
|
file64_support=''
|
2004-01-21 02:22:51 +01:00
|
|
|
case "${host}" in
|
|
|
|
|
*-*-linux*)
|
2007-05-17 01:59:12 +02:00
|
|
|
AC_DEFINE([_LARGEFILE_SOURCE], [1], [Indicates LFS (i.e. the ability to create files larger than 2 GiB on 32-bit operating systems).])
|
2004-01-26 22:52:46 +01:00
|
|
|
file64_support='-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64'
|
2004-01-21 02:22:51 +01:00
|
|
|
;;
|
|
|
|
|
esac
|
2004-01-26 22:52:46 +01:00
|
|
|
AC_SUBST(file64_support)
|
2004-01-21 02:22:51 +01:00
|
|
|
|
|
|
|
|
# $host
|
|
|
|
|
|
2007-02-26 20:49:48 +01:00
|
|
|
# Compiler option for position independent code, needed when making shared objects.
|
2004-09-28 00:34:10 +02:00
|
|
|
AX_C_PICFLAG
|
2004-01-21 02:22:51 +01:00
|
|
|
|
2004-03-11 07:06:59 +01:00
|
|
|
AX_LD_EXTRALIBS
|
2004-01-21 02:22:51 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# Linker option used when compiling the target
|
|
|
|
|
AX_LD_RDYNAMIC
|
2004-01-21 02:22:51 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# linker options when building a shared library
|
|
|
|
|
AX_LD_SHAREDLIB_OPTS
|
2004-01-21 02:22:51 +01:00
|
|
|
|
|
|
|
|
AX_CPP_IDENT
|
|
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile)
|