Re: Cannot build GD with autoconf 2.57

[email protected] (Nathan Vander Wilt)
Newsgroups php.gd.devel
Message-ID <[email protected]>
On Mar 27, 2007, at 11:01 AM, Nathan Vander Wilt wrote:

> I'm  trying to build GD (2.0.34 and 2.0.35RC1) on some old version  
> of RedHat or Fedora I'm forced to use at work.
>
> After running:
>   ./configure --prefix=/home/nvanderwilt/devlib/
> I run:
>   make
> which results in the following error:
>
> cd . && /bin/sh /home/nvanderwilt/gd-2.0.35RC1/config/missing --run  
> autoheader
> configure.ac:28: error: Autoconf version 2.58 or higher is required
> aclocal.m4:7856: AM_INIT_AUTOMAKE is expanded from...
> configure.ac:28: the top level
> autom4te: /usr/bin/m4 failed with exit status: 1
> autoheader: /usr/bin/autom4te failed with exit status: 1
> make: *** [config.hin] Error 1
>
>
> I'm rubbish when it comes to Makefiles and autoconf, but I found a  
> tip on a forum that suggested I try:
>   autoreconf -f -i
>
> which leads to several errors of "require version 1.7, but have 1.6.3"
>

In a stunning turn of events, I was able to get GD to compile, using  
that tip plus a little hacking on the "Makefile.am"s.

Starting with a fresh package:

STEP 1: (patch three Makefile.am files)
I first had to change "AUTOMAKE_OPTIONS = foreign 1.7" to  
"AUTOMAKE_OPTIONS = foreign 1.6" In these files:
Makefile.am
test/Makefile.am
config/Makefile.am

STEP 2: (run autoreconf and ignore its error)
then I ran:
autoreconf -f -i
...which still complained:
   configure.ac:29: `automake requires `AM_CONFIG_HEADER', not  
`AC_CONFIG_HEADER'
   autoreconf: automake failed with exit status: 1"

STEP 3: (business as usual)
but when I now run:
./configure --prefix=/home/nvanderwilt/devlib
make
make install

It works, hooray!!!

>
> Also, could the makefiles be fixed to be more compatible?

Why did my hack work?
It'd be great if someone who understands what I really did in steps 1  
and 2 would fix the package so that its not necessary to patch up the  
files and run autoreconf. I'm just a "script kiddie" when it comes to  
Makefiles, much less configure scripts and /automatic/ configure  
scripts.

thanks,
-natevw
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.