Advertisement

Autotools giving me hell...

Started by May 17, 2004 12:47 AM
2 comments, last by Doc 20 years, 4 months ago
So I'm trying to package up Donkey PAC for Linux for graveyardfiller, and I've come across a problem with my configure script generated by the autoconf tools. It seems buggy, and I have no idea why. It spews this:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.4... yes
checking for main in -lSDL_mixer... yes
checking for main in -lSDL_ttf... yes
checking for main in -lSDL_image... yes
./configure: line 4285: syntax error near unexpected token `('
./configure: line 4285: `  echo $ECHO_N "(cached) $ECHO_C" >&6'
Note the last two lines. It seems the shell is trying to interpret the parentheses, but I shouldn't be. Perhaps my debs are buggy? configure.ac is this:

# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([donkeypac], [1], [an address goes here])

AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR([source/main.cpp])
AC_CONFIG_HEADER([config.h])

AC_ARG_ENABLE(fullscreen, AC_HELP_STRING([--enable-fullscreen],
[Use fullscreen instead of windowed mode (may lose your pointer)]),
[CXXFLAGS="$CXXFLAGS -DFULLSCREEN=1"])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB

# Checks for libraries.
SDL_VERSION="1.2.4"
AM_PATH_SDL($SDL_VERSION, 
         :,
         AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 
)

AC_CHECK_LIB([SDL_mixer], [main],
         LIBS="$LIBS -lSDL_mixer",
         AC_MSG_ERROR([*** SDL_mixer library not found!])
)

AC_CHECK_LIB([SDL_ttf], [main],
         LIBS="$LIBS -lSDL_ttf",
         AC_MSG_ERROR([*** SDL_ttf library not found!])
)

AC_CHECK_LIB([SDL_image], [main],
         LIBS="$LIBS -lSDL_image,
         AC_MSG_ERROR([*** SDL_image library not found!])
)

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([atexit])

AC_CONFIG_FILES([Makefile
                source/Makefile])
AC_OUTPUT
(A mixture of autoscan and my own additions. I think it should work.) Any ideas would be helpful. Image loads when I'm online.The following statement is true. The previous statement is false.
Shameless promotion:
FreePop: The GPL Populous II clone. [edited by - Doc on May 17, 2004 2:06:27 AM]
My stuff.Shameless promotion: FreePop: The GPL god-sim.
You''re missing a quotation mark on the line with LIBS="$LIBS -lSDL_image,.

Advertisement
Aagg. Looks like that was it. Thanks N&V.

Boy, one little omission and the whole thing pukes. Surely a test for end-of-file within quote would be a good idea....
My stuff.Shameless promotion: FreePop: The GPL god-sim.
M4 is just a macro language, it isn''t particularly intelligent as it doesn''t know much about what''s being run through it.

This topic is closed to new replies.

Advertisement