* configure.in (AC_CHECK_FUNCS): Add glob.
authorMark Mitchell <mark@codesourcery.com>
Wed, 16 Feb 2005 07:49:26 +0000 (07:49 +0000)
committerMark Mitchell <mark@codesourcery.com>
Wed, 16 Feb 2005 07:49:26 +0000 (07:49 +0000)
* configure: Regenerated.
* emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
not defined.
(gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
if HAVE_GLOB is not defined.

ld/ChangeLog
ld/configure
ld/configure.in
ld/emultempl/elf32.em

index 7138eda17dbef5c0b3c6d5091985d05806b8f1c9..3b2159b35b19417209eee14855238aef56dac7f2 100644 (file)
@@ -1,3 +1,12 @@
+2005-02-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * configure.in (AC_CHECK_FUNCS): Add glob.
+       * configure: Regenerated.
+       * emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
+       not defined.
+       (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
+       if HAVE_GLOB is not defined.
+       
 2005-02-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define
index a79adf38a84d5e95a6e1ec7027a76af2d51f3249..5ccd435d174adb2cba06ea708fa41defdf33d6bb 100755 (executable)
@@ -4635,7 +4635,7 @@ else
 fi
 done
 
-for ac_func in sbrk realpath
+for ac_func in sbrk realpath glob
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:4642: checking for $ac_func" >&5
index 28665eac25c25fc5b48275bfcc05ff81ebc57029..8b8354d1a11d7dd2cb0093ea61e0119f1d1b8ef8 100644 (file)
@@ -119,7 +119,7 @@ AC_SUBST(HOSTING_LIBS)
 AC_SUBST(NATIVE_LIB_DIRS)
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
-AC_CHECK_FUNCS(sbrk realpath)
+AC_CHECK_FUNCS(sbrk realpath glob)
 AC_HEADER_DIRENT
 
 BFD_BINARY_FOPEN
index 886c7a44a955f680ea9403fc86129323d3f16b42..5337e1814e407f8874f0a309972a6f1a4c0b7149 100644 (file)
@@ -67,7 +67,9 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then
   case ${target} in
     *-*-linux-gnu*)
   cat >>e${EMULATION_NAME}.c <<EOF
+#ifdef HAVE_GLOB
 #include <glob.h>
+#endif
 EOF
     ;;
   esac
@@ -539,7 +541,9 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include
       const char *pattern)
 {
   char *newp = NULL;
+#ifdef HAVE_GLOB
   glob_t gl;
+#endif
 
   if (pattern[0] != '/')
     {
@@ -552,6 +556,7 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include
       pattern = newp;
     }
 
+#ifdef HAVE_GLOB
   if (glob (pattern, 0, NULL, &gl) == 0)
     {
       size_t i;
@@ -560,6 +565,10 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include
        gld${EMULATION_NAME}_parse_ld_so_conf (info, gl.gl_pathv[i]);
       globfree (&gl);
     }
+#else
+  /* If we do not have glob, treat the pattern as a literal filename.  */
+  gld${EMULATION_NAME}_parse_ld_so_conf (info, pattern);
+#endif
 
   if (newp)
     free (newp);