1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(config.h)
4 AC_CONFIG_HEADER(_pli_types.h)
7 dnl Checks for programs.
10 AC_CHECK_TOOL(STRIP, strip, true)
11 AC_CHECK_PROGS(XGPERF,gperf,none)
12 if test "$XGPERF" = "none"
15 echo "*** Warning: No suitable gperf found. ***"
16 echo " The gperf package is essential for building ivl from"
17 echo " CVS sources, or modifying the parse engine of ivl itself."
18 echo " You can get away without it when simply building from"
19 echo " snapshots or major releases."
23 AC_CHECK_PROGS(LEX,flex,none)
24 if test "$LEX" = "none"
26 echo "*** Error: No suitable flex found. ***"
27 echo " Please install the 'flex' package."
31 AC_CHECK_PROGS(YACC,bison,none)
32 if test "$YACC" = "none"
34 echo "*** Error: No suitable bison found. ***"
35 echo " Please install the 'bison' package."
42 # Combined check for Microsoft-related bogosities; sets WIN32 if found
45 # vvp32 is by default disabled
47 AC_SUBST(enable_vvp32)
52 AC_CHECK_HEADERS(getopt.h malloc.h inttypes.h libiberty.h iosfwd sys/wait.h)
54 AC_CHECK_LIB(z, gzwrite)
55 AC_CHECK_LIB(z, gzwrite, HAVE_LIBZ=yes, HAVE_LIBZ=no)
57 if test "$WIN32" = "yes"; then
58 AC_CHECK_LIB(bz2, main)
59 AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
61 AC_CHECK_LIB(bz2, BZ2_bzdopen)
62 AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
66 AC_MSG_CHECKING(for sys/times)
69 #include <sys/times.h>
70 ,{clock_t a = times(0)/sysconf(_SC_CLK_TCK);},
72 AC_DEFINE([HAVE_TIMES], [1], [The times system call is available in the host operating system.]),
75 AC_MSG_RESULT($do_times)
78 # Look for a dl library to use. First look for the standard dlopen
79 # functions, and failing that look for the HP specific shl_load function.
81 AC_CHECK_HEADERS(dlfcn.h dl.h, break)
84 AC_CHECK_LIB(dl,dlopen,[DLLIB=-ldl])
85 if test -z "$DLLIB" ; then
86 AC_CHECK_LIB(dld,shl_load,[DLLIB=-ldld])
99 # Compiler option for position independent code, needed when making shared objects.
100 # CFLAGS inherited by cadpli/Makefile?
103 # may modify CPPFLAGS and CFLAGS
106 # Linker option used when compiling the target
109 # linker options when building a shared library
112 #######################
113 ## test for underscores. The vpi module loader needs to know this
114 ## in order to know the name of the start symbol for the .vpi module.
115 #######################
117 AX_C_UNDERSCORES_LEADING
118 AX_C_UNDERSCORES_TRAILING
120 #######################
121 ## end of test for underscores
122 #######################
126 # If not otherwise specified, set the libdir64 variable
127 # to the same as libdir.
128 AC_MSG_CHECKING(for libdir64 path)
129 if test x${libdir64} = x
134 AC_MSG_RESULT(${libdir64})
136 # where to put vpi subdirectories
137 AC_MSG_CHECKING(for VPI subdirectories)
138 if test x${vpidir1} = x
145 AC_MSG_RESULT(${vpidir1} ${vpidir2})
147 # XXX disable tgt-fpga for the moment
148 AC_CONFIG_SUBDIRS(vvp vpi tgt-stub tgt-null tgt-vvp libveriuser cadpli)
150 AC_OUTPUT(Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-verilog/Makefile tgt-pal/Makefile)