OSDN Git Service

ShapeFusion 0.6とマージ。
[marathon/ShapeFusion.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 dnl Written in 2000 by Christian Bauer <Christian.Bauer@uni-mainz.de>
3
4 AC_INIT([ShapeFusion], [0.6], [http://sourceforge.net/bugs/?group_id=1997], [shapefusion])
5 AC_PREREQ(2.52)
6
7 dnl Detect the canonical host and target build environment.
8 AC_CANONICAL_HOST
9 AC_CANONICAL_TARGET
10
11 dnl Init automake.
12 AM_INIT_AUTOMAKE
13 AM_CONFIG_HEADER(config.h)
14
15 dnl Checks for programs.
16 AC_PROG_CC
17 AC_PROG_CPP
18 AC_PROG_CXX
19 AC_PROG_CXXCPP
20 AC_PROG_INSTALL
21 AC_PROG_RANLIB
22
23 dnl some platform specific stuff
24 case $target in
25 *-*-mingw32*)
26         AC_CHECK_TOOL(WINDRES, windres, :)
27         ;;
28 *-*-netbsd*)
29         CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" 
30         ;;
31 *)
32         ;;
33 esac
34
35 dnl wxWidgets
36 AM_OPTIONS_WXCONFIG
37 reqwx=2.8.0
38 case $target in
39 *-*-mingw32*)
40   AM_PATH_WXCONFIG($reqwx, wxWidgets=1, , , [--unicode=no])
41         ;;
42 *)
43         AM_PATH_WXCONFIG($reqwx, wxWidgets=1)
44   ;;
45 esac
46 if test "$wxWidgets" != 1; then
47         AC_MSG_ERROR([
48                 wxWidgets must be installed on your system.
49  
50                 Please check that wx-config is in path, the directory
51                 where wxWidgets libraries are installed (returned by
52                 'wx-config --libs' or 'wx-config --static --libs' command)
53                 is in LD_LIBRARY_PATH or equivalent variable and
54                 wxWidgets version is $reqwx or above.
55                 ])
56 fi
57  
58 CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
59 CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
60 CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
61 LIBS="$LIBS $WX_LIBS"
62
63 PKG_CHECK_MODULES([SNDFILE], [sndfile], [
64                   CPPFLAGS="$SNDFILE_CFLAGS $CPPFLAGS"
65                   LIBS="$SNDFILE_LIBS $LIBS"], AC_ERROR([ShapeFusion requires libsndfile]))
66
67 dnl Check for libsndfile
68 dnl AC_CHECK_HEADER(sndfile.h, , AC_ERROR([ShapeFusion requires libsndfile]))
69 dnl AC_CHECK_LIB(sndfile, sf_open, [LIBS="-lvorbis -lvorbisenc -lvorbisfile -logg -lsndfile $LIBS"], AC_ERROR([ShapeFusion requires libsndfile]), [-lvorbis -lvorbisenc -lvorbisfile -logg -lFLAC -lsndfile])
70
71 dnl add some windows goodies
72 case $target in
73 *-*-mingw32*)
74         make_windows=true
75         ;;
76 *)
77         make_windows=false ;;
78 esac
79 AM_CONDITIONAL(MAKE_WINDOWS, test x$make_windows = xtrue)
80
81 dnl Generate Makefiles.
82 AC_CONFIG_FILES([
83 Makefile
84 Physics/Makefile
85 Shapes/Makefile
86 Sounds/Makefile
87 ])
88 AC_OUTPUT
89
90 dnl Print summary.
91 echo "Configuration done. Now type \"make\"."