diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-20 18:15:07 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-22 04:10:39 +0200 |
commit | ac87230767db4779a10acf0eaba6493327a3c257 (patch) | |
tree | 6ba271a6dee5b3a7298effdb2eb849c2243beb40 /configure.ac | |
parent | 12d0de235e1b24c2afc34ab13e317ea3ae69792e (diff) | |
download | sciteco-ac87230767db4779a10acf0eaba6493327a3c257.tar.gz |
pass curses CFLAGS into Scinterm build system
* requires a recent patch to Scinterm
* can be overwritten in SciTECO's build system via NCURSES_CFLAGS or
PDCURSES_CFLAGS.
* NCURSES_LIBS has also been introduced. The check for ncurses
will now use pkg-config if available.
* eases multiple builds with different Curses variants
(e.g. when cross-compiling for Windows)
* pass more toolchain variables into Scintilla build process (CC and RANLIB).
This should fix Cross-compiling Scintilla/Gtk
* Pass GTK cflags into Scintilla/Gtk build system.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 5f3ab62..9e0cc29 100644 --- a/configure.ac +++ b/configure.ac @@ -39,8 +39,9 @@ AC_PROG_CC_C99 AC_PROG_GREP AC_PROG_INSTALL -# Required by the Scintilla build process: +# Additionally required by the Scintilla build process: AC_CHECK_TOOL(AR, ar) +AC_PROG_RANLIB # Check for Windows resource compiler and define # WIN32 conditional @@ -110,7 +111,7 @@ AC_CHECK_FUNCS([memset setlocale strchr strrchr fstat], , [ # Library functions that should exist on UNIX/Linux case $host in *-*-darwin* | *-*-linux* | *-*-cygwin*) - AC_CHECK_FUNCS([realpath fchown], , [ + AC_CHECK_FUNCS([realpath fchown dup dup2], , [ AC_MSG_ERROR([Missing libc function]) ]) ;; @@ -149,14 +150,30 @@ case $INTERFACE in *curses) case $INTERFACE in ncurses) - AC_CHECK_LIB(ncurses, initscr, , [ - AC_MSG_ERROR([libncurses missing!]) + PKG_CHECK_MODULES(NCURSES, [ncurses], [ + CFLAGS="$CFLAGS $NCURSES_CFLAGS" + CXXFLAGS="$CXXFLAGS $NCURSES_CFLAGS" + LIBS="$LIBS $NCURSES_LIBS" + ], [ + AC_CHECK_LIB(ncurses, initscr, , [ + AC_MSG_ERROR([libncurses missing!]) + ]) ]) AC_CHECK_FUNCS([tigetstr]) ;; + pdcurses) - AC_ARG_VAR(PDCURSES_LIBS, [linker flags for PDCurses, - overriding the autoconf check]) + AC_ARG_VAR(PDCURSES_CFLAGS, [ + C compiler flags for PDCurses, + overriding the autoconf check + ]) + CFLAGS="$CFLAGS $PDCURSES_CFLAGS" + CXXFLAGS="$CXXFLAGS $PDCURSES_CFLAGS" + + AC_ARG_VAR(PDCURSES_LIBS, [ + linker flags for PDCurses, + overriding the autoconf check + ]) if [[ "x$PDCURSES_LIBS" = "x" ]]; then AC_CHECK_LIB(pdcurses, initscr, , [ AC_MSG_ERROR([libpdcurses missing! @@ -167,6 +184,7 @@ case $INTERFACE in AC_MSG_RESULT([$PDCURSES_LIBS]) LIBS="$LIBS $PDCURSES_LIBS" fi + AC_CHECK_FUNC([PDC_set_resize_limits], [ AC_DEFINE(PDCURSES_WIN32A, , [PDCurses supports Win32a extensions]) ]) |