3 dnl $Id: configure.in,v 1.2 2002/02/02 19:20:36 mdw Exp $
5 dnl Configuration script for jog
7 dnl (c) 2001 Mark Wooding
10 dnl ----- Licensing notice --------------------------------------------------
12 dnl This file is part of Jog: Programming for a jogging machine.
14 dnl Jog is free software; you can redistribute it and/or modify
15 dnl it under the terms of the GNU General Public License as published by
16 dnl the Free Software Foundation; either version 2 of the License, or
17 dnl (at your option) any later version.
19 dnl Jog is distributed in the hope that it will be useful,
20 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 dnl GNU General Public License for more details.
24 dnl You should have received a copy of the GNU General Public License
25 dnl along with Jog; if not, write to the Free Software Foundation,
26 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 dnl ----- Revision history --------------------------------------------------
30 dnl $Log: configure.in,v $
31 dnl Revision 1.2 2002/02/02 19:20:36 mdw
32 dnl Fetch SDL. Define configurable paths.
34 dnl Revision 1.1 2002/01/25 19:34:45 mdw
39 AM_INIT_AUTOMAKE(jog, 1.0.0)
40 AM_CONFIG_HEADER(config.h)
48 AC_CACHE_CHECK([where to find <rexxsaa.h>], [mdw_cv_rexxsaa_path], [
50 tmp_CPPFLAGS=$CPPFLAGS
51 for i in present /usr/include/regina /usr/local/include/regina; do
54 /*) CPPFLAGS="-I$i $tmp_CPPFLAGS" ;;
55 *) AC_MSG_ERROR([Buggered!]) ;;
57 ac_cpp='$CPP $CPPFLAGS'
58 AC_TRY_CPP([#include <rexxsaa.h>], [bad=false; break;])
61 AC_MSG_ERROR([header file <rexxsaa.h> not found])
63 CPPFLAGS=$tmp_CPPFLAGS
64 mdw_cv_rexxsaa_path=$i
66 case $mdw_cv_rexxsaa_path in
68 /*) CPPFLAGS="-I$mdw_cv_rexxsaa_path $tmp_CPPFLAGS" ;;
69 *) AC_MSG_ERROR([Buggered!]) ;;
73 AM_PATH_SDL(1.1.0, have_sdl=yes)
74 AC_MSG_CHECKING([which audio subsystem to select])
76 [ --with-ausys=[VARIANT] use VARIANT of the audio subsystem],
79 cygwin*) AUSYS=win32 ;;
84 test -f $srcdir/ausys-$AUSYS.c ||
85 AC_MSG_ERROR([no support for audio subsystem \`$AUSYS'])
88 if test $have_sdl = yes; then
89 LIBS="$LIBS $SDL_LIBS"
90 CFLAGS="$CFLAGS $SDL_CFLAGS"
92 AC_MSG_ERROR([SDL library not found, or too old])
98 mdw_DEFINE_PATH([JOGSOCKET], [$localstatedir/$PACKAGE/socket])
99 audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir)
100 mdw_DEFINE_PATH([AUDIODIR], [$audiodir])
103 mdw_CHECK_MANYLIBS(crypt, crypt)
104 mdw_CHECK_MANYLIBS(dlopen, dl)
105 mdw_CHECK_MANYLIBS(RexxStart, regina rexx)
106 mdw_CHECK_MANYLIBS(pthread_create, pthread)
107 mdw_CHECK_MANYLIBS(socket, socket)
112 AC_OUTPUT(Makefile sounds/Makefile)
114 dnl ----- That's all, folks -------------------------------------------------