1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(vpi_config.h.in)
3 AC_CONFIG_HEADER(vpi_config.h)
6 dnl Checks for programs.
9 AC_CHECK_TOOL(STRIP, strip, true)
10 AC_CHECK_PROGS(LEX,flex,none)
11 if test "$LEX" = "none"
13 echo "*** Error: No suitable flex found. ***"
14 echo " Please install the 'flex' package."
18 AC_CHECK_PROGS(YACC,bison,none)
19 if test "$YACC" = "none"
21 echo "*** Error: No suitable bison found. ***"
22 echo " Please install the 'bison' package."
29 # Combined check for Microsoft-related bogosities; sets WIN32 if found
34 # vvp32 is by default disabled
36 AC_SUBST(enable_vvp32)
39 AC_CHECK_HEADERS(malloc.h inttypes.h)
41 AC_CHECK_LIB(z, gzwrite)
42 AC_CHECK_LIB(z, gzwrite, HAVE_LIBZ=yes, HAVE_LIBZ=no)
44 if test "$WIN32" = "yes"; then
45 AC_CHECK_LIB(bz2, main)
46 AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
48 AC_CHECK_LIB(bz2, BZ2_bzdopen)
49 AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
54 # Look for a dl library to use. First look for the standard dlopen
55 # functions, and failing that look for the HP specific shl_load function.
57 AC_CHECK_HEADERS(dlfcn.h dl.h, break)
60 AC_CHECK_LIB(dl,dlopen,[DLLIB=-ldl])
61 if test -z "$DLLIB" ; then
62 AC_CHECK_LIB(dld,shl_load,[DLLIB=-ldld])
71 # may modify CPPFLAGS and CFLAGS
74 # Do some more operating system specific setup. We put the file64_support
75 # define in a substitution instead of simply a define because there
76 # are source files (namely lxt support files) that don't include any
77 # config.h header file.
81 AC_DEFINE([_LARGEFILE_SOURCE], [1], [Indicates LFS (i.e. the ability to create files larger than 2 GiB on 32-bit operating systems).])
82 file64_support='-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64'
85 AC_SUBST(file64_support)
89 # Compiler option for position independent code, needed when making shared objects.
94 # Linker option used when compiling the target
97 # linker options when building a shared library
102 # If not otherwise specified, set the libdir64 variable
103 # to the same as libdir.
104 AC_MSG_CHECKING(for libdir64 path)
105 if test x${libdir64} = x
110 AC_MSG_RESULT(${libdir64})
112 # where to put vpi subdirectories
113 AC_MSG_CHECKING(for VPI subdirectories)
114 if test x${vpidir1} = x
121 AC_MSG_RESULT(${vpidir1} ${vpidir2})