delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/21/22:35:42

From: pjfarley AT banet DOT net (Peter J. Farley III)
Newsgroups: comp.os.msdos.djgpp
Subject: Possible bug in auto(make|conf)?
Date: Mon, 22 Nov 1999 02:37:56 GMT
Message-ID: <3838a219.12573318@news3.banet.net>
X-Newsreader: Forte Free Agent 1.1/32.230
NNTP-Posting-Host: 32.100.112.64
X-Trace: 22 Nov 1999 02:35:50 GMT, 32.100.112.64
Organization: Global Network Services - Remote Access Mail & News Services
Lines: 175
X-Complaints-To: abuse AT prserv DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I just want to run this problem past the DJGPP guru's before I submit
it to the gnu-bug-utils folk.

Pasted below are sample makefile.am and configure.in files.  When I
try to set up the ".am" file to make an additional executable (using
"ln -s") for the DJGPP environment only, using the automake
AM_CONDITIONAL feature, I get error messages from automake and
erroneous results in the Makefile that results from running the
resulting configure script.

Specifically, the Makefile resulting from running these commands:

bash automake
bash autoconf
bash ./configure --prefix=$(DJGPP)

has lines in it with un-substituted prefixes "@DJGPP_TRUE@" and
"@DJGPP_FALSE@".  Needless to say, make doesn't like these lines at
all, and refuses to make anything.

Also, automake reports these errors when it is run:

G:\gnu\testam-1.0>bash automake
Makefile.am: testam_OBJECTS should not be defined
Makefile.am: variable `LDADD' not defined

Here are the versions I am currently running:

G:\gnu\testam-1.0>bash automake --version
automake (GNU automake) 1.4

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Written by Tom Tromey <tromey AT cygnus DOT com>

G:\gnu\testam-1.0>bash autoconf --version
Autoconf version 2.13

My apologies for the long message, but I hope that someone will see
something I have done wrong if I post at least some of the output
along with the input.  I've tried to cut down the lines in the
Makefile pasted below to just those around the ones that are in error.
I have a complete sample directory you can test for yourself, just
email me and I will send it in a zip file to you.

TIA for any help or errors you can spot.

<--------------Makefile.am--------------------->
if DJGPP
bin_PROGRAMS = testam gtestam
gtestam_SOURCES =
else
bin_PROGRAMS = testam
endif
info_TEXINFOS = testam.texi
testam_SOURCES = testam.c version.c
EXTRA_DIST = texinfo.tex

if DJGPP
gtestam: testam
	if test -n "${DJDIR}"; then cp -a testam gtestam; fi
	ln -s `echo testam|sed '$(transform)'` `echo gtestam|sed
'$(transform)'`
endif

DISTCLEANFILES = stamp-v version.c
version.c: stamp-v
stamp-v: Makefile
	rm -f t-version.c
	echo 'const char *version_string = "'GNU @PACKAGE@
@VERSION@'";' \
		> t-version.c
	if cmp -s version.c t-version.c; then	\
	  rm t-version.c;			\
	else					\
	  mv t-version.c version.c;		\
	fi
	echo testamstamp > $@
<--------------Makefile.am--------------------->

<--------------configure.in-------------------->
dnl Process this file with autoconf to produce a configure script.

dnl Set DJGPP conditional for Makefile.am
AM_CONDITIONAL(DJGPP, test x$DJGPP != x)

AC_INIT(testam.c)
VERSION=1.0
AC_SUBST(VERSION)
PACKAGE=testam
AC_SUBST(PACKAGE)

AC_ARG_PROGRAM

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h string.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL

AC_MSG_CHECKING(for struct timeval in sys/time.h)
AC_EGREP_HEADER(tv_usec, sys/time.h, have_tv=yes, have_tv=no)
AC_MSG_RESULT($have_tv)
test $have_tv = yes && AC_DEFINE(HAVE_TIMEVAL)

dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror)

AC_OUTPUT(Makefile)
<--------------configure.in-------------------->

<-------Erroneous lines from Makefile---------->
# Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.4 from Makefile.am

<Lines stripped for brevity>

SHELL = /bin/sh

srcdir = .
top_srcdir = .
prefix = $(DJGPP)
exec_prefix = ${prefix}

<Lines snipped for brevity>

PACKAGE = testam
VERSION = 1.0
@DJGPP_TRUE AT bin_PROGRAMS = testam gtestam
@DJGPP_FALSE AT bin_PROGRAMS = testam
@DJGPP_TRUE AT gtestam_SOURCES =
info_TEXINFOS = testam.texi
testam_SOURCES = testam.c version.c
EXTRA_DIST = texinfo.tex

<More lines snipped for brevity>

@DJGPP_TRUE AT gtestam: testam
@DJGPP_TRUE@	if test -n "${DJDIR}"; then cp -a testam gtestam; fi
@DJGPP_TRUE@	ln -s `echo testam|sed '$(transform)'` `echo
gtestam|sed '$(transform)'`
version.c: stamp-v
stamp-v: Makefile
	rm -f t-version.c
	echo 'const char *version_string = "'GNU testam 1.0'";' \
		> t-version.c
	if cmp -s version.c t-version.c; then	\
	  rm t-version.c;			\
	else					\
	  mv t-version.c version.c;		\
	fi
	echo testamstamp > $@

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<-------Erroneous lines from Makefile---------->


----------------------------------------------------
Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR
                     pjfarley AT nospam DOT banet DOT net)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019