|
| 1 | +--- ngspice-44.2a/configure.ac 2025-01-11 13:35:18.000000000 +0100 |
| 2 | ++++ ngspice-44.2b/configure.ac 2025-02-03 17:42:18.995267000 +0100 |
| 3 | +@@ -1280,6 +1280,40 @@ else |
| 4 | + AC_CHECK_LIB([readline], [readline], |
| 5 | + [LIBS="$LIBS -lreadline"], |
| 6 | + [AC_MSG_ERROR([Couldn't find readline libraries.])]) |
| 7 | ++ |
| 8 | ++# Check for curses.h using pkg-config or manual paths |
| 9 | ++PKG_CHECK_MODULES_STATIC([NCURSES], [ncursesw], [ |
| 10 | ++ # If pkg-config found ncursesw, use its flags |
| 11 | ++ AC_SUBST([CURSES_CFLAGS], ["$NCURSES_CFLAGS"]) |
| 12 | ++ AC_SUBST([CURSES_LIBS], ["$NCURSES_LIBS"]) |
| 13 | ++ AC_DEFINE([HAVE_CURSES_H], [1], [Define if curses.h is available]) |
| 14 | ++ |
| 15 | ++ # Force the compiler to use the ncursesw include path for all subsequent checks |
| 16 | ++ CPPFLAGS="$CPPFLAGS $NCURSES_CFLAGS" |
| 17 | ++], [ |
| 18 | ++ # Fallback if pkg-config fails |
| 19 | ++ AC_MSG_WARN([pkg-config for ncursesw failed. Trying manual detection...]) |
| 20 | ++ |
| 21 | ++ # Manually check for ncurses/curses.h and set flags |
| 22 | ++ AC_CHECK_HEADER([ncurses/curses.h], [ |
| 23 | ++ CURSES_CFLAGS="-I/ucrt64/include/ncurses" |
| 24 | ++ CURSES_LIBS="-lncursesw" |
| 25 | ++ AC_SUBST([CURSES_CFLAGS]) |
| 26 | ++ AC_SUBST([CURSES_LIBS]) |
| 27 | ++ AC_DEFINE([HAVE_CURSES_H], [1], [Define if curses.h is available]) |
| 28 | ++ |
| 29 | ++ # Force the compiler to use this include path |
| 30 | ++ CPPFLAGS="$CPPFLAGS $CURSES_CFLAGS" |
| 31 | ++ ], [ |
| 32 | ++ AC_MSG_ERROR([ncurses/curses.h not found in /ucrt64/include/ncurses. Install ncurses!]) |
| 33 | ++ ]) |
| 34 | ++]) |
| 35 | ++ |
| 36 | ++# Now check for curses.h using the updated CPPFLAGS |
| 37 | ++AC_CHECK_HEADERS([curses.h], [], [ |
| 38 | ++ AC_MSG_WARN([curses.h not found, but ncurses/curses.h is available.]) |
| 39 | ++]) |
| 40 | ++ |
| 41 | + fi |
| 42 | + else |
| 43 | + # Especially defined for macOS (Big Sur), with readline installed from Brew |
| 44 | +diff --git a/src/xspice/verilog/Makefile.am b/src/xspice/verilog/Makefile.am |
| 45 | +index 262d63384..1a298cff0 100644 |
| 46 | +--- a/src/xspice/verilog/Makefile.am |
| 47 | ++++ b/src/xspice/verilog/Makefile.am |
| 48 | +@@ -45,7 +45,9 @@ |
| 49 | + install-exec-hook: |
| 50 | + cd $(DESTDIR)$(pkglibdir); \ |
| 51 | + rm -f ivlng*a libvvp* ; \ |
| 52 | +- mv ivlngvpi.* ivlng.vpi |
| 53 | ++ if [ -f ivlngvpi.* ]; then \ |
| 54 | ++ mv ivlngvpi.* ivlng.vpi; \ |
| 55 | ++ fi |
| 56 | + |
| 57 | + uninstall-hook: |
| 58 | + rm -f $(DESTDIR)$(pkglibdir)/ivlng.vpi $(DESTDIR)$(pkglibdir)/ivlng.so |
0 commit comments