Release 1.6.0.
[xtoys] / configure.ac
1 dnl -*-autoconf-*-
2 dnl
3 dnl Configuration script for X tools
4 dnl
5 dnl (c) 1998 Straylight/Edgeware
6 dnl
7
8 dnl ----- Licensing notice --------------------------------------------------
9 dnl
10 dnl This file is part of the Edgeware X tools collection.
11 dnl
12 dnl X tools is free software; you can redistribute it and/or modify
13 dnl it under the terms of the GNU General Public License as published by
14 dnl the Free Software Foundation; either version 2 of the License, or
15 dnl (at your option) any later version.
16 dnl
17 dnl X tools is distributed in the hope that it will be useful,
18 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 dnl GNU General Public License for more details.
21 dnl
22 dnl You should have received a copy of the GNU General Public License
23 dnl along with X tools; if not, write to the Free Software Foundation,
24 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26 dnl--------------------------------------------------------------------------
27 dnl Initialization.
28
29 mdw_AUTO_VERSION
30 AC_INIT([xtoys], AUTO_VERSION, [mdw@distorted.org.uk])
31 AC_CONFIG_SRCDIR([xscsize.c])
32 AC_CONFIG_AUX_DIR([config])
33 AM_INIT_AUTOMAKE([foreign])
34 mdw_SILENT_RULES
35
36 dnl--------------------------------------------------------------------------
37 dnl C programming environment.
38
39 AC_PROG_CC
40 AX_CFLAGS_WARN_ALL
41 AC_PATH_XTRA
42
43 mdw_LIBS=$LIBS LIBS= mdw_have_xrandr_p=nil
44 AC_SEARCH_LIBS([XRRGetScreenInfo], [Xrandr], [mdw_have_xrandr_p=t])
45 case $mdw_have_xrandr_p in
46 t)
47 AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [], [mdw_have_xrandr_p=nil])
48 ;;
49 esac
50 case $mdw_have_xrandr_p in
51 t)
52 XRANDR_LIBS=$LIBS
53 AC_DEFINE([HAVE_XRANDR], [1], [Define if libXrandr is installed.])
54 ;;
55 esac
56 LIBS=$mdw_LIBS
57 AC_SUBST([XRANDR_LIBS])
58
59 PKG_CHECK_MODULES([mLib], [mLib >= 2.0.4])
60 CFLAGS="$CFLAGS $mLib_CFLAGS"
61 LIBS="$LIBS $mLib_LIBS"
62
63 dnl--------------------------------------------------------------------------
64 dnl Python programming environment.
65
66 AM_PATH_PYTHON([2.4], [python=yes], [python=no])
67 AM_CONDITIONAL([HAVE_PYTHON], [test $python = yes])
68
69 if test $python = yes; then
70 AC_PYTHON_MODULE([pygtk])
71 fi
72 AM_CONDITIONAL([HAVE_PYGTK], [test ${HAVE_PYMOD_PYGTK-no} = yes])
73
74 dnl--------------------------------------------------------------------------
75 dnl Output.
76
77 AC_CONFIG_FILES(
78 [Makefile])
79 AC_OUTPUT
80
81 dnl ----- That's all, folks -------------------------------------------------