From b5df1c816a6b429c8c07795a8759844e9e0d73a7 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 8 May 2001 20:53:25 +0000 Subject: [PATCH] move fnmatch.c and dirent.c to libQFutil --- configure.in | 11 +++++++++++ libs/util/Makefile.am | 11 ++++++++++- nq/source/Makefile.am | 2 +- qw/source/Makefile.am | 4 ++-- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 435292418..dec24187f 100644 --- a/configure.in +++ b/configure.in @@ -158,6 +158,17 @@ else AC_C_BIGENDIAN fi +AC_MSG_CHECKING(for fnmatch) +AC_TRY_LINK( + [], + [fnmatch();], + BUILD_FNMATCH=no + AC_MSG_RESULT(yes), + BUILD_FNMATCH=yes + AC_MSG_RESULT(no) +) +AM_CONDITIONAL(BUILD_FNMATCH, test "$BUILD_FNMATCH" = "yes") + AC_MSG_CHECKING(for fnmatch in fnmatch.h) AC_TRY_COMPILE( [#include "fnmatch.h"], diff --git a/libs/util/Makefile.am b/libs/util/Makefile.am index 6cad62ad3..3c312a51b 100644 --- a/libs/util/Makefile.am +++ b/libs/util/Makefile.am @@ -2,12 +2,21 @@ INCLUDES= -I$(top_srcdir)/include lib_LTLIBRARIES = libQFutil.la +if BUILD_FNMATCH +fnmatch_SRC = fnmatch.c dirent.c +else +fnmatch_SRC = +endif + libQFutil_la_LDFLAGS = -version-info 1:0:0 $(Z_LIBS) $(DL_LIBS) libQFutil_la_SOURCES = \ checksum.c cmd.c console.c con_print.c crc.c cvar.c hash.c \ info.c link.c math.S \ mathlib.c \ mdfour.c msg.c plugin.c qargs.c qendian.c qfplist.c quakefs.c \ - quakeio.c sizebuf.c sys.c sys_error.c va.c ver_check.c zone.c + quakeio.c sizebuf.c sys.c sys_error.c va.c ver_check.c zone.c \ + $(fnmatch_SRC) LIBLIST = libQFutil.la @LIBRARY_SEARCH_PATH@ + +EXTRA_DIST = fnmatch.c dirent.c diff --git a/nq/source/Makefile.am b/nq/source/Makefile.am index 6eee7fd8f..bac8f8003 100644 --- a/nq/source/Makefile.am +++ b/nq/source/Makefile.am @@ -157,7 +157,7 @@ nq_server_DEPENDENCIES= libqfnet.a # Stuff that doesn't get linked into an executable NEEDS to be mentioned here, # or it won't be distributed with 'make dist' -EXTRA_DIST= #nq.dsp dirent.c fnmatch.c sys_unix.c sys_win.c +EXTRA_DIST= #nq.dsp sys_unix.c sys_win.c # Kill the temp files, hopefully. CLEANFILES = *.i *.s $(YACCLEX_CLEANFILES) diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index db7b70e4f..2329ea342 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -58,7 +58,7 @@ EXTRA_libqfnet_a_SOURCES= net_chan.c net_udp.c net_udp6.c # # ... System type if SYSTYPE_WIN32 -syssv_SRC= fnmatch.c dirent.c sv_sys_win.c +syssv_SRC= sv_sys_win.c else syssv_SRC= sv_sys_unix.c endif @@ -78,7 +78,7 @@ qw_server_DEPENDENCIES= libqfnet.a # # ... System type if SYSTYPE_WIN32 -syscl_SRC= cl_sys_win.c fnmatch.c dirent.c +syscl_SRC= cl_sys_win.c else syscl_SRC= cl_sys_unix.c endif