LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   cannot compile my program anymore (autotools, gnu make) (https://www.linuxquestions.org/questions/programming-9/cannot-compile-my-program-anymore-autotools-gnu-make-349701/)

sterrenkijker 08-03-2005 03:52 PM

cannot compile my program anymore (autotools, gnu make)
 
Hi everybody,

I am writing a program in C, using autotools and stuff. I reinstalled my OS (Debian Sarge), and continued programming. At first everything was fine, but when I did
Code:

aclocal && autoconf && automake
I got the following message:
Code:

configure.ac: 4: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.ac: required file `./config.guess' not found
automake: configure.ac: required file `./config.sub' not found

When I do "./configure && make" everything is fine, but "make dist" doesn't work anymore:
Code:

corien@sarge:~/redcat/redcat$ make dist
rm -rf redcat-0.0.1alfa14
mkdir redcat-0.0.1alfa14
chmod 777 redcat-0.0.1alfa14
here=`cd . && pwd`; \
top_distdir=`cd redcat-0.0.1alfa14 && pwd`; \
distdir=`cd redcat-0.0.1alfa14 && pwd`; \
cd . \
  && automake-1.4 --include-deps --build-dir=$here --srcdir-name=. --output-dir=$top_distdir --gnu Makefile
configure.ac: 4: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.ac: required file `./config.guess' not found
automake: configure.ac: required file `./config.sub' not found
make: *** [distdir] Fout 1

The required files indeed don't exist, but they used to be there. Does anyone know how to solve this problem?

Thanks,

Corien

bigapple 08-05-2005 03:49 AM

hi,
Step 1: you should make sure that the following packages be installed on your box correctly.
there are :
1. GNU Automake
2. GNU Autoconf
3. GNU m4
4. perl
5. GNU Libtool
(you can use rpm -q packagename to confirm it)
Step 2 As I know, to use the auto tools chian,first you should run
autoscan
after the running,a file named "configure.scan" would be generated in the current directory.you must modify the file to specify the project name and some else, following is an example:
Code:

AC_INIT(hello.c)
AM_INIT_AUTOMAKE(hello, 1.0)
dnl Checks for programs.
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler ch aracteristics.
dnl Checks for library functions.
AC_OUTPUT(Makefile)

Step 3:
Run aclocal and autoconf,then the file "aclocal.m4 " and "configure" would be generated.
Step 4:
vi a file named "Makefile.am" contains the following text:
Code:

AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c

Step 5:run automake --add-missing
Last:you can run ./configure and make to continue

This is just a demo to use auto tools china,and the hello.c file just contain the printf function.I have test it successful on
my Suse box and AIX box.To konw more detail ,you can view some more Documents

Hko 08-05-2005 07:59 AM

Quote:

I am writing a program in C, using autotools and stuff. I reinstalled my OS (Debian Sarge), and continued programming.
The problem is a that a newer version of autoconf (and automake?) was installed by default. The newer autoconf (v2.5x) is not compatible with the older one (v.2.1x).

Either update your configure.in to configure.ac for the newer autoconf, or install the debian-sarge package called "autoconf2.13" and read the debian-doc's on how to use it.

Quoted the description of "autoconf2.13" below:
Quote:

Package: autoconf2.13
Description: automatic configure script builder (obsolete version)
Obsolete compatibility package of Autoconf 2.13. For use only with
packages that cannot easily be updated to use Autoconf 2.50+.
.
This package provides compatibility wrappers for autoconf,
autoheader, and autoreconf that attempt to automatically choose which
version of Autoconf to use, based on some simple heuristics. For
information on these heuristics or how to force use of a particular
Autoconf version, see /usr/share/doc/autoconf2.13/README.Debian.gz.
Don't forget to check "automake" for the same issue.

sterrenkijker 08-06-2005 12:02 PM

Thanks for your replies. "automake --add-missing" seemed to solve the problem. I'm an autotools fool :).

adrianmak 08-19-2005 04:48 AM

does it mean that the automake version is outdated ?

umeshg666 07-27-2006 04:52 AM

Hi every body,

Please could u help me to find a freeware linux install builder tool to install 4 packages of my application in the path specified by the user.


All times are GMT -5. The time now is 08:34 PM.