Browse Source

Add configure checks for regex functions
Enable g.mlist, g.mremove


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33268 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 16 years ago
parent
commit
2f21808ba3
7 changed files with 1056 additions and 729 deletions
  1. 1000 729
      configure
  2. 37 0
      configure.in
  3. 2 0
      general/Makefile
  4. 4 0
      general/g.mlist/Makefile
  5. 4 0
      general/g.mremove/Makefile
  6. 6 0
      include/Make/Platform.make.in
  7. 3 0
      include/config.h.in

File diff suppressed because it is too large
+ 1000 - 729
configure


+ 37 - 0
configure.in

@@ -195,6 +195,7 @@ LOC_ARG_WITH(freetype, FreeType, no)
 LOC_ARG_WITH(nls, NLS, no)
 LOC_ARG_WITH(readline, Readline, no)
 LOC_ARG_WITH(opendwg, openDWG, no)
+LOC_ARG_WITH(regex, regex)
 AC_ARG_WITH(python,
 [  --with-python[=path/python-config] enable support for Python SWIG bindings (python-config with path, \
 e.g. '--with-python=/usr/bin/python2.5-config', default: no)],, with_python="no")
@@ -277,6 +278,9 @@ LOC_ARG_WITH_SHARE(proj, External PROJ.4)
 LOC_ARG_WITH_INC(opendwg, openDWG)
 LOC_ARG_WITH_LIB(opendwg, openDWG)
 
+LOC_ARG_WITH_INC(regex, regex)
+LOC_ARG_WITH_LIB(regex, regex)
+
 # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
 
 # With includes option
@@ -568,6 +572,39 @@ fi
 
 # Done checking PROJ
 
+# Enable regex option
+
+LOC_CHECK_USE(regex,regex,USE_REGEX)
+
+REGEXINCPATH=
+REGEXLIBPATH=
+REGEXLIB=
+
+if test -n "$USE_REGEX"; then
+
+# With regex includes directory
+
+LOC_CHECK_INC_PATH(regex,regex,REGEXINCPATH)
+
+LOC_CHECK_INCLUDES(regex.h,regex,$REGEXINCPATH)
+
+# With regex library directory
+
+LOC_CHECK_LIB_PATH(regex,regex,REGEXLIBPATH)
+
+LOC_CHECK_FUNC(regcomp,regex functions,REGEXLIB,,,,,[
+LOC_CHECK_LIBS(regex,regcomp,regex,$REGEXLIBPATH,REGEXLIB,,,)
+])
+
+fi # $USE_REGEX
+
+AC_SUBST(REGEXINCPATH)
+AC_SUBST(REGEXLIBPATH)
+AC_SUBST(REGEXLIB)
+AC_SUBST(USE_REGEX)
+
+# Done checking regex
+
 # Enable Readline option
 
 LOC_CHECK_USE(readline,Readline,USE_READLINE)

+ 2 - 0
general/Makefile

@@ -13,6 +13,8 @@ SUBDIRS = \
 	g.mapsets \
 	g.message \
 	g.mkfontcap \
+	g.mlist \
+	g.mremove \
 	g.parser \
 	g.proj \
 	g.pnmcomp \

+ 4 - 0
general/g.mlist/Makefile

@@ -7,4 +7,8 @@ DEPENDENCIES = $(GISDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
+ifneq ($(USE_REGEX),)
 default: cmd
+else
+default:
+endif

+ 4 - 0
general/g.mremove/Makefile

@@ -7,4 +7,8 @@ DEPENDENCIES = $(GISDEP) $(VECTDEP) $(G3DDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
+ifneq ($(USE_REGEX),)
 default: cmd
+else
+default:
+endif

+ 6 - 0
include/Make/Platform.make.in

@@ -228,6 +228,12 @@ WXWIDGETSCPPFLAGS   = @WXWIDGETSCPPFLAGS@
 WXWIDGETSLIB        = @WXWIDGETSLIB@
 USE_WXWIDGETS       = @USE_WXWIDGETS@
 
+#regex
+REGEXINCPATH        = @REGEXINCPATH@
+REGEXLIBPATH        = @REGEXLIBPATH@
+REGEXLIB            = @REGEXLIB@
+USE_REGEX           = @USE_REGEX@
+
 #i18N
 HAVE_NLS            = @HAVE_NLS@
 

+ 3 - 0
include/config.h.in

@@ -233,6 +233,9 @@
 /* define if OpenGL uses Windows */
 #undef OPENGL_WINDOWS
 
+/* define if regex.h exists */
+#undef HAVE_REGEX_H
+
 /*
  * configuration information solely dependent on the above
  * nothing below this point should need changing