New audio subsystem.
[jog] / configure.in
CommitLineData
2ec1e693 1dnl -*-fundamental-*-
2dnl
b1ffb19d 3dnl $Id: configure.in,v 1.2 2002/02/02 19:20:36 mdw Exp $
2ec1e693 4dnl
5dnl Configuration script for jog
6dnl
7dnl (c) 2001 Mark Wooding
8dnl
9
10dnl ----- Licensing notice --------------------------------------------------
11dnl
12dnl This file is part of Jog: Programming for a jogging machine.
13dnl
14dnl Jog is free software; you can redistribute it and/or modify
15dnl it under the terms of the GNU General Public License as published by
16dnl the Free Software Foundation; either version 2 of the License, or
17dnl (at your option) any later version.
18dnl
19dnl Jog is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22dnl GNU General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU General Public License
25dnl along with Jog; if not, write to the Free Software Foundation,
26dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
28dnl ----- Revision history --------------------------------------------------
29dnl
30dnl $Log: configure.in,v $
b1ffb19d 31dnl Revision 1.2 2002/02/02 19:20:36 mdw
32dnl Fetch SDL. Define configurable paths.
33dnl
2ec1e693 34dnl Revision 1.1 2002/01/25 19:34:45 mdw
35dnl Initial revision
36dnl
37
38AC_INIT(rxglue.c)
39AM_INIT_AUTOMAKE(jog, 1.0.0)
40AM_CONFIG_HEADER(config.h)
b1ffb19d 41AC_CANONICAL_HOST
2ec1e693 42
43AC_PROG_CC
44AC_PROG_CPP
45mdw_GCC_FLAGS
b1ffb19d 46mdw_OPT_TRACE
2ec1e693 47
48AC_CACHE_CHECK([where to find <rexxsaa.h>], [mdw_cv_rexxsaa_path], [
49 bad=true
50 tmp_CPPFLAGS=$CPPFLAGS
51 for i in present /usr/include/regina /usr/local/include/regina; do
52 case $i in
53 present) ;;
54 /*) CPPFLAGS="-I$i $tmp_CPPFLAGS" ;;
55 *) AC_MSG_ERROR([Buggered!]) ;;
56 esac
57 ac_cpp='$CPP $CPPFLAGS'
58 AC_TRY_CPP([#include <rexxsaa.h>], [bad=false; break;])
59 done
60 if $bad; then
61 AC_MSG_ERROR([header file <rexxsaa.h> not found])
62 fi
63 CPPFLAGS=$tmp_CPPFLAGS
64 mdw_cv_rexxsaa_path=$i
65])
66case $mdw_cv_rexxsaa_path in
67 present) ;;
68 /*) CPPFLAGS="-I$mdw_cv_rexxsaa_path $tmp_CPPFLAGS" ;;
69 *) AC_MSG_ERROR([Buggered!]) ;;
70esac
71
b1ffb19d 72have_sdl=no
73AM_PATH_SDL(1.1.0, have_sdl=yes)
74AC_MSG_CHECKING([which audio subsystem to select])
75AC_ARG_WITH([ausys],
76[ --with-ausys=[VARIANT] use VARIANT of the audio subsystem],
77[AUSYS=$withval],
78[case $host_os in
79 cygwin*) AUSYS=win32 ;;
80 *) AUSYS=sdl ;;
81esac])
82AC_SUBST(AUSYS)
83AC_MSG_RESULT($AUSYS)
84test -f $srcdir/ausys-$AUSYS.c ||
85 AC_MSG_ERROR([no support for audio subsystem \`$AUSYS'])
86case $AUSYS in
87 sdl)
88 if test $have_sdl = yes; then
89 LIBS="$LIBS $SDL_LIBS"
90 CFLAGS="$CFLAGS $SDL_CFLAGS"
91 else
92 AC_MSG_ERROR([SDL library not found, or too old])
93 fi
94 ;;
95esac
96
97mdw_DEFINE_PATHS([
98mdw_DEFINE_PATH([JOGSOCKET], [$localstatedir/$PACKAGE/socket])
99audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir)
100mdw_DEFINE_PATH([AUDIODIR], [$audiodir])
101])
102
2ec1e693 103mdw_CHECK_MANYLIBS(crypt, crypt)
104mdw_CHECK_MANYLIBS(dlopen, dl)
105mdw_CHECK_MANYLIBS(RexxStart, regina rexx)
106mdw_CHECK_MANYLIBS(pthread_create, pthread)
107mdw_CHECK_MANYLIBS(socket, socket)
108mdw_MLIB(2.0.0pre4)
109
110mdw_TYPE_SSIZE_T
111
b1ffb19d 112AC_OUTPUT(Makefile sounds/Makefile)
2ec1e693 113
114dnl ----- That's all, folks -------------------------------------------------