File: configure.ac

package info (click to toggle)
minbar 0.2.1-5
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,900 kB
  • ctags: 165
  • sloc: xml: 58,701; sh: 3,664; ansic: 1,925; makefile: 111
file content (191 lines) | stat: -rw-r--r-- 5,770 bytes parent folder | download | duplicates (3)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191


AC_INIT([minbar], [0.2.1],[mailto:djihed@gmail.com],[minbar])

AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip -Wall])

AC_CONFIG_SRCDIR([src])

AC_PROG_CC
AC_HEADER_STDC

# *********
# Some vars
# *********
MAKKAH_LAT=21.43
MAKKAH_LON=39.77
AC_SUBST(MAKKAH_LON)
AC_SUBST(MAKKAH_LAT)

# *****
# GNOME
# *****

GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES

# ***************************
# Check for required packages
# ***************************

pkg_modules="gtk+-2.0 >= 2.10 glib-2.0 libglade-2.0 gstreamer-0.10 libgnomecanvas-2.0 libxml-2.0"
PKG_CHECK_MODULES(MINBAR, [$pkg_modules])

AC_CHECK_HEADER(itl/prayer.h,ITL_LIBS=-litl,AC_MSG_ERROR("itl/prayer.h not found."))
AC_SUBST(ITL_LIBS)

# libnotify check
LIBNOTIFY_REQUIRED=0.3.0
AC_ARG_ENABLE(libnotify,
            [AS_HELP_STRING([--disable-libnotify],
			   [Disable libnotify support])],,
	      enable_libnotify=auto)
if test "x$enable_libnotify" != "xno"; then
	PKG_CHECK_MODULES(NOTIFY,                            \
			  libnotify >= $LIBNOTIFY_REQUIRED,
			  have_libnotify=yes,
			  have_libnotify=no)
	if test "x$have_libnotify" = "xno" -a "x$enable_libnotify" = "xyes"; then
	  AC_MSG_ERROR([libnotify support explicitly requested, but libnotify couldn't be found])
	fi
	if test "x$have_libnotify" = "xyes"; then
	     enable_libnotify=yes
	fi
fi
AM_CONDITIONAL(USE_NOTIFY, test x"$enable_libnotify" = xyes)
if test x$enable_libnotify = xyes ; then
    # Find out the version of LIBNOTIFY we're using
    libnotify_version=`pkg-config --modversion libnotify`
    LIBNOTIFY_VERSION_MAJOR=`echo $libnotify_version | awk -F. '{print $1}'`
    LIBNOTIFY_VERSION_MINOR=`echo $libnotify_version | awk -F. '{print $2}'`
    LIBNOTIFY_VERSION_MICRO=`echo $libnotify_version | awk -F. '{print $3}'`
    if test "z$LIBNOTIFY_VERSION_MAJOR" = "z"; then
        LIBNOTIFY_VERSION_MAJOR="0"
    fi
    if test "z$LIBNOTIFY_VERSION_MINOR" = "z"; then
        LIBNOTIFY_VERSION_MINOR="0"
    fi
    if test "z$LIBNOTIFY_VERSION_MICRO" = "z"; then
        LIBNOTIFY_VERSION_MICRO="0"
    fi
    echo "Your libnotify version is $LIBNOTIFY_VERSION_MAJOR,$LIBNOTIFY_VERSION_MINOR,$LIBNOTIFY_VERSION_MICRO."
    NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MAJOR=$LIBNOTIFY_VERSION_MAJOR"
    NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MINOR=$LIBNOTIFY_VERSION_MINOR"
    NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MICRO=$LIBNOTIFY_VERSION_MICRO"

    AC_DEFINE(HAVE_NOTIFY, 1, [Define if libnotify support is enabled])
    AC_SUBST(NOTIFY_CFLAGS)
    AC_SUBST(NOTIFY_LIBS)
fi

# *************
# Documentation
# *************

AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package)
fi

# ****************************************
# Preferences system (gconf or key-files)
# ****************************************
AC_ARG_ENABLE(gconf, [AS_HELP_STRING([--enable-gconf],
		[whether to use gconf or a keyfile for storing configuration 
		(by default use gconf if available)])],
		[gconf=$enableval],
		[gconf=auto])

PKG_CHECK_MODULES(GCONF, [gconf-2.0], gconf_available=yes, gconf_available=no)
AM_GCONF_SOURCE_2
if test x"$gconf" = "xyes"; then
	if test x"$gconf_available" = "xyes"; then
		AC_DEFINE([USE_GCONF], [1], [Define to 1 if you want to use gconf.])
	else
		AC_MSG_ERROR("You asked for the use of Gconf but it's not available")
	fi
elif test x"$gconf" = "xauto" && test x"$gconf_available" = "xyes"; then
	AC_DEFINE([USE_GCONF], [1], [Define to 1 if you want to use gconf.])
	gconf=yes
fi
AM_CONDITIONAL(USE_GCONF, test x"$gconf" = "xyes")

# ********************
# Internationalisation
# ********************

IT_PROG_INTLTOOL([0.34.90])

GETTEXT_PACKAGE=minbar
AC_SUBST([GETTEXT_PACKAGE])
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])

# *************************************
# relative filenames (for windows)
# *************************************
AC_ARG_ENABLE(relative-filenames, [AS_HELP_STRING([--enable-relative-filenames],
		[whether to use gconf or a keyfile for storing configuration 
		(by default use gconf if available)])],
		[relative=$enableval],
		[relative=no])
if test x"$relative" = "xyes"; then
	adl_COMPUTE_RELATIVE_PATHS([bindir:datadir:data])
else
	data=$datadir
fi
AC_SUBST([data])

# *************************************
# *************************************

ATHANDIR="${data}/${PACKAGE}"
AC_SUBST(ATHANDIR)


#	data/minbar.schemas.in
AC_CONFIG_FILES([
	Makefile
	data/Makefile
	pixmaps/Makefile
	src/Makefile 
	po/Makefile.in
	doc/Makefile
	pixmaps/icons/Makefile
	pixmaps/icons/16x16/Makefile
	pixmaps/icons/24x24/Makefile
	pixmaps/icons/32x32/Makefile
	pixmaps/icons/48x48/Makefile
	pixmaps/icons/64x64/Makefile
	pixmaps/icons/128x128/Makefile
])

AC_OUTPUT

echo ""
echo ----------------------------------------------------------------------
echo "Configure Summary 

	Source code location .......:  ${srcdir}
	Compiler ...................:  ${CC} 
	Extra Compiler Warnings ....:  ${WARN_CFLAGS}
	Extra debugging support ....:  ${enable_debug}
"

if test x"$enable_libnotify" = xyes; then
	echo "	Libnotify notifications ....: Enabled (version $LIBNOTIFY_VERSION_MAJOR.\ 
$LIBNOTIFY_VERSION_MINOR.$LIBNOTIFY_VERSION_MICRO)."
else
	echo "	Libnotify notifications ....: Disabled."
fi
if test x"$gconf" = xyes; then
	echo "	Configuration ..............: gconf."
else
	echo "	Configuration ..............: gkeyfile."
fi
if test x"$relative" = xyes; then
	echo "	Using relative pathnames : minbar should be called from its directory."
fi
echo ----------------------------------------------------------------------