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.
This commit is contained in:
rlar 2017-03-12 19:12:53 +01:00
parent 3ea412e7cd
commit 8c09761e6b
3 changed files with 5 additions and 6 deletions

View File

@ -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"

View File

@ -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])

View File

@ -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 \$&lt; \\
\$(ADMSXML) -I\$(srcdir) -I\$(srcdir)/admsva \$&lt; \\
-e \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\
-e \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\
-e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\