This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: SDL, automake, autoconf
- From: Assar Westerlund <assar at kth dot se>
- To: Mattias Brändström <brasse at ludd dot luth dot se>
- Cc: automake at gnu dot org
- Date: 29 May 2003 17:46:13 -0400
- Subject: Re: SDL, automake, autoconf
- References: <Pine.NEB.4.53.0305271658200.5693@speedy.ludd.luth.se>
Mattias Brändström <brasse@ludd.luth.se> writes:
> dnl Check for SDL
> SDL_VERSION=1.2.0
> AM_PATH_SDL($SDL_VERSION,
> :,
> AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
> )
> CFLAGS="$CFLAGS $SDL_CFLAGS"
> LIBS="$LIBS $SDL_LIBS"
>
> This is all well and good and I think this will work. But, shouldn't
> the last two lines be something like this:
>
> AM_CFLAGS="$AM_CFLAGS $SDL_CFLAGS"
> AM_LDFLAGS="$AM_LDFLAGS $SDL_LIBS"
Yes.
> Another thing is that only some parts of my project needs SDL in order
> to work so I guess that I should set variables such as prog_CFLAGS and
> prog_LDFLAGS where it is necessary?
Yes.
> I also have a question relating to autoconf which might be a bit
> off-topic but I'll include it here anyway. When I run atoconf with
> these contents in configure.ac:
>
> --- configure.ac ---
> AC_INIT(src/rkcone/log/FileLogger.cpp)
>
> AM_INIT_AUTOMAKE(rkcone, 0.1)
>
> AC_PROG_CXX
>
> AC_PROG_RANLIB
>
> AC_PROG_INSTALL
>
> dnl Check for SDL
> SDL_VERSION=1.2.5
> AM_PATH_SDL($SDL_VERSION,
> :,
> AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
> )
> AM_CFLAGS="$AM_CFLAGS $SDL_CFLAGS"
> AM_LDFLAGS="$AM_LDFLAGS $SDL_LIBS"
>
> AC_OUTPUT(Makefile src/Makefile src/rkcone/Makefile
> src/rkcone/log/Makefile)
> --------------------
>
> I get this warning:
> configure.ac:16: warning: AC_ARG_PROGRAM was called before
> AC_CANONICAL_TARGET
>
> I tried to add AC_CANONICAL_TARGET before the AM_PATH_SDL macro but I
> got the same warning, this time refering to the line at where the
> AC_CANONICAL_TARGET was located. Is this something I should be worried
> about?
This is probably not a problem. If you want to debug it further, you
should probably isolate it down to a smaller (hopefully without SDL)
fragment so that we can see what the actual problem is.