From xemacs-m  Sun Jan  5 03:13:54 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id DAA11003 for <xemacs-beta@xemacs.org>; Sun, 5 Jan 1997 03:13:53 -0600 (CST)
Received: (from steve@localhost)
          by altair.xemacs.org (8.8.4/8.8.4)
	  id BAA05832; Sun, 5 Jan 1997 01:24:07 -0800
Sender: steve@xemacs.org
To: xemacs-beta@xemacs.org
Subject: I'm a bonehead (part 2 of 2) (was Re: configure bug on AIX)
References: <y9lu3oyo9bc.fsf@modas.informatik.uni-tuebingen.de>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: sperber@informatik.uni-tuebingen.de's message of 03 Jan 1997 20:19:51 +0100
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII
Date: 05 Jan 1997 01:24:05 -0800
Message-ID: <m2ybe8xyoa.fsf@altair.xemacs.org>
Lines: 136
X-Mailer: Red Gnus v0.72/XEmacs 20.0

>>>>> "Michael" == Michael Sperber [Mr Preprocessor] <sperber@informatik.uni-tuebingen.de> writes:

Michael> Nag, nag ...

Michael> Why hasn't Martin's fix for the slashification fuckage made it in yet?

I haven't run autoconf since patching configure.in for 19.15 either,
so here's the corresponding patch for 19.15 configure, but I think it
should already be correct for this problem.

Index: configure
===================================================================
RCS file: /usr/local/xemacs/xemacs-19.15/configure,v
retrieving revision 1.3
diff -u -r1.3 configure
--- configure	1996/12/29 00:14:42	1.3
+++ configure	1997/01/05 09:05:51
@@ -1532,6 +1532,20 @@
 ### Eric Raymond says we should accept strings like "sysvr4" to mean
 ### "System V Release 4"; he writes, "The old convention encouraged
 ### confusion between `system' and `release' levels'."
+###
+### We rely on cpp to generate makefiles from Makefile.in.in templates.
+### There is at least one drawback to that. Since cpp generally has
+### built-in macro definitions like `#define unix' or `#define i386',
+### we must be careful to prevent it from substituting these occurences
+### in certain places in the makefiles. Pathnames for architecture-
+### specific files come to mind.
+### This is where CPPFLAGS_MAKEFILEGEN comes in. We try to selectively
+### disable (potentially) predefined macros that we find to be part of
+### the configuration string. 
+### This is but a poor method to help us fight off cpp, but it covers
+### those cases that used to bite me. <mdiers@logware.de>
+
+CPPFLAGS_MAKEFILEGEN=""  # we normally do not need any extra flags
 
 machine='' opsys='' unported=no need_dynodump=no
 case "${canonical}" in
@@ -1808,13 +1822,13 @@
     machine=hp800 opsys=hpux NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux8*shr* )
-    machine=hp800 opsys=hpux8-shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
+    machine=hp800 opsys=hpux8*shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux8* )
     machine=hp800 opsys=hpux8 NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux9*shr* )
-    machine=hp800 opsys=hpux9-shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
+    machine=hp800 opsys=hpux9*shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux9* )
     machine=hp800 opsys=hpux9 NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
@@ -2260,6 +2274,7 @@
   ## Intel 386 machines where we don't care about the manufacturer
   i[3-9]86-*-* )
     machine=intel386
+    CPPFLAGS_MAKEFILEGEN="${CPPFLAGS_MAKEFILEGEN} -Ui386"
     case "${canonical}" in
       *-isc1.* | *-isc2.[01]* )	opsys=386-ix ;;
       *-isc2.2* )		opsys=isc2-2 ;;
@@ -2290,8 +2305,8 @@
 		else
 			NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
 		fi ;;
-      *-386bsd* )	        opsys=386bsd ;;
-      *-freebsd* )		opsys=freebsd ;;
+      *-386bsd* )               opsys=386bsd ;;
+      *-freebsd* )              opsys=freebsd ;;
       *-nextstep* )		opsys=nextstep ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac
@@ -2544,8 +2559,9 @@
 #### Some systems specify a CPP to use unless we are using GCC.
 #### Now that we know whether we are using GCC, we can decide whether
 #### to use that one.
-if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ]
-then true
+
+if [ "x$GCC" = x1 ] || [ "x$NON_GNU_CPP" = x ] ; then
+  true
 else
   if [ "x$CPP" = x ]; then
     if [ "${with_lcc}" = "yes" ] && [ "${NON_GNU_CPP}" = "yes" ] ; then
@@ -8496,7 +8512,7 @@
 ( cd ./src;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
@@ -8513,7 +8529,7 @@
 ( cd ./lwlib;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
@@ -8530,7 +8546,7 @@
 ( cd ./lib-src;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
@@ -8547,7 +8563,7 @@
 ( cd ./dynodump;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
@@ -8565,7 +8581,7 @@
 ( cd ./lwlib/energize;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"That Bill Clinton.  He probably doesn't know how to log on to the
Internet."  -- Rush Limbaugh, noted Computer Expert

