problem with using automake - pls help.



Hi, I tried to compile a project (in C) using automate14, autoconf256, and autoheader256, I have trouble using this 3 tools to build my project in 6.2 Beta2.
The content of Makefile.am is shown below:
## Process this file with automake to produce Makefile.in
# Dive in and do what these dirs tell you.
SUBDIRS = lib src man etc

configure.in:

AC_INIT(nkeepalive, 1.0)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(include/settings.h)

AC_SUBST(VERSION)

ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)

AC_CANONICAL_HOST

dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Flex will soon be needed to build fully reentrant parsers with Bison
AM_PROG_LEX

dnl Add _GNU_SOURCE to enable features and activate legacy API.
CFLAGS="${CFLAGS} -D_GNU_SOURCE"

dnl Here is a check for GCC which sets all necessary flags, most notably
dnl CFLAGS and CXXFLAGS. Checks for other compilers should do the same.
if test "$GCC" = "yes" ; then
# set GCC compiler options that should work with all versions
CFLAGS="${CFLAGS} -Wall -pedantic -fpic -Wno-long-long"
SHAREDLIB_LDFLAGS="-shared ${SHAREDLIB_LDFLAGS}"
DEPEND_CCFLAGS="-MM"

# -std=c99 is only supported in later releases of GCC and causes
# Linux headers to go into strict ANSI mode, dropping non-ANSI functions
# so we have to fall back to -std=gnu99 if c99 doesn't work
save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -std=c99 -Werror-implicit-function-declaration"
AC_MSG_CHECKING([whether GNU cc -std=c99 option works])
AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include <string.h> char *a; a = strdup("foo");]])],
AC_MSG_RESULT([yes]) ; CFLAGS="$save_CFLAGS -std=c99",
AC_MSG_RESULT([no])
CFLAGS="$save_CFLAGS -std=gnu99 -Werror-implicit-function-declaration"
AC_MSG_CHECKING([whether GNU cc -std=gnu99 option works])
AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include <string.h> char *a; a = strdup("foo");]]) ],
AC_MSG_RESULT([yes]) ; CFLAGS="$save_CFLAGS -std=gnu99",
AC_MSG_RESULT([no]) ; CFLAGS="$save_CFLAGS"))

# Override autoconf default addition of -O2 and let the
# --enable-optimizer-flags decide whether to set it or not
OPTIMIZER_CFLAGS="-O2"
OPTIMIZER_CXXFLAGS="-O2"
CFLAGS=`echo ${CFLAGS} | sed 's/-O2//'`
CXXFLAGS=`echo ${CXXFLAGS} | sed 's/-O2//'`
fi

dnl Checks for libraries.
AC_PROG_RANLIB

dnl XXX - These should be removed ASAP! /Joachim
AC_DEFINE(MAXDATASIZE, 4091, [I am a hack, please send patch to remove me.])
AC_DEFINE(MAXLEN, 256, [I am a hack, please send patch to remove me.])


dnl Create all the makefiles and stuff
AC_OUTPUT([
Makefile
lib/Makefile
src/Makefile
etc/Makefile
man/Makefile
])

Now......
Here is the error I got:

#automake14
aclocal.m4: 426: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.in: required file `./mkinstalldirs' not found
automake: Makefile.am: required file `./INSTALL' not found
automake: Makefile.am: required file `./NEWS' not found
automake: Makefile.am: required file `./README' not found
automake: Makefile.am: required file `./COPYING' not found
automake: Makefile.am: required file `./AUTHORS' not found
automake: Makefile.am: required file `./ChangeLog' not found
configure.in: 426: required file `./$@)].in' not found
automake: lib/Makefile.am: not supported: source file `conf/conf.c' is in subdirectory
automake: lib/Makefile.am: not supported: source file `conf/parser.y' is in subdirectory
automake: lib/Makefile.am: not supported: source file `conf/tokens.l' is in subdirectory
automake: lib/Makefile.am: not supported: source file `../include/conf.h' is in subdirectory
automake: lib/Makefile.am: not supported: source file `../include/getopt.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/config.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/daemon.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/lock.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/log.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/process.h' is in subdirectory
automake: src/Makefile.am: not supported: source file `../include/settings.h.in' is in subdirectory

I followed the instruction from
http://www.seul.org/docs/autotut/

what is 426: required file ./$@)].in not found in the above error message? How can I correct the error?

Your suggestion is greatly appreciated.

Thanks
S
.



Relevant Pages

  • Re: [SLE] Automake ...
    ... There's a nice book called GNU Autoconf, Automake and Libtool that goes ... dnl Checks for programs. ... dnl Checks for libraries. ... pkginclude_HEADERS = $ ...
    (SuSE)
  • irda_obex compile problem. Linuxt RedHat 9.
    ... please specify them on the ./autogen.sh command ... autoheader: error: AC_CONFIG_HEADERS not found in configure.in ... required file `./README' not found ... configure.in:6: old Automake version. ...
    (comp.os.linux.networking)
  • autoconf213 or autoconf257
    ... During the process of installing ACE+TAO from the Ports, ... of autoconf is 257, 213 is a way behind the latest version. ... automake: configure.in: `PACKAGE' not defined in `configure.in' ... automake: configure.in: required file `./mkinstalldirs' not found ...
    (comp.unix.bsd.freebsd.misc)
  • auto error: files left in build directory after distclean
    ... i am learning autoconf/autocheck, followed the documentation found on the net i ... | dnl Process this file with autoconf to produce a configure script. ... | ## Process this file with automake to produce Makefile.in ... Kiss me as if it were the last time. ...
    (comp.os.linux.development.apps)
  • ncurses-devel Compile Problem
    ... I am trying to compile the "test" applications for ncurses on RHEL 3, ... automake 1.6.3 ... required file `./mkinstalldirs' not found ...
    (RedHat)