File: configure.ac

package info (click to toggle)
phat 0.4.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,416 kB
  • ctags: 834
  • sloc: sh: 8,742; ansic: 5,339; xml: 1,889; makefile: 120
file content (86 lines) | stat: -rw-r--r-- 2,130 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_INIT([phat/phatfanslider.c])

PHAT_VERSION=0.4.1
AC_SUBST(PHAT_VERSION)

AM_INIT_AUTOMAKE([phat],${PHAT_VERSION})
AC_PROG_LIBTOOL

# optimization and debugging checks
with_debug="no"
AC_ARG_ENABLE([debug], 
    [AC_HELP_STRING([--enable-debug],
        [enable debugging information, accepting a performance penalty (default is NO)])],
    [if test x$enable_debug = xyes; then with_debug=yes ; fi])

if test x$with_debug = xno; then
    CFLAGS="-O3"
    AC_DEFINE(DEBUG, 0, [[whether to display debugging output or not]])
else
    AC_DEFINE(DEBUG, 1, [[whether to display debugging output or not]])
fi

# standard autoconf checks
AC_PROG_CC
AC_PROG_CPP

##################################################
# Check for gtk+-2.0, preferably >= 2.4
##################################################
with_gtk2_4=no
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], [with_gtk2_4=yes], [with_gtk2_4=no])

if test x$with_gtk2_4 = xyes; then
    AC_DEFINE(HAVE_GTK2_4, 1, [[do we have gtk+ >= 2.4 ?]])
else
    PKG_CHECK_MODULES(GTK, gtk+-2.0)
fi

##################################################
# Check for gtk-doc.
##################################################

GTK_DOC_CHECK(1.0)

# misc checks
PKG_CHECK_MODULES(MISC, libgnomecanvas-2.0)

# set compilation flags
CFLAGS="$CFLAGS $GTK_CFLAGS $MISC_CFLAGS -Wall -Werror"
LIBS="$LIBS $GTK_LIBS $MISC_LIBS"

# print build summary
AC_CONFIG_COMMANDS_POST([
echo
echo
echo    "                   BUILD SUMMARY"
echo    "                   ============="
echo
echo -n "             Build type:     "
if test x$with_debug = xyes; then
    echo "debugging"
else
    echo "optimized"
fi
echo -n "             GTK+ Version:   "
if test x$with_gtk2_4 = xyes; then
    echo "2.4 or greater"
else
    echo "2.0 or 2.2 series"
fi
echo -n "             Build Docs:     "
if test x$enable_gtk_doc = xyes; then
    echo "yes"
else
    echo "no"
fi
echo
echo
])

AC_CONFIG_FILES([Makefile phat/Makefile demos/Makefile docs/Makefile pixmaps/Makefile phat.pc phat.spec])
AM_CONFIG_HEADER([phat/config.h])
AC_OUTPUT