From 0e463e9683e56a141badb4d3aeeda4808e438979 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 18 Mar 2026 09:22:46 +0100 Subject: [PATCH 01/10] Move version info into configure.ac and generate version_base.h from template --- configure.ac | 12 ++++++++++-- scripts/CREATE_BRANCH.sh | 12 +++++++----- version_base.h => version_base.h.in | 6 +++--- 3 files changed, 20 insertions(+), 10 deletions(-) rename version_base.h => version_base.h.in (76%) diff --git a/configure.ac b/configure.ac index 023753457..0521a8441 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,13 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT +m4_define([VER_MAJOR], [14]) +m4_define([VER_MINOR], [0]) +m4_define([VER_EXTRA], [stable]) +AC_INIT([iverilog], [VER_MAJOR.VER_MINOR (VER_EXTRA)]) +AC_SUBST([VERSION_MAJOR], [VER_MAJOR]) +AC_SUBST([VERSION_MINOR], [VER_MINOR]) +AC_SUBST([VERSION_EXTRA], [" (VER_EXTRA)"]) +AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"]) + AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([_pli_types.h]) @@ -366,5 +374,5 @@ then AC_MSG_ERROR(cannot configure white space in libdir: $libdir) fi AC_MSG_RESULT(ok) -AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile]) +AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h]) AC_OUTPUT diff --git a/scripts/CREATE_BRANCH.sh b/scripts/CREATE_BRANCH.sh index e35546072..9e717e062 100644 --- a/scripts/CREATE_BRANCH.sh +++ b/scripts/CREATE_BRANCH.sh @@ -27,7 +27,8 @@ case $1 in esac major=$1 - +minor=0 +extra="stable" branch="v${major}-branch" branch_exists=`git ls-remote --heads origin $branch` @@ -39,10 +40,11 @@ fi echo "Creating branch $branch" git checkout -b $branch -echo "Updating version_base.h..." -sed -i -E "s/(define\s+VERSION_MAJOR\s+).*/\1$major/" version_base.h -sed -i -E "s/(define\s+VERSION_MINOR\s+).*/\10/" version_base.h -sed -i -E "s/(define\s+VERSION_EXTRA\s+).*/\1\" \(stable\)\"/" version_base.h +file=configure.ac +echo "Updating $file..." +sed -i -E "s/(m4_define\(\[VER_MAJOR\],[[:space:]]*\[)[^]]*(\]\))/\1$major\2/" $file +sed -i -E "s/(m4_define\(\[VER_MINOR\],[[:space:]]*\[)[^]]*(\]\))/\1$minor\2/" $file +sed -i -E "s/(m4_define\(\[VER_EXTRA\],[[:space:]]*\[)[^]]*(\]\))/\1$extra\2/" $file echo "Updating aclocal.m4..." sed -i -E "s/(install_suffix='-)dev/\1$major/" aclocal.m4 diff --git a/version_base.h b/version_base.h.in similarity index 76% rename from version_base.h rename to version_base.h.in index 46b0e93eb..a0064332c 100644 --- a/version_base.h +++ b/version_base.h.in @@ -3,14 +3,14 @@ * Edit this definition in version_base.in to define the base version * number for the compiled result. */ -# define VERSION_MAJOR 14 -# define VERSION_MINOR 0 +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ /* * This will be appended to the version. Use this to mark development * versions and the like. */ -# define VERSION_EXTRA " (devel)" +# define VERSION_EXTRA "@VERSION_EXTRA@" # define VERSION_STRINGIFY(x) #x # define VERSION_STR(a,b,extra) VERSION_STRINGIFY(a.b) extra From 11a85b75f6739f0a4f2c2b332162b77c9adb11db Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 9 Apr 2026 16:51:17 +0200 Subject: [PATCH 02/10] Use autoconf variables to generated man and pdf output --- Makefile.in | 13 +++++++------ configure.ac | 4 +++- driver-vpi/Makefile.in | 5 ++--- driver/Makefile.in | 5 ++--- driver/iverilog.man.in | 2 +- iverilog-vpi.man.in | 2 +- vvp/Makefile.in | 5 ++--- vvp/vvp.man.in | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6972bda98..3a1f2b202 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,6 +36,8 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ datarootdir = @datarootdir@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MINOR = @VERSION_MINOR@ SUBDIRS = ivlpp vhdlpp vvp vpi tgt-null tgt-stub tgt-vvp \ tgt-vhdl tgt-vlog95 tgt-pcb tgt-blif tgt-sizer driver @@ -166,7 +168,7 @@ clean: $(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true rm -f *.o parse.cc parse.h lexor.cc rm -f ivl.exp iverilog-vpi.man iverilog-vpi.pdf iverilog-vpi.ps - rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_`./version.exe %M_%n`.pdf + rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf rm -f parse.output syn-rules.output dosify$(BUILDEXT) ivl@EXEEXT@ check.vvp rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc rm -rf dep @@ -279,9 +281,8 @@ lexor_keyword.o: lexor_keyword.cc parse.h lexor_keyword.cc: $(srcdir)/lexor_keyword.gperf gperf -o -i 7 -C -k 1-4,6,9,$$ -H keyword_hash -N check_identifier -t $< > $@ || (rm -f $@ ; false) -iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in version.exe - ./version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in + # generated by autoconf iverilog-vpi.ps: iverilog-vpi.man $(MAN) -t ./$< > $@ @@ -292,9 +293,9 @@ iverilog-vpi.pdf: iverilog-vpi.ps iverilog_man.ps: driver/iverilog.man vvp/vvp.man iverilog-vpi.man $(GROFF) -man -rC1 -rD1 -T ps $^ > $@ -iverilog_man.pdf: iverilog_man.ps version.exe +iverilog_man.pdf: iverilog_man.ps $(PS2PDF) $< $@ - cp $@ iverilog_man_`./version.exe %M_%n`.pdf + cp $@ iverilog-vpi.man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf # For VERSION_TAG in driver/main.c, first try git-describe, then look for a # release_tag.h file in the source tree (included in snapshots and releases), diff --git a/configure.ac b/configure.ac index 0521a8441..7b64c6897 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,8 @@ AC_SUBST([VERSION_MAJOR], [VER_MAJOR]) AC_SUBST([VERSION_MINOR], [VER_MINOR]) AC_SUBST([VERSION_EXTRA], [" (VER_EXTRA)"]) AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"]) +# used in res.rc +AC_SUBST([PRODUCTVERSION], ["VER_MAJOR,VER_MINOR,0,0"]) AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) @@ -374,5 +376,5 @@ then AC_MSG_ERROR(cannot configure white space in libdir: $libdir) fi AC_MSG_RESULT(ok) -AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h]) +AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h iverilog-vpi.man driver/iverilog.man driver-vpi/res.rc vvp/vvp.man]) AC_OUTPUT diff --git a/driver-vpi/Makefile.in b/driver-vpi/Makefile.in index bb8d66bc2..2403101e4 100644 --- a/driver-vpi/Makefile.in +++ b/driver-vpi/Makefile.in @@ -95,9 +95,8 @@ else endif # Windows specific... -res.rc: $(srcdir)/res.rc.in ../version.exe - sed -e 's;@PRODUCTVERSION@;'`../version.exe '%M,%n,0,0'`';' \ - $(srcdir)/res.rc.in > $@ +res.rc: $(srcdir)/res.rc.in + # generated by autoconf res.o: res.rc $(WINDRES) -i res.rc -o res.o diff --git a/driver/Makefile.in b/driver/Makefile.in index 38ab633a9..2ff6a9176 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -102,9 +102,8 @@ main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h Makefile | cflexor.o: cflexor.c cfparse.h -iverilog.man: $(srcdir)/iverilog.man.in ../version.exe - ../version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +iverilog.man: $(srcdir)/iverilog.man.in + # generated by autoconf iverilog.ps: iverilog.man $(MAN) -t ./$< > $@ diff --git a/driver/iverilog.man.in b/driver/iverilog.man.in index 21dbf72dc..4ff682a48 100644 --- a/driver/iverilog.man.in +++ b/driver/iverilog.man.in @@ -1,4 +1,4 @@ -.TH iverilog 1 "Jan 13th, 2026" "" "Version %M.%n%E" +.TH iverilog 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME iverilog - Icarus Verilog compiler diff --git a/iverilog-vpi.man.in b/iverilog-vpi.man.in index 23741e1c2..13a85a586 100644 --- a/iverilog-vpi.man.in +++ b/iverilog-vpi.man.in @@ -1,4 +1,4 @@ -.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version %M.%n%E" +.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME iverilog-vpi - Compile front end for VPI modules diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 941ffdee1..eb674cbd4 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -185,9 +185,8 @@ parse%cc parse%h: $(srcdir)/parse%y lexor.cc: $(srcdir)/lexor.lex $(LEX) -s -o$@ $< -vvp.man: $(srcdir)/vvp.man.in ../version.exe - ../version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +vvp.man: $(srcdir)/vvp.man.in + # generated by autoconf vvp.ps: vvp.man $(MAN) -t ./$< > $@ diff --git a/vvp/vvp.man.in b/vvp/vvp.man.in index c7d64d9b4..8da9ef816 100644 --- a/vvp/vvp.man.in +++ b/vvp/vvp.man.in @@ -1,4 +1,4 @@ -.TH vvp 1 "Jan 13th, 2026" "" "Version %M.%n %E" +.TH vvp 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME vvp - Icarus Verilog vvp runtime engine From c0153440832b0beed910f4dea4808998ea4a54bb Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 28 Mar 2026 20:07:39 +0100 Subject: [PATCH 03/10] CI: add build job on Linux with libvvp enabled --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5197876b9..c2a7cbe85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,6 +71,32 @@ jobs: cd Documentation make html + lin-with-libvvp: + strategy: + fail-fast: false + matrix: + os: [ + '22.04', + '24.04' + ] + runs-on: ubuntu-${{ matrix.os }} + name: '🐧 Ubuntu ${{ matrix.os }} (with libvvp)' + steps: + + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt update -qq + sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-sphinx python3-docopt + + - name: Build, check and install + run: | + autoconf + ./configure --enable-libveriuser --enable-libvvp + make -j$(nproc) check + sudo make install + win: runs-on: windows-latest strategy: From 4921f58f5251212e3c54d63a436304e444b082e8 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 9 Apr 2026 16:52:22 +0200 Subject: [PATCH 04/10] vvp: build and install libvvp as a versioned shared library Uses the package version for the SONAME and full library version. For linking, a pkg-config file is generated, and when building on Windows, an import library is created that can be used with both GCC and MSVC compilers. On non-Windows platforms, all object files are compiled with -fPIC to ensure compatibility with shared libraries. On Windows use 'lib' prefix for library name with MinGW compiler only. Other compiler like MSVC normally are not using any library prefix. The shared library is assumed to be ABI-stable within the same major version, so the SONAME reflects only the major version number. --- Makefile.in | 2 +- configure.ac | 7 ++++- vvp/Makefile.in | 68 +++++++++++++++++++++++++++++++++++++++++++----- vvp/libvvp.pc.in | 10 +++++++ 4 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 vvp/libvvp.pc.in diff --git a/Makefile.in b/Makefile.in index 3a1f2b202..52fdb0019 100644 --- a/Makefile.in +++ b/Makefile.in @@ -161,7 +161,7 @@ else rm vvp/vvp$(suffix).exe endif else - vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World' + LD_LIBRARY_PATH=$(srcdir)/vvp vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World' endif clean: diff --git a/configure.ac b/configure.ac index 7b64c6897..1c906fc58 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,11 @@ AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"]) # used in res.rc AC_SUBST([PRODUCTVERSION], ["VER_MAJOR,VER_MINOR,0,0"]) +# setup libvvp soversion, which depends on abi not package version +AC_SUBST([LIBVVP_SOVERSION], [1]) +# setup libvvp version +AC_SUBST([LIBVVP_VERSION], [VER_MAJOR.VER_MINOR]) + AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([_pli_types.h]) @@ -376,5 +381,5 @@ then AC_MSG_ERROR(cannot configure white space in libdir: $libdir) fi AC_MSG_RESULT(ok) -AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h iverilog-vpi.man driver/iverilog.man driver-vpi/res.rc vvp/vvp.man]) +AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h iverilog-vpi.man driver/iverilog.man driver-vpi/res.rc vvp/vvp.man vvp/libvvp.pc]) AC_OUTPUT diff --git a/vvp/Makefile.in b/vvp/Makefile.in index eb674cbd4..ccb1b3084 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -33,6 +33,7 @@ mandir = @mandir@ # It is a little different from the generic includedir. includedir = @includedir@/iverilog$(suffix) pdfdir = @docdir@ +pkgconfigdir = @libdir@/pkgconfig # For a cross compile these defines will need to be set accordingly. HOSTCC = @CC@ @@ -62,10 +63,21 @@ CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@ LDFLAGS = @rdynamic@ @LDFLAGS@ LIBS = @LIBS@ @EXTRALIBS@ +LIBVVP_VERSION = @LIBVVP_VERSION@ +LIBVVP_SOVERSION = @LIBVVP_SOVERSION@ + ifeq (@WIN32@,yes) SLDIR=$(bindir) SLEXT=dll +ifeq (@MINGW32@,yes) +IMPEXT=dll.a +LIBPREFIX=lib else +IMPEXT=lib +LIBPREFIX= +endif +else +LIBPREFIX=lib SLDIR=$(libdir) SLEXT=so endif @@ -105,11 +117,11 @@ else rm -f vvp$(suffix).exe endif else - ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' + LD_LIBRARY_PATH=. ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' endif clean: - rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc libvvp$(suffix).$(SLEXT) + rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc $(LIBPREFIX)vvp$(suffix)*.$(SLEXT)* rm -rf dep vvp@EXEEXT@ parse.output vvp.man vvp.ps vvp.pdf vvp.exp distclean: clean @@ -136,7 +148,15 @@ dep: ifeq (@LIBVVP@,yes) -CPPFLAGS+= -fpic +ifeq (@MINGW32@,yes) +LDFLAGS+= -Wl,--no-undefined +else +ifeq (@WIN32@,yes) +else +CXXFLAGS+= -fPIC +CFLAGS+= -fPIC +endif +endif # To avoid setting LD_LIBRARY_PATH when running vvp from the build tree, # add option -Wl,-rpath=`pwd` to the CXX command below. @@ -144,8 +164,20 @@ CPPFLAGS+= -fpic vvp@EXEEXT@: main.o $(srcdir)/vvp.def libvvp$(suffix).$(SLEXT) $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o -L. $(LDFLAGS) -lvvp$(suffix) $(LIBS) +ifeq (@MINGW32@,yes) libvvp$(suffix).$(SLEXT): $O - $(CXX) -shared $(LDFLAGS) -o libvvp$(suffix).$(SLEXT) $O $(LIBS) $(dllib) + $(CXX) -shared $(LDFLAGS) -o $(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT) -Wl,--out-implib $(LIBPREFIX)vvp$(suffix).$(IMPEXT) $O $(LIBS) $(dllib) +else +libvvp$(suffix).$(SLEXT): $O + $(CXX) -shared $(LDFLAGS) \ + -Wl,-soname,libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ + -o libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ + $O $(LIBS) $(dllib) + ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ + libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) + ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ + libvvp$(suffix).$(SLEXT) +endif else ifeq (@WIN32@,yes) # To support cocotb, we export the VPI functions directly. This allows @@ -220,7 +252,7 @@ stamp-config-h: $(srcdir)/config.h.in ../config.status cd ..; ./config.status --header=vvp/config.h config.h: stamp-config-h -install: all installdirs installfiles +install: all installdirs installfiles installpkgconfig F = ./vvp@EXEEXT@ $(srcdir)/libvvp.h $(INSTALL_DOC) @@ -233,7 +265,20 @@ installpdf: vvp.pdf installdirs installfiles: $(F) | installdirs $(INSTALL_PROGRAM) ./vvp@EXEEXT@ "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" ifeq (@LIBVVP@,yes) - $(INSTALL_PROGRAM) ./libvvp$(suffix).$(SLEXT) "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" +ifeq (@WIN32@,yes) + $(INSTALL_PROGRAM) ./$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT) "$(DESTDIR)$(bindir)/$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT)" + $(INSTALL_PROGRAM) ./$(LIBPREFIX)vvp$(suffix).$(IMPEXT) "$(DESTDIR)$(libdir)/$(LIBPREFIX)vvp$(suffix).$(IMPEXT)" +else + # Install real library + $(INSTALL_PROGRAM) ./libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ + "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION)" + # SONAME symlink (runtime) + ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ + "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION)" + # Linker symlink (devel) + ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ + "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" +endif $(INSTALL_DATA) $(srcdir)/libvvp.h "$(DESTDIR)$(includedir)/libvvp.h" endif @@ -243,12 +288,23 @@ installdirs: $(srcdir)/../mkinstalldirs "$(DESTDIR)$(INSTALL_DOCDIR)" \ "$(DESTDIR)$(INSTALL_PDFDIR)" +installpkgconfig: + $(INSTALL) -d $(DESTDIR)$(pkgconfigdir) + $(INSTALL_DATA) libvvp.pc $(DESTDIR)$(pkgconfigdir) uninstall: $(UNINSTALL32) rm -f "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" rm -f "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1" "$(DESTDIR)$(pdfdir)/vvp$(suffix).pdf" ifeq (@LIBVVP@,yes) +ifeq (@WIN32@,yes) + rm -f "$(DESTDIR)$(bindir)/$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT)" + rm -f "$(DESTDIR)$(libdir)/$(LIBPREFIX)vvp$(suffix).$(IMPEXT)" +else rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" + rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION)" + rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION)" +endif + rm -f "$(DESTDIR)$(pkgconfigdir)/libvvp.pc" rm -f "$(DESTDIR)$(includedir)/libvvp.h" endif diff --git a/vvp/libvvp.pc.in b/vvp/libvvp.pc.in new file mode 100644 index 000000000..268f18d7e --- /dev/null +++ b/vvp/libvvp.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libvvp +Version: @LIBVVP_VERSION@ +Description: Icarus Verilog VVP runtime library +Libs: -L${libdir} -lvvp +Cflags: -I${includedir}/iverilog From 0ec05a10bebf94696f3408c58be76e61cf2714bd Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 1 Apr 2026 08:59:07 +0200 Subject: [PATCH 05/10] vpp: install missing include directory when installing from 'vvp' directory This fixes an issue unrelated to the addition of support for versioned VVP library. --- configure.ac | 5 +++++ vvp/Makefile.in | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1c906fc58..cc817a69c 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,11 @@ AC_SUBST([LIBVVP_SOVERSION], [1]) # setup libvvp version AC_SUBST([LIBVVP_VERSION], [VER_MAJOR.VER_MINOR]) +# setup libvvp soversion, which depends on abi not package version +AC_SUBST([LIBVVP_SOVERSION], [1]) +# setup libvvp version +AC_SUBST([LIBVVP_VERSION], [VER_MAJOR.VER_MINOR]) + AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([_pli_types.h]) diff --git a/vvp/Makefile.in b/vvp/Makefile.in index ccb1b3084..480eb205c 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -23,6 +23,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ datarootdir = @datarootdir@ +builddir = @builddir@ VPATH = $(srcdir) @@ -33,7 +34,7 @@ mandir = @mandir@ # It is a little different from the generic includedir. includedir = @includedir@/iverilog$(suffix) pdfdir = @docdir@ -pkgconfigdir = @libdir@/pkgconfig +pkgconfigdir = $(libdir)/pkgconfig # For a cross compile these defines will need to be set accordingly. HOSTCC = @CC@ @@ -117,7 +118,7 @@ else rm -f vvp$(suffix).exe endif else - LD_LIBRARY_PATH=. ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' + LD_LIBRARY_PATH=$(builddir) ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' endif clean: @@ -284,6 +285,7 @@ endif installdirs: $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(INSTALL_DOCDIR)" \ "$(DESTDIR)$(INSTALL_PDFDIR)" From 596c70ce7155ede6232dfa8de48c148595294157 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 9 Apr 2026 17:07:04 +0200 Subject: [PATCH 06/10] =?UTF-8?q?Update=20documentation=20to=20clarify=20t?= =?UTF-8?q?hat=20=E2=80=9Cversion.exe=E2=80=9D=20is=20no=20longer=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation/developer/version_stamps.rst | 2 +- Documentation/usage/installation.rst | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Documentation/developer/version_stamps.rst b/Documentation/developer/version_stamps.rst index 3e84ddb37..5342d9aff 100644 --- a/Documentation/developer/version_stamps.rst +++ b/Documentation/developer/version_stamps.rst @@ -17,7 +17,7 @@ the "make version" target, or automatically if the version_tag.h file doesn't exist at all. This implies that a "make version" is something worth doing when you do a "git pull" or create commits. -The files below are now edited by the Makefile and the version.exe program: +The files below are now edited by the Makefile: * iverilog-vpi.man -- The .TH tag has a version string * driver/iverilog.man -- The .TH tag has a version string diff --git a/Documentation/usage/installation.rst b/Documentation/usage/installation.rst index 090f020f0..e79d26fa5 100644 --- a/Documentation/usage/installation.rst +++ b/Documentation/usage/installation.rst @@ -373,7 +373,5 @@ Next, compile with the command:: $ make -The configure generated the cross compiler flags, but there are a few -bits that need to be compiled with the native compiler. (version.exe -for example is used by the build process but is not installed.) The +The configure generated the cross compiler flags. The configure script should have gotten all that right. From f1c5c8700ba6941c397a59aaefcb8ac9990d4971 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 2 Apr 2026 11:13:45 +0200 Subject: [PATCH 07/10] vvp: add DLLIB to LIBS to simplify build rules --- vvp/Makefile.in | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 480eb205c..fbdb2aeff 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -62,7 +62,7 @@ CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@ -DICARUS_VPI_CONST=const CFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CC@ @CFLAGS@ CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@ LDFLAGS = @rdynamic@ @LDFLAGS@ -LIBS = @LIBS@ @EXTRALIBS@ +LIBS = @LIBS@ @EXTRALIBS@ @DLLIB@ LIBVVP_VERSION = @LIBVVP_VERSION@ LIBVVP_SOVERSION = @LIBVVP_SOVERSION@ @@ -83,8 +83,6 @@ SLDIR=$(libdir) SLEXT=so endif -dllib=@DLLIB@ - MDIR1 = -DMODULE_DIR1='"$(libdir)/ivl$(suffix)"' VPI = vpi_modules.o vpi_bit.o vpi_callback.o vpi_cobject.o vpi_const.o vpi_darray.o \ @@ -185,10 +183,10 @@ ifeq (@WIN32@,yes) # cocotb to build VPI modules without using our vpi_user.h and libvpi.a. # The .def file controls what is exported. vvp@EXEEXT@: main.o $O $(srcdir)/vvp.def - $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ $(LDFLAGS) $(srcdir)/vvp.def main.o $O $(dllib) $(LIBS) + $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ $(LDFLAGS) $(srcdir)/vvp.def main.o $O $(LIBS) else vvp@EXEEXT@: $O main.o - $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o $O $(LIBS) $(dllib) + $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o $O $(LIBS) endif endif From b06e80d7b9b8c5539b0a81a8a02b0148e2852897 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 2 Apr 2026 11:15:40 +0200 Subject: [PATCH 08/10] vvp: merge rules for building/installing and uninstalling the shared library --- vvp/Makefile.in | 106 ++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/vvp/Makefile.in b/vvp/Makefile.in index fbdb2aeff..6d15979bb 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -66,21 +66,54 @@ LIBS = @LIBS@ @EXTRALIBS@ @DLLIB@ LIBVVP_VERSION = @LIBVVP_VERSION@ LIBVVP_SOVERSION = @LIBVVP_SOVERSION@ +LIBBASENAME=vvp$(suffix) -ifeq (@WIN32@,yes) +ifeq (@MINGW32@,yes) SLDIR=$(bindir) SLEXT=dll -ifeq (@MINGW32@,yes) IMPEXT=dll.a LIBPREFIX=lib -else +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBNAME)-$(LIBVVP_SOVERSION).$(SLEXT) +LIBBUILD=$(LIBTARGET) +LIBLINKFLAGS=-Wl,--out-implib $(LIBNAME).$(IMPEXT) -Wl,--no-undefined +LIBPOSTBUILD=@true +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL=$(LIBNAME).$(IMPEXT) +else ifeq (@WIN32@,yes) +SLDIR=$(bindir) +SLEXT=dll IMPEXT=lib LIBPREFIX= -endif +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBLINKNAME) +LIBBUILD=$(LIBLINKNAME) +LIBLINKFLAGS= +LIBPOSTBUILD=@true +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL= else -LIBPREFIX=lib +CXXFLAGS+= -fPIC +CFLAGS+= -fPIC SLDIR=$(libdir) SLEXT=so +LIBPREFIX=lib +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBREALNAME) +LIBBUILD=$(LIBLINKNAME) +LIBLINKFLAGS=-Wl,-soname,$(LIBSONAME) +LIBPOSTBUILD=ln -sf $(LIBREALNAME) $(LIBSONAME) && ln -sf $(LIBSONAME) $(LIBLINKNAME) +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL= endif MDIR1 = -DMODULE_DIR1='"$(libdir)/ivl$(suffix)"' @@ -120,7 +153,7 @@ else endif clean: - rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc $(LIBPREFIX)vvp$(suffix)*.$(SLEXT)* + rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc $(LIBNAME)*.$(SLEXT)* rm -rf dep vvp@EXEEXT@ parse.output vvp.man vvp.ps vvp.pdf vvp.exp distclean: clean @@ -147,36 +180,15 @@ dep: ifeq (@LIBVVP@,yes) -ifeq (@MINGW32@,yes) -LDFLAGS+= -Wl,--no-undefined -else -ifeq (@WIN32@,yes) -else -CXXFLAGS+= -fPIC -CFLAGS+= -fPIC -endif -endif - # To avoid setting LD_LIBRARY_PATH when running vvp from the build tree, # add option -Wl,-rpath=`pwd` to the CXX command below. -vvp@EXEEXT@: main.o $(srcdir)/vvp.def libvvp$(suffix).$(SLEXT) +vvp@EXEEXT@: main.o $(srcdir)/vvp.def $(LIBBUILD) $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o -L. $(LDFLAGS) -lvvp$(suffix) $(LIBS) -ifeq (@MINGW32@,yes) -libvvp$(suffix).$(SLEXT): $O - $(CXX) -shared $(LDFLAGS) -o $(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT) -Wl,--out-implib $(LIBPREFIX)vvp$(suffix).$(IMPEXT) $O $(LIBS) $(dllib) -else -libvvp$(suffix).$(SLEXT): $O - $(CXX) -shared $(LDFLAGS) \ - -Wl,-soname,libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ - -o libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ - $O $(LIBS) $(dllib) - ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ - libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) - ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ - libvvp$(suffix).$(SLEXT) -endif +$(LIBBUILD): $O + $(CXX) -shared $(LIBLINKFLAGS) -o $(LIBTARGET) $^ $(LIBS) + $(LIBPOSTBUILD) else ifeq (@WIN32@,yes) # To support cocotb, we export the VPI functions directly. This allows @@ -264,19 +276,15 @@ installpdf: vvp.pdf installdirs installfiles: $(F) | installdirs $(INSTALL_PROGRAM) ./vvp@EXEEXT@ "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" ifeq (@LIBVVP@,yes) + $(INSTALL_PROGRAM) ./$(LIBINSTALL) "$(DESTDIR)$(SLDIR)/$(LIBINSTALL)" ifeq (@WIN32@,yes) - $(INSTALL_PROGRAM) ./$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT) "$(DESTDIR)$(bindir)/$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT)" - $(INSTALL_PROGRAM) ./$(LIBPREFIX)vvp$(suffix).$(IMPEXT) "$(DESTDIR)$(libdir)/$(LIBPREFIX)vvp$(suffix).$(IMPEXT)" +ifneq ($(LIBDEVELINSTALL),) + $(INSTALL_PROGRAM) ./$(LIBDEVELINSTALL) "$(DESTDIR)$(libdir)/$(LIBDEVELINSTALL)" +endif else # Install real library - $(INSTALL_PROGRAM) ./libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ - "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION)" - # SONAME symlink (runtime) - ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION) \ - "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION)" - # Linker symlink (devel) - ln -sf libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION) \ - "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" + ln -sf $(LIBREALNAME) "$(DESTDIR)$(SLDIR)/$(LIBSONAME)" + ln -sf $(LIBSONAME) "$(DESTDIR)$(SLDIR)/$(LIBLINKNAME)" endif $(INSTALL_DATA) $(srcdir)/libvvp.h "$(DESTDIR)$(includedir)/libvvp.h" endif @@ -289,20 +297,22 @@ installdirs: $(srcdir)/../mkinstalldirs "$(DESTDIR)$(INSTALL_PDFDIR)" installpkgconfig: - $(INSTALL) -d $(DESTDIR)$(pkgconfigdir) - $(INSTALL_DATA) libvvp.pc $(DESTDIR)$(pkgconfigdir) + $(INSTALL) -d "$(DESTDIR)$(pkgconfigdir)" + $(INSTALL_DATA) libvvp.pc "$(DESTDIR)$(pkgconfigdir)" uninstall: $(UNINSTALL32) rm -f "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" rm -f "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1" "$(DESTDIR)$(pdfdir)/vvp$(suffix).pdf" ifeq (@LIBVVP@,yes) + rm -f "$(DESTDIR)$(SLDIR)/$(LIBINSTALL)" ifeq (@WIN32@,yes) - rm -f "$(DESTDIR)$(bindir)/$(LIBPREFIX)vvp$(suffix)-$(LIBVVP_SOVERSION).$(SLEXT)" - rm -f "$(DESTDIR)$(libdir)/$(LIBPREFIX)vvp$(suffix).$(IMPEXT)" +ifneq ($(LIBDEVELINSTALL),) + rm -f "$(DESTDIR)$(libdir)/$(LIBDEVELINSTALL)" +endif else - rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" - rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_SOVERSION)" - rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT).$(LIBVVP_VERSION)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBLINKNAME)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBSONAME)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBREALNAME)" endif rm -f "$(DESTDIR)$(pkgconfigdir)/libvvp.pc" rm -f "$(DESTDIR)$(includedir)/libvvp.h" From 6ab72552c116105a1fcc359b4aeaff8c27e1d7fa Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 2 Apr 2026 11:37:01 +0200 Subject: [PATCH 09/10] vvp: introduce variable name for core object files --- vvp/Makefile.in | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 6d15979bb..9ecdf21e5 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -118,22 +118,24 @@ endif MDIR1 = -DMODULE_DIR1='"$(libdir)/ivl$(suffix)"' -VPI = vpi_modules.o vpi_bit.o vpi_callback.o vpi_cobject.o vpi_const.o vpi_darray.o \ - vpi_event.o vpi_iter.o vpi_mcd.o \ - vpi_priv.o vpi_scope.o vpi_real.o vpi_signal.o vpi_string.o vpi_tasks.o vpi_time.o \ - vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ - vpip_to_dec.o vpip_format.o vvp_vpi.o +CORE_OBJ = lib_main.o \ + parse.o parse_misc.o lexor.o arith.o array_common.o array.o bufif.o compile.o \ + concat.o dff.o class_type.o enum_type.o extend.o file_line.o latch.o npmos.o part.o \ + permaheap.o reduce.o resolv.o \ + sfunc.o stop.o \ + substitute.o \ + symbols.o ufunc.o codes.o vthread.o schedule.o \ + statistics.o tables.o udp.o vvp_island.o vvp_net.o vvp_net_sig.o \ + vvp_object.o vvp_cobject.o vvp_darray.o event.o logic.o delay.o \ + words.o island_tran.o -O = lib_main.o \ - parse.o parse_misc.o lexor.o arith.o array_common.o array.o bufif.o compile.o \ - concat.o dff.o class_type.o enum_type.o extend.o file_line.o latch.o npmos.o part.o \ - permaheap.o reduce.o resolv.o \ - sfunc.o stop.o \ - substitute.o \ - symbols.o ufunc.o codes.o vthread.o schedule.o \ - statistics.o tables.o udp.o vvp_island.o vvp_net.o vvp_net_sig.o \ - vvp_object.o vvp_cobject.o vvp_darray.o event.o logic.o delay.o \ - words.o island_tran.o $(VPI) +VPI_OBJ = vpi_modules.o vpi_bit.o vpi_callback.o vpi_cobject.o vpi_const.o vpi_darray.o \ + vpi_event.o vpi_iter.o vpi_mcd.o \ + vpi_priv.o vpi_scope.o vpi_real.o vpi_signal.o vpi_string.o vpi_tasks.o vpi_time.o \ + vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ + vpip_to_dec.o vpip_format.o vvp_vpi.o + +O = $(CORE_OBJ) $(VPI_OBJ) all: dep vvp@EXEEXT@ vvp.man From a0d70c88b6d64749e8ea75a963437ef7f86465dc Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 10 Apr 2026 08:52:35 +0200 Subject: [PATCH 10/10] configure.ac: show message that building vvp library is enabled --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cc817a69c..f21efedd9 100644 --- a/configure.ac +++ b/configure.ac @@ -204,7 +204,16 @@ AC_FUNC_FSEEKO # Build VVP as a library and stub AC_ARG_ENABLE([libvvp], [AS_HELP_STRING([--enable-libvvp], [build VVP as a shared library])], - [AC_SUBST(LIBVVP, yes)],[]) + [enable_libvvp=yes], + [enable_libvvp=no]) + +AC_SUBST([LIBVVP], [$enable_libvvp]) + +AS_IF([test "x$enable_libvvp" = "xyes"], [ + AC_MSG_NOTICE([libvvp support enabled]) +], [ + AC_MSG_NOTICE([libvvp support disabled]) +]) AC_ARG_ENABLE([libveriuser], [AS_HELP_STRING([--enable-libveriuser], [include support for PLI 1 (deprecated)])],