| 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 | AC_INIT(rxglue.c) |
| 29 | AC_CANONICAL_TARGET |
| 30 | AM_INIT_AUTOMAKE(jog, 1.0.0) |
| 31 | AM_CONFIG_HEADER(config.h) |
| 32 | |
| 33 | AC_PROG_CC |
| 34 | AC_PROG_CPP |
| 35 | mdw_GCC_FLAGS |
| 36 | mdw_OPT_TRACE |
| 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 | |
| 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 | [Pathname to default socket for socket transport.]) |
| 90 | audiodir='${datadir}/${PACKAGE}/audio' AC_SUBST(audiodir) |
| 91 | mdw_DEFINE_PATH([AUDIODIR], [$audiodir], [Pathname to audio data.]) |
| 92 | ]) |
| 93 | |
| 94 | mdw_CHECK_MANYLIBS(crypt, crypt) |
| 95 | mdw_CHECK_MANYLIBS(dlopen, dl) |
| 96 | mdw_CHECK_MANYLIBS(RexxStart, regina rexx) |
| 97 | mdw_CHECK_MANYLIBS(pthread_create, pthread) |
| 98 | mdw_CHECK_MANYLIBS(socket, socket) |
| 99 | mdw_MLIB(2.0.0pre4) |
| 100 | |
| 101 | mdw_TYPE_SSIZE_T |
| 102 | |
| 103 | AC_OUTPUT(Makefile sounds/Makefile) |
| 104 | |
| 105 | dnl ----- That's all, folks ------------------------------------------------- |