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.
29 AM_INIT_AUTOMAKE(jog, 1.0.0)
30 AM_CONFIG_HEADER(config.h)
38 AC_CACHE_CHECK([where to find <rexxsaa.h>], [mdw_cv_rexxsaa_path], [
40 tmp_CPPFLAGS=$CPPFLAGS
41 for i in present /usr/include/regina /usr/local/include/regina; do
44 /*) CPPFLAGS="-I$i $tmp_CPPFLAGS" ;;
45 *) AC_MSG_ERROR([Buggered!]) ;;
47 ac_cpp='$CPP $CPPFLAGS'
48 AC_TRY_CPP([#include <rexxsaa.h>], [bad=false; break;])
51 AC_MSG_ERROR([header file <rexxsaa.h> not found])
53 CPPFLAGS=$tmp_CPPFLAGS
54 mdw_cv_rexxsaa_path=$i
56 case $mdw_cv_rexxsaa_path in
58 /*) CPPFLAGS="-I$mdw_cv_rexxsaa_path $tmp_CPPFLAGS" ;;
59 *) AC_MSG_ERROR([Buggered!]) ;;
63 AM_PATH_SDL(1.1.0, have_sdl=yes)
64 AC_MSG_CHECKING([which audio subsystem to select])
66 [ --with-ausys=[VARIANT] use VARIANT of the audio subsystem],
69 cygwin*) AUSYS=win32 ;;
74 test -f $srcdir/ausys-$AUSYS.c ||
75 AC_MSG_ERROR([no support for audio subsystem \`$AUSYS'])
78 if test $have_sdl = yes; then
79 LIBS="$LIBS $SDL_LIBS"
80 CFLAGS="$CFLAGS $SDL_CFLAGS"
82 AC_MSG_ERROR([SDL library not found, or too old])
88 mdw_DEFINE_PATH([JOGSOCKET], [$localstatedir/$PACKAGE/socket])
89 audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir)
90 mdw_DEFINE_PATH([AUDIODIR], [$audiodir])
93 mdw_CHECK_MANYLIBS(crypt, crypt)
94 mdw_CHECK_MANYLIBS(dlopen, dl)
95 mdw_CHECK_MANYLIBS(RexxStart, regina rexx)
96 mdw_CHECK_MANYLIBS(pthread_create, pthread)
97 mdw_CHECK_MANYLIBS(socket, socket)
102 AC_OUTPUT(Makefile sounds/Makefile)
104 dnl ----- That's all, folks -------------------------------------------------