public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: M4 problems
@ 1998-04-13  6:43 Krister Walfridsson
  1998-04-14 13:21 ` Jeffrey A Law
  0 siblings, 1 reply; 7+ messages in thread
From: Krister Walfridsson @ 1998-04-13  6:43 UTC (permalink / raw)
  To: egcs

Here are the changes needed to handle M4 the same way as YACC
and LEX.

   /Krister



Mon Apr 13 15:20:40 1998  Krister Walfridsson <cato@df.lth.se>

        * configure: Define DEFAULT_M4 by searching PATH.
        * Makfile.in: Use DEFAULT_M4.


*** configure.old	Fri Apr 10 19:36:19 1998
--- configure	Mon Apr 13 15:05:50 1998
***************
*** 762,767 ****
--- 762,786 ----
    test -n "$DEFAULT_YACC" && break
  done
  
+ # Generate a default definition for M4.  This is used if the makefile can't
+ # locate m4 in objdir.
+ 
+ for prog in gm4 gnum4 m4
+ do
+   set dummy $prog; tmp=$2
+   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
+   for dir in $PATH; do
+     test -z "$dir" && dir=.
+     if test -f $dir/$tmp; then
+       DEFAULT_M4="$prog"
+       break
+     fi
+   done
+   IFS="$save_ifs"
+ 
+   test -n "$DEFAULT_M4" && break
+ done
+ 
  # Generate a default definition for LEX.  This is used if the makefile can't
  # locate flex in objdir.
  
***************
*** 1259,1264 ****
--- 1278,1284 ----
                      -e "s|^tooldir[ 	]*=.*$|tooldir = ${tooldir}|" \
  		    -e "s:^DEFAULT_YACC[	 ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
  		    -e "s:^DEFAULT_LEX[	 ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
+ 		    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
                      ${subdir}/Makefile.tem >> ${Makefile}
  
  	    # If this is a Canadian Cross, preset the values of many more





*** Makefile.in.old	Mon Apr 13 13:29:20 1998
--- Makefile.in	Mon Apr 13 14:56:17 1998
***************
*** 100,105 ****
--- 100,106 ----
  # These values are substituted by configure.
  DEFAULT_YACC = yacc
  DEFAULT_LEX = lex
+ DEFAULT_M4 = m4
  
  BISON = `if [ -f $$r/bison/bison ] ; then \
  	    echo $$r/bison/bison -L $$s/bison/ ; \
***************
*** 121,127 ****
  
  M4 = `if [ -f $$r/m4/m4 ] ; \
  	then echo $$r/m4/m4 ; \
! 	else echo m4 ; fi`
  
  MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
  	then echo $$r/texinfo/makeinfo/makeinfo ; \
--- 122,128 ----
  
  M4 = `if [ -f $$r/m4/m4 ] ; \
  	then echo $$r/m4/m4 ; \
! 	else echo ${DEFAULT_M4} ; fi`
  
  MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
  	then echo $$r/texinfo/makeinfo/makeinfo ; \


^ permalink raw reply	[flat|nested] 7+ messages in thread
* M4 problems
@ 1998-04-04 14:20 Krister Walfridsson
  1998-04-05 10:02 ` Ian Lance Taylor
  1998-04-05 17:27 ` Jeffrey A Law
  0 siblings, 2 replies; 7+ messages in thread
From: Krister Walfridsson @ 1998-04-04 14:20 UTC (permalink / raw)
  To: egcs

Are there any good reason we define M4 in the egcs/Makefile?

The reason I don't like it is that I get errors from autoconf that I 
need GNU m4, but autoconf is generally smart enough to find my GNU m4
(which in NetBSD normlly lives in /usr/pkg/bin and is called gm4) unless
M4 is defined. And we doesn't use M4 anywhere as far I can see.

I suggest we remove the M4 definition (or is it better to do some magic 
with autoconf to see if we can find any GNU m4?)

   /Krister




Sat Apr  4 20:05:15 1998  Krister Walfridsson (cato@df.lth.se)

        * Makefile.in: Removed M4 definition.


*** Makefile.in.old     Tue Mar 31 19:35:23 1998
--- Makefile.in Sat Apr  4 20:03:13 1998
***************
*** 119,128 ****
        then echo $$r/flex/flex ; \
        else echo ${DEFAULT_LEX} ; fi`
  
- M4 = `if [ -f $$r/m4/m4 ] ; \
-       then echo $$r/m4/m4 ; \
-       else echo m4 ; fi`
- 
  MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
        then echo $$r/texinfo/makeinfo/makeinfo ; \
        else echo makeinfo ; fi`
--- 119,124 ----



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-04-14 13:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-13  6:43 M4 problems Krister Walfridsson
1998-04-14 13:21 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1998-04-04 14:20 Krister Walfridsson
1998-04-05 10:02 ` Ian Lance Taylor
1998-04-05 17:27 ` Jeffrey A Law
1998-04-06  3:15   ` Richard Earnshaw
1998-04-06  8:26     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).