diff options
-rw-r--r-- | Makefile.in | 6 | ||||
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 14 |
3 files changed, 21 insertions, 19 deletions
diff --git a/Makefile.in b/Makefile.in index 1c7534634..b8a1a732c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,9 +11,11 @@ export SHELL all: @echo "building conf..." - cd ${abs_srcdir}/scripts/kconfig && ${MAKE} conf + cd ${abs_srcdir}/scripts/kconfig && \ + ${MAKE} conf CONF_LIBS=@CONF_LIBS@ @echo "building mconf..." - cd ${abs_srcdir}/scripts/kconfig && ${MAKE} mconf CURSES_LOC='@CURSES_LOC@' CURSES_LIB=@CURSES_LIB@ + cd ${abs_srcdir}/scripts/kconfig && \ + ${MAKE} mconf CURSES_LOC='@CURSES_LOC@' MCONF_LIBS=@MCONF_LIBS@ @echo "done." @touch .done diff --git a/configure.ac b/configure.ac index 24389dda8..fe28bad9f 100644 --- a/configure.ac +++ b/configure.ac @@ -33,13 +33,18 @@ dnl AC_HEADER_STDC -AC_CHECK_LIB([curses], [mvaddch], [CURSES_LIB='curses']) -AC_CHECK_LIB([ncurses], [mvaddch], [CURSES_LIB='ncurses']) -AC_CHECK_LIB([pdcurses], [mvaddch], [CURSES_LIB='pdcurses']) -if test "$CURSES_LIB" = "" -then - AC_MSG_ERROR([No curses library found.]) -fi +AC_CHECK_HEADER([regex.h], [], AC_MSG_ERROR([Cannot find regex.h.])) + +AC_SEARCH_LIBS(regcomp, [regex gnuregex],, + AC_MSG_ERROR([POSIX regex required.])) +CONF_LIBS=${LIBS} +AC_SUBST(CONF_LIBS) + +AC_SEARCH_LIBS(mvaddch, [ncurses curses pdcurses], CURSES_LIB=$ac_lib, + AC_MSG_ERROR([curses library required.])) +MCONF_LIBS=${LIBS} +AC_SUBST(MCONF_LIBS) + if test "$CURSES_LIB" = "ncurses" then AC_CHECK_HEADER( @@ -55,7 +60,6 @@ else ) fi AC_SUBST(CURSES_LOC) -AC_SUBST(CURSES_LIB) AC_SYS_INTERPRETER if test "$interpval" != yes ; then diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 405eac678..d817ebfd4 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -14,16 +14,12 @@ CURSES_LOC := <ncurses.h> endif CFLAGS += "-DCURSES_LOC=$(CURSES_LOC)" -ifndef CURSES_LIB -CURSES_LIB := ncurses +ifndef MCONF_LIBS +MCONF_LIBS := -lncurses endif -ifdef REGEX_LIB -conf-libs := -l$(REGEX_LIB) -else -conf-libs := -endif -mconf-libs := -l$(CURSES_LIB) -mconf-libs += $(conf-libs) + +conf-libs := $(CONF_LIBS) +mconf-libs := $(MCONF_LIBS) lkc-deps := lkc.h lkc_defs.h expr.h |