From 8c09761e6bc0c9957e65660ccaee575d90a36c18 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 12 Mar 2017 19:12:53 +0100 Subject: [PATCH] adms, polish autogen.sh and configure.ac Allow to override the admsXml executable when invoking autogen.sh and configure.ac ADMSXML=/foo/bar/baz/admsXml ./autogen.sh --adms ADMSXML=/foo/bar/baz/admsXml ./configure --enable-adms alternatively (and more advertised) ./configure ADMSXML=/foo/bar/baz/admsXml --enable-adms The generated Makefiles remember the given path. A relative path doesn't make sense of course. --- autogen.sh | 4 ++-- configure.ac | 5 ++--- src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/autogen.sh b/autogen.sh index a816f7c7f..8e7972a37 100755 --- a/autogen.sh +++ b/autogen.sh @@ -15,7 +15,7 @@ PROJECT=ngspice ADMSDIR=src/spicelib/devices/adms XMLPATH=src/spicelib/devices/adms/admst -ADMSXML=admsXml +ADMSXML=${ADMSXML:-admsXml} ADMS=0 # Exit variable @@ -96,7 +96,7 @@ check_autoconf() check_adms() { - (admsXml --version) < /dev/null > /dev/null 2>&1 || { + ($ADMSXML --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have admsXml installed to compile adms models." echo "See http://mot-adms.sourceforge.net" diff --git a/configure.ac b/configure.ac index 40dfcf25a..2141b038e 100644 --- a/configure.ac +++ b/configure.ac @@ -934,9 +934,9 @@ if test "x$enable_adms" = xyes ; then AC_MSG_RESULT([********************************** * ADMS support is experimental * **********************************]) - AC_CHECK_PROGS([ADMSXML], [admsXml admsXml.exe], [no]) + AC_CHECK_PROGS([ADMSXML], [admsXml admsXml.exe]) - if test "x$ADMSXML" = xno; then + if test "x$ADMSXML" = x; then AC_MSG_ERROR([If you want Verilog-A models you should install admsXml]) fi AC_DEFINE([ADMS], [1], [Support for Verilog-A models]) @@ -969,7 +969,6 @@ else fi -AC_SUBST([ADMSXML]) AC_SUBST([VLADEVDIR]) AC_SUBST([VLADEV]) AC_SUBST([NOTVLADEVDIR]) diff --git a/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml b/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml index 47593bc43..df6c79fd7 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml @@ -109,7 +109,7 @@ DISTCLEANFILES = Makefile.am \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml - admsXml -I\$(srcdir) -I\$(srcdir)/admsva \$< \\ + \$(ADMSXML) -I\$(srcdir) -I\$(srcdir)/admsva \$< \\ -e \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\