Add pointlog2svg utility for the thesis
[numtypysics.git] / configure.in
blob63174eb1ed1867da049bc4c7a2267adebfed4443
1 AC_INIT
2 AC_CONFIG_SRCDIR([README])
3 AM_INIT_AUTOMAKE(numptyphysics,0.3)
4 #AM_CONFIG_HEADER(amconfig.h)
6 AC_PROG_CC
7 AC_PROG_CXX
8 AC_PROG_MAKE_SET
9 AC_PROG_INSTALL
10 AC_PROG_RANLIB
12 # Check for SDL
13 AC_CHECK_HEADER(
14         SDL/SDL.h,
15         AC_DEFINE(
16                 [HAVE_LIBSDL],
17                 [],
18                 Define to 1 if you have the <SDL/SDL.h> header file.
19                 )
20                 SDL_LIBS=`sdl-config --libs`
21                 sdl=yes,
22         AC_MSG_ERROR([*** no SDL/SDL.h - SDL not found])
24 AC_SUBST(SDL_CFLAGS)
25 AC_SUBST(SDL_LIBS)
27 # Check for SDL_image library
28 AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([
29 *** Unable to find SDL_image libary with PNG support
30 ]))
31 AC_CHECK_LIB(SDL_ttf, TTF_OpenFont, , AC_MSG_ERROR([
32 *** Unable to find SDL_ttf libary
33 ]))
34 AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, , AC_MSG_ERROR([
35 *** Unable to find SDL_mixer libary
36 ]))
38 # Check if Python is available (for MT TUIO Input)
39 AC_ARG_ENABLE(multitouch,
40               [  --disable-multitouch             build without PyTUIO multi-touch support],
41               enable_multitouch=$enableval,
42               enable_multitouch=yes)
44 if test "x${enable_multitouch}" = "xyes"; then
45     AC_CHECK_PROG(HAVE_PYTHON, python-config, "yes", "no")
46     if test "x${HAVE_PYTHON}" = "xyes"; then
47         AC_DEFINE([HAVE_PYTHON], [], using python)
48         PYTHON_CFLAGS=`python-config --includes`
49         PYTHON_LIBS=`python-config --libs`
50     fi
52 AC_SUBST(PYTHON_CFLAGS)
53 AC_SUBST(PYTHON_LIBS)
55 # Check if Hildon is available (for Maemo)
56 #AC_ARG_ENABLE(hildon, [  --disable-hildon             build without maemo/hildon support], enable_hildon=$enableval, enable_hildon=yes)
58 #if test "x${enable_hildon}" = "xyes" ; then
59 #   PKG_CHECK_MODULES(HILDON, [hildon-1 hildon-fm-2 libossoemailinterface], 
60 #   PKG_CHECK_MODULES(HILDON, [hildon-1 dbus-1 libosso], 
61 #                            [enable_hildon=yes], [enable_hildon=no])
62 #fi
64 if test "x${enable_hildon}" = "xyes" ; then
65    AC_DEFINE( [USE_HILDON],[], using hildon )
66    desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
67    serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
68    icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
69    icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
70    icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
71    icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
72    icon_64x64dir=$datadir/icons/hicolor/64x64/hildon
73    icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
74    AC_SUBST(HILDON_CFLAGS)
75    AC_SUBST(HILDON_LIBS)
76 else
77    desktopentrydir=/usr/share/applications
78    serviceentrydir=$datadir/numptyphysics
79    icon_26x26dir=$datadir/icons/hicolor/26x26/apps
80    icon_34x34dir=$datadir/icons/hicolor/34x34/apps
81    icon_40x40dir=$datadir/icons/hicolor/40x40/apps
82    icon_50x50dir=$datadir/icons/hicolor/50x50/apps
83    icon_64x64dir=$datadir/icons/hicolor/64x64/apps
84    icon_scalabledir=$datadir/icons/hicolor/scalable/apps
86 AC_SUBST(desktopentrydir)
87 AC_SUBST(serviceentrydir)
88 AC_SUBST(icon_26x26dir)
89 AC_SUBST(icon_34x34dir)
90 AC_SUBST(icon_40x40dir)
91 AC_SUBST(icon_50x50dir)
92 AC_SUBST(icon_64x64dir)
93 AC_SUBST(icon_scalabledir)
96 AC_CHECK_LIB(stdc++, main)
97 AC_CHECK_LIB(X11, main)
98 AC_CHECK_LIB(z, main)
101 AC_CONFIG_FILES([Makefile])
102 AC_OUTPUT