From 080a46469fa3a8ae0d9403212e4631b7293949a9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 4 Jun 2002 20:43:11 +0000 Subject: [PATCH] fix CPP_NAME for independently built qfcc --- tools/qfcc/configure.in | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/qfcc/configure.in b/tools/qfcc/configure.in index 789b30993..21934d623 100644 --- a/tools/qfcc/configure.in +++ b/tools/qfcc/configure.in @@ -23,9 +23,23 @@ AC_PROG_CPP AC_PROG_YACC AM_PROG_LEX -CPP_NAME=$ac_cv_prog_CPP -AC_DEFINE_UNQUOTED(CPP_NAME, "$CPP_NAME", - [Define this to the command line for the C preprocessor]) +AC_ARG_WITH(cpp, +[ --with-cpp=CPP how qfcc should invoke cpp], + cpp_name="$withval", cpp_name=auto +) +if test "x$cpp_name" != xauto; then + CPP_NAME="$cpp_name" +else + CPP_NAME="cpp %d -o %o %i" + case "$target_os" in + *bsd*) + touch conftest.c + CPP_NAME="`(f=\`$CC -v -E -Dfoo conftest.c -o conftest.i 2>&1 | grep -e -Dfoo\`; set $f; echo "$1")` %d %i %o" + rm -f conftest.[ci] + ;; + esac +fi +AC_DEFINE_UNQUOTED(CPP_NAME, "$CPP_NAME", [Define this to the command line for the C preprocessor]) dnl We want warnings, lots of warnings... if test "x$GCC" = xyes; then