mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
Enable including 'readline' from a non standard location.
--with-readline=<location> may be given instead of --with-readline=yes This is required when on macOS readline is installed from Homebrew. Standard Xcode readline in macOS is not compatible with ngspice. If --with-readline=yes is given, there is no change of behaviour compared with previous releases.
This commit is contained in:
+2
-2
@@ -51,14 +51,14 @@ if test "$1" = "d"; then
|
|||||||
echo
|
echo
|
||||||
# You may add --enable-adms to the following command for adding adms generated devices
|
# You may add --enable-adms to the following command for adding adms generated devices
|
||||||
# builtin readline not compatible (Big Sur), readline via Homebrew required (in /usr/local/opt)
|
# builtin readline not compatible (Big Sur), readline via Homebrew required (in /usr/local/opt)
|
||||||
../configure --with-x --enable-xspice --enable-cider --with-readline=/usr/local/opt --enable-openmp CFLAGS="-m64 -O0 -g -Wall -I/opt/X11/include/freetype2" LDFLAGS="-m64 -lomp -g"
|
../configure --with-x --enable-xspice --enable-cider --with-readline=/usr/local/opt/readline --enable-openmp CFLAGS="-m64 -O0 -g -Wall -I/opt/X11/include/freetype2 -I/usr/local/opt/readline/include" LDFLAGS="-m64 -lomp -g -L/usr/local/opt/readline/lib"
|
||||||
else
|
else
|
||||||
cd release
|
cd release
|
||||||
if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi
|
if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi
|
||||||
echo "configuring for 64 bit release"
|
echo "configuring for 64 bit release"
|
||||||
echo
|
echo
|
||||||
# You may add --enable-adms to the following command for adding adms generated devices
|
# You may add --enable-adms to the following command for adding adms generated devices
|
||||||
../configure --with-x --enable-xspice --enable-cider --with-readline=/usr/local/opt --enable-openmp --disable-debug CFLAGS="-m64 -O2 -I/opt/X11/include/freetype2" LDFLAGS="-m64 -lomp"
|
../configure --with-x --enable-xspice --enable-cider --with-readline=/usr/local/opt/readline --enable-openmp --disable-debug CFLAGS="-m64 -O2 -I/opt/X11/include/freetype2 -I/usr/local/opt/readline/include" LDFLAGS="-m64 -lomp -L/usr/local/opt/readline/lib"
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi
|
if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi
|
||||||
|
|
||||||
|
|||||||
+32
-13
@@ -1161,24 +1161,43 @@ fi
|
|||||||
# ---- Default: disabled. ----
|
# ---- Default: disabled. ----
|
||||||
# ---- Hope to see in the future readline replacement. ----
|
# ---- Hope to see in the future readline replacement. ----
|
||||||
|
|
||||||
if test "x$with_readline" != xyes; then
|
if test "x$with_readline" = x || test "x$with_readline" = xno ; then
|
||||||
AC_MSG_RESULT([GNU readline disabled.])
|
AC_MSG_RESULT([GNU readline disabled.])
|
||||||
else
|
else
|
||||||
if test "x$with_tcl" = x || test "x$with_tcl" = xno ; then
|
if test "x$with_readline" = xyes; then
|
||||||
AC_MSG_RESULT([Checking for readline:])
|
if test "x$with_tcl" = x || test "x$with_tcl" = xno ; then
|
||||||
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
|
AC_MSG_RESULT([Checking for readline:])
|
||||||
[AC_DEFINE([HAVE_GNUREADLINE], [], [Define if we have GNU readline])],
|
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
|
||||||
[AC_MSG_ERROR([Couldn't find GNU readline headers.])])
|
[AC_DEFINE([HAVE_GNUREADLINE], [], [Define if we have GNU readline])],
|
||||||
AC_SEARCH_LIBS([tputs], [ncurses tinfo termcap],
|
[AC_MSG_ERROR([Couldn't find GNU readline headers.])])
|
||||||
[AC_DEFINE([HAVE_TERMCAP], [], [Define if we have ncurses/terminfo or termcap])],
|
AC_SEARCH_LIBS([tputs], [ncurses tinfo termcap],
|
||||||
[AC_MSG_ERROR([Found neither ncurses/terminfo or termcap])])
|
[AC_DEFINE([HAVE_TERMCAP], [], [Define if we have ncurses/terminfo or termcap])],
|
||||||
AC_CHECK_LIB([readline], [readline],
|
[AC_MSG_ERROR([Found neither ncurses/terminfo or termcap])])
|
||||||
[LIBS="$LIBS -lreadline"],
|
AC_CHECK_LIB([readline], [readline],
|
||||||
[AC_MSG_ERROR([Couldn't find readline libraries.])])
|
[LIBS="$LIBS -lreadline"],
|
||||||
|
[AC_MSG_ERROR([Couldn't find readline libraries.])])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Especially defined for macOS (Big Sur), with readline installed from Brew
|
||||||
|
for dir in \
|
||||||
|
$with_readline
|
||||||
|
do
|
||||||
|
if test "x$with_tcl" = x || test "x$with_tcl" = xno ; then
|
||||||
|
AC_MSG_RESULT([Checking for readline:])
|
||||||
|
AC_CHECK_HEADERS([$dir/include/readline/readline.h $dir/include/readline/history.h],
|
||||||
|
[AC_DEFINE([HAVE_GNUREADLINE], [], [Define if we have GNU readline])],
|
||||||
|
[AC_MSG_ERROR([Couldn't find GNU readline headers.])])
|
||||||
|
AC_SEARCH_LIBS([tputs], [ncurses tinfo termcap],
|
||||||
|
[AC_DEFINE([HAVE_TERMCAP], [], [Define if we have ncurses/terminfo or termcap])],
|
||||||
|
[AC_MSG_ERROR([Found neither ncurses/terminfo or termcap])])
|
||||||
|
AC_CHECK_LIB([readline], [readline],
|
||||||
|
[LIBS="$LIBS -lreadline"],
|
||||||
|
[AC_MSG_ERROR([Couldn't find readline libraries.])])
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ---- Option to include BSD editline support in ngspice CLI ----
|
# ---- Option to include BSD editline support in ngspice CLI ----
|
||||||
# ---- Default: disabled. ----
|
# ---- Default: disabled. ----
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user