chiark / gitweb /
Build Makefile for sounds directory.
[jog] / configure.in
1 dnl -*-fundamental-*-
2 dnl
3 dnl $Id: configure.in,v 1.2 2002/02/02 19:20:36 mdw Exp $
4 dnl
5 dnl Configuration script for jog
6 dnl
7 dnl (c) 2001 Mark Wooding
8 dnl
9
10 dnl ----- Licensing notice --------------------------------------------------
11 dnl
12 dnl This file is part of Jog: Programming for a jogging machine.
13 dnl
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.
18 dnl 
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.
23 dnl 
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.
27
28 dnl ----- Revision history --------------------------------------------------
29 dnl
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.
33 dnl
34 dnl Revision 1.1  2002/01/25 19:34:45  mdw
35 dnl Initial revision
36 dnl
37
38 AC_INIT(rxglue.c)
39 AM_INIT_AUTOMAKE(jog, 1.0.0)
40 AM_CONFIG_HEADER(config.h)
41 AC_CANONICAL_HOST
42
43 AC_PROG_CC
44 AC_PROG_CPP
45 mdw_GCC_FLAGS
46 mdw_OPT_TRACE
47
48 AC_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 ])
66 case $mdw_cv_rexxsaa_path in
67   present) ;;
68   /*) CPPFLAGS="-I$mdw_cv_rexxsaa_path $tmp_CPPFLAGS" ;;
69   *) AC_MSG_ERROR([Buggered!]) ;;
70 esac
71
72 have_sdl=no
73 AM_PATH_SDL(1.1.0, have_sdl=yes)
74 AC_MSG_CHECKING([which audio subsystem to select])
75 AC_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 ;;
81 esac])
82 AC_SUBST(AUSYS)
83 AC_MSG_RESULT($AUSYS)
84 test -f $srcdir/ausys-$AUSYS.c ||
85   AC_MSG_ERROR([no support for audio subsystem \`$AUSYS'])
86 case $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     ;;
95 esac
96
97 mdw_DEFINE_PATHS([
98 mdw_DEFINE_PATH([JOGSOCKET], [$localstatedir/$PACKAGE/socket])
99 audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir)
100 mdw_DEFINE_PATH([AUDIODIR], [$audiodir])
101 ])
102
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)
108 mdw_MLIB(2.0.0pre4)
109
110 mdw_TYPE_SSIZE_T
111
112 AC_OUTPUT(Makefile sounds/Makefile)
113
114 dnl ----- That's all, folks -------------------------------------------------