2ec1e693 |
1 | dnl -*-fundamental-*- |
2 | dnl |
b1ffb19d |
3 | dnl $Id: configure.in,v 1.2 2002/02/02 19:20:36 mdw Exp $ |
2ec1e693 |
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 | |
2ec1e693 |
28 | AC_INIT(rxglue.c) |
29 | AM_INIT_AUTOMAKE(jog, 1.0.0) |
30 | AM_CONFIG_HEADER(config.h) |
b1ffb19d |
31 | AC_CANONICAL_HOST |
2ec1e693 |
32 | |
33 | AC_PROG_CC |
34 | AC_PROG_CPP |
35 | mdw_GCC_FLAGS |
b1ffb19d |
36 | mdw_OPT_TRACE |
2ec1e693 |
37 | |
38 | AC_CACHE_CHECK([where to find <rexxsaa.h>], [mdw_cv_rexxsaa_path], [ |
39 | bad=true |
40 | tmp_CPPFLAGS=$CPPFLAGS |
41 | for i in present /usr/include/regina /usr/local/include/regina; do |
42 | case $i in |
43 | present) ;; |
44 | /*) CPPFLAGS="-I$i $tmp_CPPFLAGS" ;; |
45 | *) AC_MSG_ERROR([Buggered!]) ;; |
46 | esac |
47 | ac_cpp='$CPP $CPPFLAGS' |
48 | AC_TRY_CPP([#include <rexxsaa.h>], [bad=false; break;]) |
49 | done |
50 | if $bad; then |
51 | AC_MSG_ERROR([header file <rexxsaa.h> not found]) |
52 | fi |
53 | CPPFLAGS=$tmp_CPPFLAGS |
54 | mdw_cv_rexxsaa_path=$i |
55 | ]) |
56 | case $mdw_cv_rexxsaa_path in |
57 | present) ;; |
58 | /*) CPPFLAGS="-I$mdw_cv_rexxsaa_path $tmp_CPPFLAGS" ;; |
59 | *) AC_MSG_ERROR([Buggered!]) ;; |
60 | esac |
61 | |
b1ffb19d |
62 | have_sdl=no |
63 | AM_PATH_SDL(1.1.0, have_sdl=yes) |
64 | AC_MSG_CHECKING([which audio subsystem to select]) |
65 | AC_ARG_WITH([ausys], |
66 | [ --with-ausys=[VARIANT] use VARIANT of the audio subsystem], |
67 | [AUSYS=$withval], |
68 | [case $host_os in |
69 | cygwin*) AUSYS=win32 ;; |
70 | *) AUSYS=sdl ;; |
71 | esac]) |
72 | AC_SUBST(AUSYS) |
73 | AC_MSG_RESULT($AUSYS) |
74 | test -f $srcdir/ausys-$AUSYS.c || |
75 | AC_MSG_ERROR([no support for audio subsystem \`$AUSYS']) |
76 | case $AUSYS in |
77 | sdl) |
78 | if test $have_sdl = yes; then |
79 | LIBS="$LIBS $SDL_LIBS" |
80 | CFLAGS="$CFLAGS $SDL_CFLAGS" |
81 | else |
82 | AC_MSG_ERROR([SDL library not found, or too old]) |
83 | fi |
84 | ;; |
85 | esac |
86 | |
87 | mdw_DEFINE_PATHS([ |
88 | mdw_DEFINE_PATH([JOGSOCKET], [$localstatedir/$PACKAGE/socket]) |
89 | audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir) |
90 | mdw_DEFINE_PATH([AUDIODIR], [$audiodir]) |
91 | ]) |
92 | |
2ec1e693 |
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) |
98 | mdw_MLIB(2.0.0pre4) |
99 | |
100 | mdw_TYPE_SSIZE_T |
101 | |
b1ffb19d |
102 | AC_OUTPUT(Makefile sounds/Makefile) |
2ec1e693 |
103 | |
104 | dnl ----- That's all, folks ------------------------------------------------- |