From 96f81b69b8b06072560b56156179b8ebedc09d4b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 2 Aug 2002 19:03:16 +0000 Subject: [PATCH] start using macros the clean up the mess --- acinclude.m4 | 9 ++++++++ configure.ac | 58 ++++++++++++++++++++++------------------------------ 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 8093b210d..5833296d2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1105,3 +1105,12 @@ else fi ]) + +AC_DEFUN(QF_DEPS, [ +$1_INCS='$2' +$1_DEPS='$3' +$1_LIBS='$3 $4 ' +AC_SUBST($1_INCS) +AC_SUBST($1_DEPS) +AC_SUBST($1_LIBS) +]) diff --git a/configure.ac b/configure.ac index ec78df438..211e87c06 100644 --- a/configure.ac +++ b/configure.ac @@ -1926,40 +1926,32 @@ AC_SUBST(VID_TARGETS) AC_SUBST(plugin_ldflags) AC_SUBST(plugin_libadd) -QFCC_DEPS='$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la' -QFCC_LIBS="${QFCC_DEPS} "'$(WIN32_LIBS)' -QFCC_INCS='-I$(top_srcdir)/tools/qfcc/include' -AC_SUBST(QFCC_LIBS) -AC_SUBST(QFCC_DEPS) -AC_SUBST(QFCC_INCS) - -QFPROGS_DEPS='$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la' -QFPROGS_LIBS="${QFPROGS_DEPS} "'$(WIN32_LIBS)' -QFPROGS_INCS='-I$(top_srcdir)/tools/qfprogs/include' -AC_SUBST(QFPROGS_LIBS) -AC_SUBST(QFPROGS_DEPS) -AC_SUBST(QFPROGS_INCS) - -QWAQ_DEPS='$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la' -QWAQ_LIBS="${QWAQ_DEPS} "'$(WIN32_LIBS)' -QWAQ_INCS='' -AC_SUBST(QWAQ_LIBS) -AC_SUBST(QWAQ_DEPS) -AC_SUBST(QWAQ_INCS) - -PAK_DEPS='$(top_builddir)/libs/util/libQFutil.la' -PAK_LIBS="${PAK_DEPS} "'$(WIN32_LIBS)' -PAK_INCS="" -AC_SUBST(PAK_LIBS) -AC_SUBST(PAK_DEPS) -AC_SUBST(PAK_INCS) - -WAV_DEPS='$(top_builddir)/libs/util/libQFutil.la' -WAV_LIBS="${WAV_DEPS} "'$(WIN32_LIBS)' +QF_DEPS(QFCC, + [-I$(top_srcdir)/tools/qfcc/include], + [$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la], + [$(WIN32_LIBS)], +) +QF_DEPS(QFPROGS, + [-I$(top_srcdir)/tools/qfprogs/include], + [$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la], + [$(WIN32_LIBS)], +) +QF_DEPS(QWAQ, + [], + [$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la], + [$(WIN32_LIBS)], +) +QF_DEPS(PAK, + [], + [$(top_builddir)/libs/util/libQFutil.la], + [$(WIN32_LIBS)], +) +QF_DEPS(WAV, + [], + [$(top_builddir)/libs/util/libQFutil.la], + [$(WIN32_LIBS)], +) WAV_INCS="" -AC_SUBST(WAV_LIBS) -AC_SUBST(WAV_DEPS) -AC_SUBST(WAV_INCS) AC_DEFINE_UNQUOTED(PATH_SEPARATOR, '/', [Define this to your operating system's path separator character]) AC_DEFINE_UNQUOTED(CPP_NAME, "$CPP_NAME", [Define this to the command line for the C preprocessor])