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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
echo "*** Error: No suitable gperf found. ***"
|
|
|
|
|
echo " Please install the 'gperf' package."
|
|
|
|
|
exit 1
|
|
|
|
|
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_CYGWIN
|
|
|
|
|
AC_EXEEXT
|
|
|
|
|
AC_MINGW32
|
|
|
|
|
|
|
|
|
|
WIN32=no
|
|
|
|
|
AC_MSG_CHECKING("Checking for windows")
|
|
|
|
|
if test "$CYGWIN" = "yes" -o "$MINGW32" = "yes"
|
|
|
|
|
then
|
|
|
|
|
WIN32=yes
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_SUBST(MINGW32)
|
|
|
|
|
AC_SUBST(WIN32)
|
|
|
|
|
AC_MSG_RESULT($WIN32)
|
|
|
|
|
AC_SUBST(EXEEXT)
|
|
|
|
|
|
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-09 02:17:38 +01:00
|
|
|
AC_CHECK_HEADER(ipal.h, HAVE_IPAL=yes, HAVE_IPAL=)
|
2002-10-03 19:57:54 +02:00
|
|
|
AC_ARG_WITH(ipal,
|
|
|
|
|
[ --with-ipal enable PAL target],
|
2001-05-22 04:06:39 +02:00
|
|
|
if test "$with_ipal" = no; then
|
|
|
|
|
echo Disabling ipal support
|
|
|
|
|
HAVE_IPAL=
|
|
|
|
|
fi
|
|
|
|
|
)
|
2000-12-15 06:45:25 +01:00
|
|
|
AC_SUBST(HAVE_IPAL)
|
|
|
|
|
|
|
|
|
|
# --
|
|
|
|
|
# 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-06-16 21:00:06 +02:00
|
|
|
AC_CANONICAL_HOST
|
2000-09-30 05:20:47 +02:00
|
|
|
# $host
|
2000-01-24 01:18:20 +01:00
|
|
|
|
2000-12-15 06:45:25 +01:00
|
|
|
# The -fPIC flag is used to tell the compiler to make position
|
|
|
|
|
# independent code. It is needed when making shared objects.
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("for flag to make position independent code")
|
|
|
|
|
PICFLAG=-fPIC
|
|
|
|
|
case "${host}" in
|
|
|
|
|
|
|
|
|
|
*-*-cygwin*)
|
|
|
|
|
PICFLAG=
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*-*-hpux*)
|
|
|
|
|
PICFLAG=+z
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
AC_SUBST(PICFLAG)
|
|
|
|
|
AC_MSG_RESULT($PICFLAG)
|
|
|
|
|
|
|
|
|
|
|
2001-10-14 21:54:05 +02:00
|
|
|
# mingw needs to link with libiberty.a, cygwin can tolerate it
|
2001-05-20 17:09:39 +02:00
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("for extra libs needed")
|
|
|
|
|
EXTRALIBS=
|
|
|
|
|
case "${host}" in
|
|
|
|
|
*-*-cygwin*)
|
2001-10-14 21:54:05 +02:00
|
|
|
EXTRALIBS="-liberty"
|
2001-05-20 17:09:39 +02:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
AC_SUBST(EXTRALIBS)
|
|
|
|
|
AC_MSG_RESULT($EXTRALIBS)
|
|
|
|
|
|
2001-09-20 05:21:01 +02:00
|
|
|
# Darwin requires -no-cpp-precomp
|
|
|
|
|
case "${host}" in
|
|
|
|
|
*-*-darwin*)
|
2003-04-23 07:27:44 +02:00
|
|
|
CPPFLAGS="-no-cpp-precomp $CPPFLAGS"
|
|
|
|
|
CFLAGS="-no-cpp-precomp $CFLAGS"
|
2001-09-20 05:21:01 +02:00
|
|
|
;;
|
|
|
|
|
esac
|
2001-05-20 17:09:39 +02:00
|
|
|
|
2000-06-16 21:00:06 +02:00
|
|
|
# The -rdynamic flag is used by iverilog when compiling the target,
|
|
|
|
|
# to know how to export symbols of the main program to loadable modules
|
|
|
|
|
# that are brought in by -ldl
|
|
|
|
|
AC_MSG_CHECKING("for -rdynamic compiler flag")
|
|
|
|
|
|
|
|
|
|
rdynamic=-rdynamic
|
|
|
|
|
case "${host}" in
|
|
|
|
|
|
|
|
|
|
*-*-netbsd*)
|
|
|
|
|
rdynamic="-Wl,--export-dynamic"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*-*-solaris*)
|
|
|
|
|
rdynamic=""
|
|
|
|
|
;;
|
|
|
|
|
|
2000-09-30 05:20:47 +02:00
|
|
|
*-*-cygwin*)
|
|
|
|
|
rdynamic=""
|
|
|
|
|
;;
|
|
|
|
|
|
2000-12-15 06:45:25 +01:00
|
|
|
*-*-hpux*)
|
|
|
|
|
rdynamic="-E"
|
|
|
|
|
;;
|
2001-09-20 05:21:01 +02:00
|
|
|
|
|
|
|
|
*-*-darwin*)
|
|
|
|
|
rdynamic="-Wl,-all_load"
|
|
|
|
|
strip_dynamic="-SX"
|
|
|
|
|
;;
|
|
|
|
|
|
2000-06-16 21:00:06 +02:00
|
|
|
esac
|
2000-08-12 18:34:37 +02:00
|
|
|
AC_SUBST(rdynamic)
|
|
|
|
|
AC_MSG_RESULT($rdynamic)
|
2001-09-20 05:21:01 +02:00
|
|
|
AC_SUBST(strip_dynamic)
|
|
|
|
|
AC_MSG_RESULT($strip_dynamic)
|
2000-06-16 21:00:06 +02:00
|
|
|
|
2000-12-15 06:45:25 +01:00
|
|
|
AC_MSG_CHECKING("for shared library link flag")
|
2000-12-15 00:38:04 +01:00
|
|
|
shared=-shared
|
|
|
|
|
case "${host}" in
|
2000-12-15 06:45:25 +01:00
|
|
|
|
2000-12-15 00:38:04 +01:00
|
|
|
*-*-cygwin*)
|
2001-09-30 18:45:10 +02:00
|
|
|
shared="-shared -Wl,--enable-auto-image-base"
|
2000-12-15 00:38:04 +01:00
|
|
|
;;
|
2000-12-15 06:45:25 +01:00
|
|
|
|
|
|
|
|
*-*-hpux*)
|
|
|
|
|
shared="-b"
|
|
|
|
|
;;
|
|
|
|
|
|
2001-11-17 18:57:58 +01:00
|
|
|
*-*-darwin1.[0123])
|
|
|
|
|
shared="-bundle -undefined suppress"
|
2001-11-04 06:03:21 +01:00
|
|
|
;;
|
|
|
|
|
|
2001-09-20 05:21:01 +02:00
|
|
|
*-*-darwin*)
|
2001-11-17 18:57:58 +01:00
|
|
|
shared="-bundle -undefined suppress -flat_namespace"
|
2001-09-20 05:21:01 +02:00
|
|
|
;;
|
2000-12-15 00:38:04 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
AC_SUBST(shared)
|
|
|
|
|
AC_MSG_RESULT($shared)
|
|
|
|
|
|
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
|
|
|
|
2003-02-16 03:23:54 +01:00
|
|
|
AC_CONFIG_SUBDIRS(vvp tgt-vvp tgt-fpga libveriuser cadpli)
|
2000-12-15 00:38:04 +01:00
|
|
|
|
2002-11-13 02:50:11 +01:00
|
|
|
AC_OUTPUT(Makefile vpi/Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-verilog/Makefile tgt-pal/Makefile)
|