130 lines
3.1 KiB
Plaintext
130 lines
3.1 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(netlist.h)
|
|
AC_CONFIG_HEADER(config.h)
|
|
AC_CONFIG_HEADER(_pli_types.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_CXX
|
|
AC_CHECK_TOOL(STRIP, strip, true)
|
|
AC_CHECK_PROGS(XGPERF,gperf,none)
|
|
AC_CHECK_PROGS(MAN,man,none)
|
|
AC_CHECK_PROGS(PS2PDF,ps2pdf,none)
|
|
AC_CHECK_PROGS(GIT,git,none)
|
|
if test "$XGPERF" = "none"
|
|
then
|
|
echo ""
|
|
echo "*** Warning: No suitable gperf found. ***"
|
|
echo " The gperf package is essential for building ivl from"
|
|
echo " CVS sources, or modifying the parse engine of ivl itself."
|
|
echo " You can get away without it when simply building from"
|
|
echo " snapshots or major releases."
|
|
echo ""
|
|
fi
|
|
|
|
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
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
AC_CHECK_HEADERS(getopt.h malloc.h inttypes.h libiberty.h iosfwd sys/wait.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)
|
|
|
|
AC_MSG_CHECKING(for sys/times)
|
|
AC_TRY_LINK(
|
|
#include <unistd.h>
|
|
#include <sys/times.h>
|
|
,{clock_t a = times(0)/sysconf(_SC_CLK_TCK);},
|
|
do_times=yes
|
|
AC_DEFINE([HAVE_TIMES], [1], [The times system call is available in the host operating system.]),
|
|
do_times=no
|
|
)
|
|
AC_MSG_RESULT($do_times)
|
|
|
|
# --
|
|
# Look for a dl library to use. First look for the standard dlopen
|
|
# functions, and failing that look for the HP specific shl_load function.
|
|
|
|
AC_CHECK_HEADERS(dlfcn.h dl.h, break)
|
|
|
|
DLLIB=''
|
|
AC_CHECK_LIB(dl,dlopen,[DLLIB=-ldl])
|
|
if test -z "$DLLIB" ; then
|
|
AC_CHECK_LIB(dld,shl_load,[DLLIB=-ldld])
|
|
fi
|
|
AC_SUBST(DLLIB)
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_LANG_C
|
|
AC_C_BIGENDIAN
|
|
|
|
# $host
|
|
|
|
AX_ENABLE_SUFFIX
|
|
|
|
AX_LD_EXTRALIBS
|
|
|
|
# Compiler option for position independent code, needed when making shared objects.
|
|
# CFLAGS inherited by cadpli/Makefile?
|
|
AX_C_PICFLAG
|
|
|
|
# may modify CPPFLAGS and CFLAGS
|
|
AX_CPP_PRECOMP
|
|
|
|
# Linker option used when compiling the target
|
|
AX_LD_RDYNAMIC
|
|
|
|
# linker options when building a shared library
|
|
AX_LD_SHAREDLIB_OPTS
|
|
|
|
#######################
|
|
## test for underscores. The vpi module loader needs to know this
|
|
## in order to know the name of the start symbol for the .vpi module.
|
|
#######################
|
|
|
|
AX_C_UNDERSCORES_LEADING
|
|
AX_C_UNDERSCORES_TRAILING
|
|
|
|
#######################
|
|
## end of test for underscores
|
|
#######################
|
|
|
|
AX_CPP_IDENT
|
|
|
|
# XXX disable tgt-fpga for the moment
|
|
AC_CONFIG_SUBDIRS(vvp vpi tgt-stub tgt-null tgt-vvp tgt-vhdl libveriuser cadpli)
|
|
|
|
AC_OUTPUT(Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-verilog/Makefile tgt-pal/Makefile)
|