1999-04-25 23:54:33 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
AC_INIT(netlist.h)
|
2001-07-25 05:10:48 +02:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
2003-09-30 03:33:13 +02:00
|
|
|
AC_CONFIG_HEADER(_pli_types.h)
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
AC_CANONICAL_HOST
|
1999-04-25 23:54:33 +02:00
|
|
|
dnl Checks for programs.
|
1999-07-03 22:50:28 +02:00
|
|
|
AC_PROG_CC
|
1999-04-25 23:54:33 +02:00
|
|
|
AC_PROG_CXX
|
1999-10-23 18:55:51 +02:00
|
|
|
AC_CHECK_TOOL(STRIP, strip, true)
|
2001-04-26 18:12:29 +02:00
|
|
|
AC_CHECK_PROGS(XGPERF,gperf,none)
|
|
|
|
|
if test "$XGPERF" = "none"
|
|
|
|
|
then
|
2004-01-19 00:34:00 +01:00
|
|
|
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 ""
|
2001-04-26 18:12:29 +02:00
|
|
|
fi
|
2001-01-16 03:44:17 +01:00
|
|
|
|
2001-12-30 18:20:33 +01:00
|
|
|
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
|
|
|
|
|
|
2003-03-08 21:58:55 +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
|
|
|
|
|
|
2003-10-09 01:17:39 +02:00
|
|
|
# vvp32 is by default disabled
|
|
|
|
|
#enable_vvp32=no
|
|
|
|
|
AC_SUBST(enable_vvp32)
|
|
|
|
|
|
2003-03-08 21:58:55 +01:00
|
|
|
|
2001-01-16 03:44:17 +01:00
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
|
2003-10-02 23:30:40 +02:00
|
|
|
AC_CHECK_HEADERS(getopt.h malloc.h inttypes.h libiberty.h iosfwd sys/wait.h)
|
2001-01-16 03:44:17 +01:00
|
|
|
|
2003-02-20 01:49:24 +01:00
|
|
|
AC_CHECK_LIB(z, gzwrite)
|
2003-09-13 03:28:47 +02:00
|
|
|
AC_CHECK_LIB(z, gzwrite, HAVE_LIBZ=yes, HAVE_LIBZ=no)
|
|
|
|
|
AC_SUBST(HAVE_LIBZ)
|
2003-03-08 21:58:55 +01:00
|
|
|
if test "$WIN32" = "yes"; then
|
|
|
|
|
AC_CHECK_LIB(bz2, main)
|
|
|
|
|
else
|
2003-02-20 01:49:24 +01:00
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzdopen)
|
2003-03-08 21:58:55 +01:00
|
|
|
fi
|
2003-02-20 01:49:24 +01:00
|
|
|
|
2001-07-03 06:09:24 +02:00
|
|
|
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),
|
|
|
|
|
do_times=no
|
|
|
|
|
)
|
|
|
|
|
AC_MSG_RESULT($do_times)
|
|
|
|
|
|
2000-12-15 06:45:25 +01:00
|
|
|
# --
|
|
|
|
|
# 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
|
2000-01-24 01:18:20 +01:00
|
|
|
AC_SUBST(DLLIB)
|
2000-12-15 06:45:25 +01:00
|
|
|
|
2001-01-16 03:44:17 +01:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
2001-01-23 20:52:03 +01:00
|
|
|
AC_LANG_C
|
2003-03-07 03:44:33 +01:00
|
|
|
AC_C_BIGENDIAN
|
2001-01-23 20:52:03 +01:00
|
|
|
|
2000-09-30 05:20:47 +02:00
|
|
|
# $host
|
2000-01-24 01:18:20 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
AX_LD_EXTRALIBS
|
2000-12-15 06:45:25 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# Compiler option for position independent code, needed whan making shared objects.
|
|
|
|
|
# CFLAGS inherited by cadpli/Makefile?
|
|
|
|
|
AX_C_PICFLAG
|
2004-10-04 03:10:51 +02:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# may modify CPPFLAGS and CFLAGS
|
|
|
|
|
AX_CPP_PRECOMP
|
2000-12-15 06:45:25 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# Linker option used when compiling the target
|
|
|
|
|
AX_LD_RDYNAMIC
|
2000-12-15 06:45:25 +01:00
|
|
|
|
2004-09-28 00:34:10 +02:00
|
|
|
# linker options when building a shared library
|
|
|
|
|
AX_LD_SHAREDLIB_OPTS
|
2000-12-15 00:38:04 +01:00
|
|
|
|
2002-10-03 20:03:35 +02:00
|
|
|
#######################
|
|
|
|
|
## 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.
|
|
|
|
|
#######################
|
|
|
|
|
|
2003-11-08 20:27:50 +01:00
|
|
|
AX_C_UNDERSCORES_LEADING
|
|
|
|
|
AX_C_UNDERSCORES_TRAILING
|
2002-10-03 20:03:35 +02:00
|
|
|
|
|
|
|
|
#######################
|
|
|
|
|
## end of test for underscores
|
|
|
|
|
#######################
|
2000-12-15 00:38:04 +01:00
|
|
|
|
2003-11-08 20:27:50 +01:00
|
|
|
AX_CPP_IDENT
|
2002-08-12 02:27:10 +02:00
|
|
|
|
2003-10-13 22:57:34 +02:00
|
|
|
# If not otherwise specified, set the libdir64 variable
|
|
|
|
|
# to the same as libdir.
|
|
|
|
|
AC_MSG_CHECKING(for libdir64 path)
|
|
|
|
|
if test x${libdir64} = x
|
|
|
|
|
then
|
|
|
|
|
libdir64="${libdir}"
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(libdir64)
|
|
|
|
|
AC_MSG_RESULT(${libdir64})
|
|
|
|
|
|
2003-10-02 23:30:40 +02:00
|
|
|
# where to put vpi subdirectories
|
|
|
|
|
AC_MSG_CHECKING(for VPI subdirectories)
|
|
|
|
|
if test x${vpidir1} = x
|
|
|
|
|
then
|
|
|
|
|
vpidir1="."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_SUBST(vpidir1)
|
|
|
|
|
AC_SUBST(vpidir2)
|
|
|
|
|
AC_MSG_RESULT(${vpidir1} ${vpidir2})
|
2002-08-12 02:27:10 +02:00
|
|
|
|
2005-07-15 01:34:18 +02:00
|
|
|
# XXX disable tgt-fpga for the moment
|
2006-02-15 19:42:42 +01:00
|
|
|
AC_CONFIG_SUBDIRS(vvp vpi tgt-stub tgt-null tgt-vvp libveriuser cadpli)
|
2000-12-15 00:38:04 +01:00
|
|
|
|
2006-02-15 19:42:42 +01:00
|
|
|
AC_OUTPUT(Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-verilog/Makefile tgt-pal/Makefile)
|