* yasm.c: Conditionally include libgen.h for dirname() definition.
* yasm-module.c: Conditionally include libgen.h for basename() definition.
svn path=/trunk/yasm/; revision=1164
#
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([alloca.h limits.h sys/cdefs.h sys/ipc.h sys/msg.h sys/param.h sys/types.h sys/queue.h unistd.h])
+AC_CHECK_HEADERS([alloca.h limits.h sys/cdefs.h sys/ipc.h sys/msg.h sys/param.h sys/types.h sys/queue.h unistd.h libgen.h])
# REQUIRE standard C headers
if test "$ac_cv_header_stdc" != yes; then
#include <libyasm/compat-queue.h>
#include <libyasm.h>
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
#include "ltdl.h"
#include "yasm-module.h"
-extern char *basename(const char *path);
-
extern const lt_dlsymlist lt_preloaded_symbols[];
typedef struct module {
#include <libyasm/bitvect.h>
#include <libyasm.h>
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
#ifndef WIN32
#include "ltdl.h"
#endif
#endif
#ifndef WIN32
-extern char *dirname(const char *path);
-
extern const lt_dlsymlist lt_preloaded_symbols[];
#endif