From dec8dc3c4e5ef386e2d6aef32f9b6806244b4a97 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Wed, 14 Jan 2009 15:10:47 +0000 Subject: [PATCH] Add checks for efltk Small modification in pkg.m4 so returned variables does not have ending spaces s/DEBUG/DEBUG_PCRE in pcre.c so it does not gets included when ede is compiled with debug flags --- Jamconfig.in | 10 +++++----- configure.in | 27 +++++++++++++++++++++++++-- m4/pkg.m4 | 9 ++++++++- tools/capone/src/pcre/pcre.c | 4 +++- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/Jamconfig.in b/Jamconfig.in index 7383388..4d516ae 100644 --- a/Jamconfig.in +++ b/Jamconfig.in @@ -32,6 +32,8 @@ MV ?= mv ; MKDIRS ?= "mkdir -p" ; LINKCMD ?= "ln -s" ; +EDE_VERSION ?= "@EDE_VERSION@" ; + # directories used by build system PREFIX ?= "$(prefix)" ; EDEBINDIR ?= "$(bindir)" ; @@ -39,9 +41,7 @@ EDECONFIGDIR ?= "$(datadir)/config" ; EDEICONDIR ?= "$(datadir)/icons" ; EDEDESKTOPDIR ?= "$(datadir)/desktop" ; EDEMIMEDIR ?= "$(datadir)/mime" ; -EDEDOCDIR ?= "$(docdir)/ede-2.0.0" ; - -EDE_VERSION ?= "@EDE_VERSION@" ; +EDEDOCDIR ?= "$(docdir)/ede-$(EDE_VERSION)" ; OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ; DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ; @@ -75,8 +75,8 @@ COMPOSITEINCLUDE ?= @COMPOSITE_CFLAGS@ ; COMPOSITELIB ?= @COMPOSITE_LIBS@ ; # HAL -HALINCLUDE ?= @HAL_CFLAGS@ -HALLIB ?= @HAL_LIBS@ +HALINCLUDE ?= @HAL_CFLAGS@ ; +HALLIB ?= @HAL_LIBS@ ; # do not touch this JAMCONFIG_READ = "yes" ; diff --git a/configure.in b/configure.in index b271b9a..cbba071 100644 --- a/configure.in +++ b/configure.in @@ -23,7 +23,7 @@ dnl PACKAGE_VERSION is filled from AC_INIT EDE_VERSION=$PACKAGE_VERSION if test "$prefix" = NONE; then - EDE_INSTALL_DIR="/usr/local" + EDE_INSTALL_DIR="/opt/ede" else EDE_INSTALL_DIR="$prefix" fi @@ -38,7 +38,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [turn on debugging support AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [turn on profiling support (default=no)]),, enable_profile=no) AC_ARG_ENABLE(shape, AC_HELP_STRING([--enable-shape], [enable XShape extension (default=yes)]),, enable_shape=yes) AC_ARG_ENABLE(composite, AC_HELP_STRING([--enable-composite], [enable XComposite extension (default=yes)]),, enable_composite=yes) -AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal], [enable HAL usage (default=yes)]),, enable_hal=yes) +AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal], [enable HAL support (default=yes)]),, enable_hal=yes) AC_PROG_CXX AC_PROG_CPP @@ -127,6 +127,26 @@ else AC_MSG_ERROR([You don't have FLTK installed. To compile EDE, you will need it.]) fi +AC_PATH_PROG(EFLTK_CONFIG, efltk-config) +if test -n "$EFLTK_CONFIG"; then + efltk_version=`$EFLTK_CONFIG --version` + + AC_MSG_CHECKING([for eFLTK version >= 2.0.4]) + + case "$efltk_version" in ["2.0."[456789]]) + AC_MSG_RESULT(yes) + ;; + *) + AC_MSG_ERROR([Looks like you have an older eFLTK version ($efltk_version). Required is >= 2.0.4]) + esac + + EFLTK_CFLAGS=`$EFLTK_CONFIG --cxxflags` + EFLTK_LIBS_NOIMAGES=`$EFLTK_CONFIG --ldflags` + EFLTK_LIBS=`$EFLTK_CONFIG --use-images --ldflags` +else + AC_MSG_ERROR([You don't have eFLTK installed. To compile EDE, you will need it.]) +fi + EDE_INIT_JAM AC_SUBST(EDE_VERSION) @@ -135,6 +155,9 @@ AC_SUBST(EDE_DEBUG_FLAGS) AC_SUBST(FLTK_CFLAGS) AC_SUBST(FLTK_LIBS) AC_SUBST(FLTK_LIBS_NOIMAGES) +AC_SUBST(EFLTK_CFLAGS) +AC_SUBST(EFLTK_LIBS_NOIMAGES) +AC_SUBST(EFLTK_LIBS) AC_OUTPUT([ Jamconfig diff --git a/m4/pkg.m4 b/m4/pkg.m4 index 62193b0..6fe6b67 100644 --- a/m4/pkg.m4 +++ b/m4/pkg.m4 @@ -1,4 +1,7 @@ - +dnl +dnl A small modification to remove ending spaces (sz) +dnl + dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error @@ -41,6 +44,10 @@ AC_DEFUN(PKG_CHECK_MODULES, [ ifelse([$4], ,echo $$1_PKG_ERRORS,) fi + dnl remove ending spaces so jam variables could be accessed nicely + $1_CFLAGS=`echo $$1_CFLAGS | sed 's/[ ]*$//g'` + $1_LIBS=`echo $$1_LIBS | sed 's/[ ]*$//g'` + AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else diff --git a/tools/capone/src/pcre/pcre.c b/tools/capone/src/pcre/pcre.c index f70386e..09b7972 100644 --- a/tools/capone/src/pcre/pcre.c +++ b/tools/capone/src/pcre/pcre.c @@ -539,7 +539,7 @@ return i + 1; /* The code for doing this is held in a separate file that is also included in pcretest.c. It defines a function called print_internals(). */ -#ifdef DEBUG +#ifdef DEBUG_PCRE #include "printint.c" #endif @@ -5611,7 +5611,9 @@ if ((re->options & PCRE_REQCHSET) != 0) else printf("Req char = \\x%02x%s\n", ch, caseless); } +#ifdef DEBUG_PCRE print_internals(re, stdout); +#endif /* This check is done here in the debugging case so that the code that was compiled can be seen. */