* 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-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
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
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
case ${target} in
*-*-linux-gnu*)
cat >>e${EMULATION_NAME}.c <<EOF
+#ifdef HAVE_GLOB
#include <glob.h>
+#endif
EOF
;;
esac
const char *pattern)
{
char *newp = NULL;
+#ifdef HAVE_GLOB
glob_t gl;
+#endif
if (pattern[0] != '/')
{
pattern = newp;
}
+#ifdef HAVE_GLOB
if (glob (pattern, 0, NULL, &gl) == 0)
{
size_t i;
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);