88 lines
2.0 KiB
Plaintext
88 lines
2.0 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(vpi_config.h.in)
|
|
AC_CONFIG_HEADER(vpi_config.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
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
|
|
|
|
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
|
|
|
|
AC_EXEEXT
|
|
AC_SUBST(EXEEXT)
|
|
|
|
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
|
AX_WIN32
|
|
|
|
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)
|
|
AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
|
|
else
|
|
AC_CHECK_LIB(bz2, BZ2_bzdopen)
|
|
AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
|
|
fi
|
|
AC_SUBST(HAVE_LIBBZ2)
|
|
|
|
# fmin and fmax are needed by va_math.vpi
|
|
AC_CHECK_FUNCS(fmin fmax)
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_LANG_C
|
|
AC_C_BIGENDIAN
|
|
|
|
# may modify CPPFLAGS and CFLAGS
|
|
AX_CPP_PRECOMP
|
|
|
|
# Do some more operating system specific setup. We put the file64_support
|
|
# 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=''
|
|
case "${host}" in
|
|
*-*-linux*)
|
|
AC_DEFINE([_LARGEFILE_SOURCE], [1], [Indicates LFS (i.e. the ability to create files larger than 2 GiB on 32-bit operating systems).])
|
|
file64_support='-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64'
|
|
;;
|
|
esac
|
|
AC_SUBST(file64_support)
|
|
|
|
# $host
|
|
|
|
# Compiler option for position independent code, needed when making shared objects.
|
|
AX_C_PICFLAG
|
|
|
|
AX_LD_EXTRALIBS
|
|
|
|
# Linker option used when compiling the target
|
|
AX_LD_RDYNAMIC
|
|
|
|
# linker options when building a shared library
|
|
AX_LD_SHAREDLIB_OPTS
|
|
|
|
AX_CPP_IDENT
|
|
|
|
AC_OUTPUT(Makefile)
|