changeset 9989:d36f8c473dff

use glob and fnmatch from gnulib
author John W. Eaton <jwe@octave.org>
date Tue, 15 Dec 2009 14:27:18 -0500
parents 76cf4aec34e9
children 2b008f1d3794
files ChangeLog README.MSVC bootstrap.conf common.mk configure.ac octave-bug.cc.in octave-bug.in
diffstat 7 files changed, 14 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-15  John W. Eaton  <jwe@octave.org>
+
+	* README.MSVC: Delete section about obtaining glob library.
+	* bootstrap.conf (gnulib_modules): Add fnmatch and glob to the list.
+	* common.mk (LIBGLOB): Delete variable.
+	(do_subst_config_vals): Don't substitute it.
+	* octave-bug.in, octave-bug.cc.in: Eliminate LIBGLOB variable.
+	* configure.ac: Don't check for glob.h or the glob and fnmatch
+	functions.  Eliminate LIBGLOB variable.
+
 2009-12-11  Rik <octave@nomad.inbox5.com>
 
 	* HACKING: Elaborate which DIRNAME to use for --gnulib-srcdir option.
--- a/README.MSVC
+++ b/README.MSVC
@@ -148,27 +148,7 @@
     - MSYS:    start <MSYS_install>\bin\rxvt.exe -e /bin/sh --login -i
     - Cygwin:  start <Cygwin_install>\cygwin.bat
 
-1.5 Glob library
-----------------
-
-Octave also requires a filename globbing library.  This library is
-typically part of the C library on UNIX systems, but is not part of
-the Windows or MSVC run-time libraries.  You can find a glob package
-on the Octave website.  This package provides the missing features and
-is intended to be compiled in a fully setup shell with the
-Unix-to-MSVC compilation scripts:
-
-  * download and decompress the sources
-  * run "./configure.vc" (you can edit it to change the installation dir)
-  * run "make"
-  * run "make install"
-
-Then you'll have to tell MSVC where to find the headers and library
-files by adjusting the INCLUDE and LIB environment variables.  This
-can be done before starting the shell, in the "additional setup" step
-(see above).
-
-1.6 Readline library
+1.5 Readline library
 --------------------
 
 While not mandatory to compile Octave, the readline library is very
@@ -184,7 +164,7 @@
 variables.  Note that as Octave will be linked to the readline DLL,
 you should also add the path of readline.dll to your PATH variable.
 
-1.7 F2C
+1.6 F2C
 -------
 
 As there exist no free MSVC-like fortran compiler, the compilation
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -18,6 +18,8 @@
 
 # gnulib modules used by this package.
 gnulib_modules="
+  fnmatch
+  glob
   strftime
 "
 
--- a/common.mk
+++ b/common.mk
@@ -167,7 +167,6 @@
 
 FLIBS = @FLIBS@
 
-LIBGLOB = @LIBGLOB@
 LIBOCTINTERP = @LIBOCTINTERP@
 LIBOCTAVE = @LIBOCTAVE@
 LIBCRUFT = @LIBCRUFT@
@@ -535,7 +534,6 @@
   -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
   -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
   -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \
   -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
   -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
   -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \
--- a/configure.ac
+++ b/configure.ac
@@ -1406,7 +1406,6 @@
 AC_CHECK_HEADERS(termios.h, have_termios_h=yes)
 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no)
 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no)
-AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no)
 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no)
 AC_CHECK_HEADERS(conio.h, have_conio_h=yes, have_conio_h=no)
 
@@ -1429,23 +1428,6 @@
   AC_MSG_WARN([I couldn't find termios.h, termio.h, or sgtty.h!])
 fi
 
-LIBGLOB=
-AC_SUBST(LIBGLOB)
-if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then
-  AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, [
-    AC_CHECK_LIB(glob, fnmatch, [have_fnmatch=yes; LIBGLOB=-lglob],
-      have_fnmatch=no)])
-  AC_CHECK_FUNCS(glob, have_glob=yes, [
-    AC_CHECK_LIB(glob, glob, [have_glob=yes; LIBGLOB=-lglob],
-      have_glob=no)])
-
-  if test "$have_fnmatch" != yes || test "$have_glob" != yes; then
-    AC_MSG_ERROR([You are required to have fnmatch and glob])
-  fi
-else
-  AC_MSG_ERROR([You are required to have fnmatch.h and glob.h])
-fi
-
 ### Checks for functions and variables.
 
 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \
@@ -2163,7 +2145,6 @@
   C++ compiler:                $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS
   Fortran compiler:            $F77 $FFLAGS
   Fortran libraries:           $FLIBS
-  Glob libraries:              $LIBGLOB
   Lex libraries:               $LEXLIB
   LIBS:                        $LIBS
 
--- a/octave-bug.cc.in
+++ b/octave-bug.cc.in
@@ -99,7 +99,6 @@
   vars["RLD_FLAG"] = %OCTAVE_CONF_RLD_FLAG%;
   vars["LIBS"] = %OCTAVE_CONF_LIBS%;
   vars["LEXLIB"] = %OCTAVE_CONF_LEXLIB%;
-  vars["LIBGLOB"] = %OCTAVE_CONF_LIBGLOB%;
 
   vars["AMD_CPPFLAGS"] = %OCTAVE_CONF_AMD_CPPFLAGS%;
   vars["AMD_LDFLAGS"] = %OCTAVE_CONF_AMD_LDFLAGS%;
@@ -243,7 +242,6 @@
   os << "BLAS_LIBS:         " << vars["BLAS_LIBS"] << endl;
   os << "FFTW_LIBS:         " << vars["FFTW_LIBS"] << endl;
   os << "LEXLIB:            " << vars["LEXLIB"] << endl;
-  os << "LIBGLOB:           " << vars["LIBGLOB"] << endl;
   os << "LIBS:              " << vars["LIBS"] << endl;
   os << "AMD_CPPFLAGS:      " << vars["AMD_CPPFLAGS"] << endl;
   os << "AMD_LDFLAGS:       " << vars["AMD_LDFLAGS"] << endl;
--- a/octave-bug.in
+++ b/octave-bug.in
@@ -50,7 +50,6 @@
 LIBFLAGS=%OCTAVE_CONF_LIBFLAGS%
 RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%
 LEXLIB=%OCTAVE_CONF_LEXLIB%
-LIBGLOB=%OCTAVE_CONF_LIBGLOB%
 LIBS=%OCTAVE_CONF_LIBS%
 
 AMD_CPPFLAGS=%OCTAVE_CONF_AMD_CPPFLAGS%
@@ -304,7 +303,6 @@
 LIBFLAGS:          $LIBFLAGS
 RLD_FLAG:          $RLD_FLAG
 LEXLIB:            $LEXLIB
-LIBGLOB:           $LIBGLOB
 LIBS:              $LIBS
 AMD_CPPFLAGS:      $AMD_CPPFLAGS
 AMD_LDFLAGS:       $AMD_LDFLAGS