diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-17 03:17:58 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-17 03:17:58 +0100 |
commit | 18fe0730c2757464f19636737a83fe65a26e3a1b (patch) | |
tree | bfd1b35162ec3279bff76a5fb5f94fbab79f56c4 | |
parent | 537b7b5e9f71cb57a690d903d1787d119eaa29d0 (diff) | |
download | sciteco-18fe0730c2757464f19636737a83fe65a26e3a1b.tar.gz |
added PDCURSES_LIBS ./configure variable to overwrite the check for PDCurses
* allows us to link against PDCurses/win32a statically.
It requires additional Windows DLLs (gdi32 and comdlg32) and since
there's no PDCurses configuration mechanism, it is easiest to set
the PDCurses linker flags using a PDCURSES_LIBS env variable.
* This is only possible since Scintilla links statically, we do the
linking of the binary and can provide the linker flags.
It is still not possible to overwrite the CFLAGS used for PDCurses
without modifying the Scinterm Makefile.
* Using PDCURSES_LIBS we can get rid of --with-interface=emcurses since
if library checks fail with EMscripten, we can simply define
PDCURSES_LIBS="-lpdcurses"
-rw-r--r-- | configure.ac | 24 | ||||
-rwxr-xr-x | distribute | 4 |
2 files changed, 17 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 85ab660..acdab8b 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,7 @@ SCINTERM_PATH=`canonicalize $SCINTERM_PATH` AC_SUBST(SCINTERM_PATH) AC_ARG_WITH(interface, - AS_HELP_STRING([--with-interface=ncurses|pdcurses|emcurses|gtk], + AS_HELP_STRING([--with-interface=ncurses|pdcurses|gtk], [Specify user interface [default=ncurses]]), [INTERFACE=$withval], [INTERFACE=ncurses]) @@ -155,20 +155,22 @@ case $INTERFACE in AC_CHECK_FUNCS([tigetstr]) ;; pdcurses) - AC_CHECK_LIB(pdcurses, initscr, , [ - AC_MSG_ERROR([libpdcurses missing! - Perhaps it is not named correctly or has wrong permissions.]) - ]) + 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! + Perhaps it is not named correctly or has wrong permissions.]) + ]) + else + AC_MSG_CHECKING([checking for PDCurses (PDCURSES_LIBS)]) + 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]) ]) ;; - emcurses) - # EMCurses is the PDCurses/Emscripten port - # However, ordinary library checks do not work - # under Emscripten - LIBS="$LIBS -lpdcurses" - ;; esac AC_CHECK_HEADERS([curses.h], , [ @@ -73,6 +73,10 @@ ppa : debian-source # which is required by the glib spawn functions. # If we ever build a non-console version on Windows, # we should include gspawn-win32-helper.exe instead. +# +# When linking in PDCurses/win32a statically, the +# environment variable PDCURSES_LIBS should be set to +# "-lpdcurses -lgdi32 -lcomdlg32" MINGW_UI=pdcurses mingw-binary : sciteco-$(SCITECO_VERSION)-win32.zip |