Modified the configure script to *not* run "realpath" on the local-path variable if dist-path has been specified, since local-path may not even exist.
diff --git a/scripts/configure b/scripts/configure index 3d919ad..e3c0229 100755 --- a/scripts/configure +++ b/scripts/configure
@@ -638,7 +638,6 @@ docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -662,8 +661,8 @@ ac_user_opts=' enable_option_checking enable_sky130_pdk -with_sky130_local_path with_sky130_dist_path +with_sky130_local_path with_sky130_link_targets enable_klayout enable_magic @@ -723,7 +722,6 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -976,15 +974,6 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1122,7 +1111,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1275,7 +1264,6 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1362,11 +1350,11 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-sky130-local-path=/path/to/install/sky130 - "run-time location of the PDK" --with-sky130-dist-path=/path/to/install/sky130 "staging location to install the PDK for distribution (optional)" + --with-sky130-local-path=/path/to/install/sky130 + "run-time location of the PDK" --with-sky130-link-targets=none|source "make symbolic links to existing files [default=none]" @@ -1852,7 +1840,7 @@ $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -2075,33 +2063,28 @@ if test -z $PYTHON; then - if test -z ""; - then - PYTHON="python3" - else - PYTHON="" - fi + PYTHON="python" fi PYTHON_NAME=`basename $PYTHON` { $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: distutils" >&5 $as_echo_n "checking $PYTHON_NAME module: distutils... " >&6; } - $PYTHON -c "import distutils" 2>/dev/null - if test $? -eq 0; - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $PYTHON -c "import distutils" 2>/dev/null + if test $? -eq 0; + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - eval HAVE_PYMOD_DISTUTILS=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + eval HAVE_PYMOD_DISTUTILS=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - eval HAVE_PYMOD_DISTUTILS=no - # - if test -n "" - then - as_fn_error $? "failed to find required module distutils" "$LINENO" 5 - exit 1 - fi - fi + eval HAVE_PYMOD_DISTUTILS=no + # + if test -n "" + then + as_fn_error $? "failed to find required module distutils" "$LINENO" 5 + exit 1 + fi + fi # Check for Mac OS X gsed vs. sed @@ -2270,27 +2253,6 @@ $as_echo "$as_me: PDK 'sky130' will be downloaded automatically during make." >&6;} fi - # --with-pdk-local-path=PDK_LOCAL_PATH - -# Check whether --with-sky130-local-path was given. -if test "${with_sky130_local_path+set}" = set; then : - withval=$with_sky130_local_path; SKY130_LOCAL_PATH=$withval - -fi - - - # Require this argument - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether local path is specified for 'sky130'" >&5 -$as_echo "$as_me: Checking whether local path is specified for 'sky130'" >&6;} - if test "x$SKY130_LOCAL_PATH" == "x" ; then - as_fn_error $? "Option --with-sky130-local-path=<path> not specified!" "$LINENO" 5 - SKY130_LOCAL_PATH="" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Install path for 'sky130' is $SKY130_LOCAL_PATH" >&5 -$as_echo "$as_me: Install path for 'sky130' is $SKY130_LOCAL_PATH" >&6;} - SKY130_LOCAL_PATH=`realpath $SKY130_LOCAL_PATH` - fi - # --with-pdk-dist-path=PDK_DIST_PATH # Check whether --with-sky130-dist-path was given. @@ -2311,6 +2273,30 @@ SKY130_DIST_PATH=`realpath $SKY130_DIST_PATH` fi + # --with-pdk-local-path=PDK_LOCAL_PATH + +# Check whether --with-sky130-local-path was given. +if test "${with_sky130_local_path+set}" = set; then : + withval=$with_sky130_local_path; SKY130_LOCAL_PATH=$withval + +fi + + + # Require this argument + { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether local path is specified for 'sky130'" >&5 +$as_echo "$as_me: Checking whether local path is specified for 'sky130'" >&6;} + if test "x$SKY130_LOCAL_PATH" == "x" ; then + as_fn_error $? "Option --with-sky130-local-path=<path> not specified!" "$LINENO" 5 + SKY130_LOCAL_PATH="" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Install path for 'sky130' is $SKY130_LOCAL_PATH" >&5 +$as_echo "$as_me: Install path for 'sky130' is $SKY130_LOCAL_PATH" >&6;} + # If dist-path is specified then do not try to expand local-path + if test "$SKY130_DIST_PATH" == "" ; then + SKY130_LOCAL_PATH=`realpath $SKY130_LOCAL_PATH` + fi + fi + # --with-pdk-link-targets=PDK_LINK_TARGETS # Check whether --with-sky130-link-targets was given.
diff --git a/scripts/configure.ac b/scripts/configure.ac index f5d43e8..a4f07d2 100755 --- a/scripts/configure.ac +++ b/scripts/configure.ac
@@ -76,22 +76,6 @@ AC_MSG_NOTICE([PDK 'pdk' will be downloaded automatically during make.]) fi - # --with-pdk-local-path=PDK_LOCAL_PATH - AC_ARG_WITH(pdk-local-path, - [AS_HELP_STRING([--with-pdk-local-path=/path/to/install/pdk], "run-time location of the PDK")], - [pdkvar[]_LOCAL_PATH=$withval] - ) - - # Require this argument - AC_MSG_NOTICE([Checking whether local path is specified for 'pdk']) - if test "x$[]pdkvar[]_LOCAL_PATH" == "x" ; then - AC_MSG_ERROR([Option --with-pdk-local-path=<path> not specified!]) - pdkvar[]_LOCAL_PATH="" - else - AC_MSG_NOTICE([Install path for 'pdk' is $[]pdkvar[]_LOCAL_PATH]) - pdkvar[]_LOCAL_PATH=`realpath $[]pdkvar[]_LOCAL_PATH` - fi - # --with-pdk-dist-path=PDK_DIST_PATH AC_ARG_WITH(pdk-dist-path, [AS_HELP_STRING([--with-pdk-dist-path=/path/to/install/pdk], "staging location to install the PDK for distribution (optional)")], @@ -107,6 +91,25 @@ pdkvar[]_DIST_PATH=`realpath $[]pdkvar[]_DIST_PATH` fi + # --with-pdk-local-path=PDK_LOCAL_PATH + AC_ARG_WITH(pdk-local-path, + [AS_HELP_STRING([--with-pdk-local-path=/path/to/install/pdk], "run-time location of the PDK")], + [pdkvar[]_LOCAL_PATH=$withval] + ) + + # Require this argument + AC_MSG_NOTICE([Checking whether local path is specified for 'pdk']) + if test "x$[]pdkvar[]_LOCAL_PATH" == "x" ; then + AC_MSG_ERROR([Option --with-pdk-local-path=<path> not specified!]) + pdkvar[]_LOCAL_PATH="" + else + AC_MSG_NOTICE([Install path for 'pdk' is $[]pdkvar[]_LOCAL_PATH]) + # If dist-path is specified then do not try to expand local-path + if test "$[]pdkvar[]_DIST_PATH" == "" ; then + pdkvar[]_LOCAL_PATH=`realpath $[]pdkvar[]_LOCAL_PATH` + fi + fi + # --with-pdk-link-targets=PDK_LINK_TARGETS AC_ARG_WITH(pdk-link-targets, [AS_HELP_STRING([--with-pdk-link-targets=none|source], "make symbolic links to existing files @<:@default=none@:>@")],