Give the vip directory its own configure and vpi_config.h

This commit is contained in:
steve 2004-01-21 01:22:51 +00:00
parent d98720af4d
commit 4987970af4
20 changed files with 327 additions and 31 deletions

View File

@ -9,7 +9,7 @@
echo "Autoconf in root..."
autoconf
for dir in vpip vvp tgt-vvp tgt-fpga libveriuser cadpli
for dir in vpip vpi vvp tgt-vvp tgt-fpga libveriuser cadpli
do
echo "Autoconf in $dir..."
( cd ./$dir ; autoconf --include=.. )

View File

@ -245,6 +245,6 @@ AC_SUBST(vpidir1)
AC_SUBST(vpidir2)
AC_MSG_RESULT(${vpidir1} ${vpidir2})
AC_CONFIG_SUBDIRS(vvp tgt-vvp tgt-fpga libveriuser cadpli)
AC_CONFIG_SUBDIRS(vpi vvp tgt-vvp tgt-fpga libveriuser cadpli)
AC_OUTPUT(Makefile vpi/Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-verilog/Makefile tgt-pal/Makefile)
AC_OUTPUT(Makefile ivlpp/Makefile driver/Makefile driver-vpi/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-verilog/Makefile tgt-pal/Makefile)

View File

@ -1,3 +1,8 @@
configure
config.status
config.log
autom4te.cache
vpi_config.h
Makefile
sys_readmem_lex.c
system.vpi

207
vpi/configure.in Normal file
View File

@ -0,0 +1,207 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(vpi_config.h.in)
AC_CONFIG_HEADER(vpi_config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_CHECK_TOOL(STRIP, strip, true)
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_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)
AX_CPP_IDENT
# vvp32 is by default disabled
#enable_vvp32=no
AC_SUBST(enable_vvp32)
AC_CHECK_HEADERS(malloc.h inttypes.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)
else
AC_CHECK_LIB(bz2, BZ2_bzdopen)
fi
# --
# 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
AC_CANONICAL_HOST
# Do some operating system specific setup.
case "${host}" in
*-*-darwin*)
CPPFLAGS="-no-cpp-precomp $CPPFLAGS"
CFLAGS="-no-cpp-precomp $CFLAGS"
;;
*-*-linux*)
AC_DEFINE(_LARGEFILE_SOURCE)
AC_DEFINE(_LARGEFILE64_SOURCE)
;;
esac
# $host
# 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)
# mingw needs to link with libiberty.a, cygwin can tolerate it
AC_MSG_CHECKING("for extra libs needed")
EXTRALIBS=
case "${host}" in
*-*-cygwin*)
EXTRALIBS="-liberty"
;;
esac
AC_SUBST(EXTRALIBS)
AC_MSG_RESULT($EXTRALIBS)
# Darwin requires -no-cpp-precomp
case "${host}" in
*-*-darwin*)
CPPFLAGS="-no-cpp-precomp $CPPFLAGS"
CFLAGS="-no-cpp-precomp $CFLAGS"
;;
esac
# 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=""
;;
*-*-cygwin*)
rdynamic=""
;;
*-*-hpux*)
rdynamic="-E"
;;
*-*-darwin*)
rdynamic="-Wl,-all_load"
strip_dynamic="-SX"
;;
esac
AC_SUBST(rdynamic)
AC_MSG_RESULT($rdynamic)
AC_SUBST(strip_dynamic)
AC_MSG_RESULT($strip_dynamic)
AC_MSG_CHECKING("for shared library link flag")
shared=-shared
case "${host}" in
*-*-cygwin*)
shared="-shared -Wl,--enable-auto-image-base"
;;
*-*-hpux*)
shared="-b"
;;
*-*-darwin1.[0123])
shared="-bundle -undefined suppress"
;;
*-*-darwin*)
shared="-bundle -undefined suppress -flat_namespace"
;;
esac
AC_SUBST(shared)
AC_MSG_RESULT($shared)
AX_CPP_IDENT
# 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})
# 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})
AC_OUTPUT(Makefile)

View File

@ -17,9 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: stringheap.c,v 1.2 2003/04/28 01:03:11 steve Exp $"
#ident "$Id: stringheap.c,v 1.3 2004/01/21 01:22:53 steve Exp $"
#endif
# include "sys_priv.h"
# include "stringheap.h"
# include <string.h>
# include <stdlib.h>
@ -64,6 +65,9 @@ const char*strdup_sh(struct stringheap_s*hp, const char*txt)
/*
* $Log: stringheap.c,v $
* Revision 1.3 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.2 2003/04/28 01:03:11 steve
* Fix stringheap list management failure.
*

View File

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_convert.c,v 1.3 2003/03/17 21:59:54 steve Exp $"
#ident "$Id: sys_convert.c,v 1.4 2004/01/21 01:22:53 steve Exp $"
#endif
# include "vpi_config.h"
# include "vpi_user.h"
# include "config.h"
# include <stdio.h>
# include <string.h>
# include <math.h>
@ -281,6 +281,9 @@ void sys_convert_register()
/*
* $Log: sys_convert.c,v $
* Revision 1.4 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.3 2003/03/17 21:59:54 steve
* Implement $itor and $bitstoreal
*

View File

@ -18,10 +18,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_deposit.c,v 1.3 2002/08/12 01:35:04 steve Exp $"
#ident "$Id: sys_deposit.c,v 1.4 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <assert.h>
@ -79,6 +79,9 @@ void sys_deposit_register()
/*
* $Log: sys_deposit.c,v $
* Revision 1.4 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.3 2002/08/12 01:35:04 steve
* conditional ident string using autoconfig.
*

View File

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_display.c,v 1.67 2003/12/19 01:27:10 steve Exp $"
#ident "$Id: sys_display.c,v 1.68 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <assert.h>
@ -1580,6 +1580,9 @@ void sys_display_register()
/*
* $Log: sys_display.c,v $
* Revision 1.68 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.67 2003/12/19 01:27:10 steve
* Fix various unsigned compare warnings.
*

View File

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_finish.c,v 1.8 2003/02/21 03:24:03 steve Exp $"
#ident "$Id: sys_finish.c,v 1.9 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <string.h>
@ -59,6 +59,9 @@ void sys_finish_register()
/*
* $Log: sys_finish.c,v $
* Revision 1.9 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.8 2003/02/21 03:24:03 steve
* Make the $stop system task really vpiStop.
*

View File

@ -17,10 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_lxt.c,v 1.23 2003/09/30 01:33:39 steve Exp $"
#ident "$Id: sys_lxt.c,v 1.24 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "sys_priv.h"
# include "lxt_write.h"
# include "vcd_priv.h"
@ -804,6 +803,9 @@ void sys_lxt_register()
/*
* $Log: sys_lxt.c,v $
* Revision 1.24 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.23 2003/09/30 01:33:39 steve
* dumpers must be aware of 64bit time.
*

View File

@ -17,10 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_lxt2.c,v 1.4 2003/09/30 01:33:39 steve Exp $"
#ident "$Id: sys_lxt2.c,v 1.5 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "sys_priv.h"
# include "lxt2_write.h"
# include "vcd_priv.h"
@ -816,6 +815,9 @@ void sys_lxt2_register()
/*
* $Log: sys_lxt2.c,v $
* Revision 1.5 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.4 2003/09/30 01:33:39 steve
* dumpers must be aware of 64bit time.
*

View File

@ -19,9 +19,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_priv.h,v 1.4 2003/10/30 03:43:20 steve Exp $"
#ident "$Id: sys_priv.h,v 1.5 2004/01/21 01:22:53 steve Exp $"
#endif
# include "vpi_config.h"
# include "vpi_user.h"
/*
@ -48,6 +49,9 @@ extern PLI_UINT64 timerec_to_time64(const struct t_vpi_time*time);
/*
* $Log: sys_priv.h,v $
* Revision 1.5 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.4 2003/10/30 03:43:20 steve
* Rearrange fileio functions, and add ungetc.
*

View File

@ -17,10 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_random.c,v 1.8 2003/11/10 20:15:33 steve Exp $"
#ident "$Id: sys_random.c,v 1.9 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "sys_priv.h"
# include <vpi_user.h>
@ -203,6 +202,9 @@ void sys_random_register()
/*
* $Log: sys_random.c,v $
* Revision 1.9 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.8 2003/11/10 20:15:33 steve
* Simply MSVC compatibility patch.
*

View File

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_readmem.c,v 1.14 2003/12/19 01:27:10 steve Exp $"
#ident "$Id: sys_readmem.c,v 1.15 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <string.h>
@ -576,6 +576,9 @@ void sys_readmem_register()
/*
* $Log: sys_readmem.c,v $
* Revision 1.15 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.14 2003/12/19 01:27:10 steve
* Fix various unsigned compare warnings.
*

View File

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_table.c,v 1.23 2003/10/30 04:52:54 steve Exp $"
#ident "$Id: sys_table.c,v 1.24 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <stdio.h>
# include <stdlib.h>
@ -156,6 +156,9 @@ void (*vlog_startup_routines[])() = {
/*
* $Log: sys_table.c,v $
* Revision 1.24 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.23 2003/10/30 04:52:54 steve
* Call register for fileio functions.
*

View File

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_time.c,v 1.9 2003/06/18 00:54:28 steve Exp $"
#ident "$Id: sys_time.c,v 1.10 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "vpi_config.h"
# include "vpi_user.h"
# include <string.h>
@ -169,6 +169,9 @@ void sys_time_register()
/*
* $Log: sys_time.c,v $
* Revision 1.10 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.9 2003/06/18 00:54:28 steve
* Account for all 64 bits in results of $time.
*

View File

@ -17,10 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_vcd.c,v 1.52 2003/12/19 01:27:10 steve Exp $"
#ident "$Id: sys_vcd.c,v 1.53 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "sys_priv.h"
/*
@ -811,6 +810,9 @@ void sys_vcd_register()
/*
* $Log: sys_vcd.c,v $
* Revision 1.53 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.52 2003/12/19 01:27:10 steve
* Fix various unsigned compare warnings.
*

View File

@ -17,10 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_vcdoff.c,v 1.1 2003/03/06 20:04:42 steve Exp $"
#ident "$Id: sys_vcdoff.c,v 1.2 2004/01/21 01:22:53 steve Exp $"
#endif
# include "config.h"
# include "sys_priv.h"
/*
@ -172,6 +171,9 @@ void sys_vcdoff_register()
/*
* $Log: sys_vcdoff.c,v $
* Revision 1.2 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.1 2003/03/06 20:04:42 steve
* Add means to suppress wveform output
*

View File

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: vcd_priv.c,v 1.4 2003/11/10 20:18:02 steve Exp $"
#ident "$Id: vcd_priv.c,v 1.5 2004/01/21 01:22:53 steve Exp $"
#endif
# include "vpi_config.h"
# include "vcd_priv.h"
# include "config.h"
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
@ -170,6 +170,9 @@ void set_nexus_ident(int nex, const char *id)
/*
* $Log: vcd_priv.c,v $
* Revision 1.5 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
* Revision 1.4 2003/11/10 20:18:02 steve
* Missing config.h.
*

42
vpi/vpi_config.h.in Normal file
View File

@ -0,0 +1,42 @@
#ifndef __vpi_config_H
#define __config_H
/*
* Copyright (c) 2004 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
* General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_config.h.in,v 1.1 2004/01/21 01:22:53 steve Exp $"
#endif
# undef HAVE_LIBIBERTY_H
# undef HAVE_MALLOC_H
# undef HAVE_DLFCN_H
# undef HAVE_DL_H
# undef HAVE_LIBZ
# undef HAVE_LIBBZ2
# undef WORDS_BIGENDIAN
# undef _LARGEFILE_SOURCE
# undef _LARGEFILE64_SOURCE
/*
* $Log: vpi_config.h.in,v $
* Revision 1.1 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h
*
*/
#endif // __config_H