File: configure.ac

package info (click to toggle)
gelemental 1.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,412 kB
  • ctags: 705
  • sloc: sh: 11,797; cpp: 5,255; makefile: 197
file content (125 lines) | stat: -rw-r--r-- 4,039 bytes parent folder | download | duplicates (6)
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
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ([2.59])

AC_INIT([gElemental], [1.2.0], [kevin+gelemental@kdau.com], [gelemental])
AC_CONFIG_SRCDIR([src/main.cc])

AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
AM_MAINTAINER_MODE

dnl ensure that when the Automake generated makefile calls aclocal,
dnl it honours the $ACLOCAL_FLAGS environment variable
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST([ACLOCAL_AMFLAGS])

dnl ****************************************************************************
dnl basic requirements
dnl ****************************************************************************

AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_INSTALL

PKG_CHECK_MODULES([LIBELEMENTAL], [glibmm-2.4 >= 2.6.0 pango])
PKG_CHECK_MODULES([GELEMENTAL], [gtkmm-2.4 >= 2.6.0])

dnl ****************************************************************************
dnl gettext and intltool
dnl ****************************************************************************

IT_PROG_INTLTOOL([0.35.0])

GETTEXT_PACKAGE=gelemental
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package])

AM_GLIB_GNU_GETTEXT

dnl ****************************************************************************
dnl maintenance and debugging
dnl ****************************************************************************

AC_MSG_CHECKING([whether to enable debugging support])
AC_ARG_ENABLE([debug],
	AS_HELP_STRING([--enable-debug], [enable debugging support]),
	[], [enable_debug=no])
AC_MSG_RESULT([$enable_debug])

if test "x$USE_MAINTAINER_MODE" = "xyes"; then
	DISABLE_DEPRECATED="-DGDKMM_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED"
else
	DISABLE_DEPRECATED=""
fi
AC_SUBST([DISABLE_DEPRECATED])

MAINT_CXXFLAGS=""

if test "x$GXX" = "xyes"; then
	if test "x$USE_MAINTAINER_MODE" = "xyes"; then
		MAINT_CXXFLAGS="-Wall -Wextra -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wunreachable-code -Woverloaded-virtual -Wsign-promo"
	else
		MAINT_CXXFLAGS="-Wall -Wno-unused"
	fi
fi

if test "x$enable_debug" = "xyes"; then
	AC_DEFINE([ENABLE_DEBUG], [1], [Define if debugging support is enabled])
	if test "x$GXX" = "xyes"; then
		MAINT_CXXFLAGS="$MAINT_CXXFLAGS -ggdb3"
	else
		MAINT_CXXFLAGS="$MAINT_CXXFLAGS -g"
	fi
fi

AC_SUBST([MAINT_CXXFLAGS])

dnl ****************************************************************************
dnl optional features
dnl ****************************************************************************

AC_CHECK_PROG([have_doxygen], [doxygen], [yes], [no])
AC_MSG_CHECKING([whether to install API documentation])
AC_ARG_ENABLE([api_docs],
	AS_HELP_STRING([--enable-api-docs], [install API documentation]),
	[], [enable_api_docs=no])
if test "x$enable_api_docs" = "xyes"; then
	if test "x$have_doxygen" = "xno"; then
		AC_MSG_ERROR([Doxygen is required to build API documentation.])
	fi
fi
AC_MSG_RESULT([$enable_api_docs])
AM_CONDITIONAL([ENABLE_API_DOCS], [test "x$enable_api_docs" = "xyes"])

dnl ****************************************************************************
dnl output
dnl ****************************************************************************

AC_SUBST([LIBMISC_CPPFLAGS], ["$GELEMENTAL_CFLAGS"])
AC_SUBST([LIBMISC_CXXFLAGS], ["$MAINT_CXXFLAGS $DISABLE_DEPRECATED"])
AM_CONDITIONAL([LIBMISC_GTK], [true])

AC_SUBST([LIBELEMENTAL_CPPFLAGS], ["$LIBELEMENTAL_CFLAGS"])
AC_SUBST([LIBELEMENTAL_CXXFLAGS], ["$MAINT_CXXFLAGS $DISABLE_DEPRECATED"])
AC_SUBST([LIBELEMENTAL_LIBS])

AC_SUBST([GELEMENTAL_CPPFLAGS], ["$GELEMENTAL_CFLAGS"])
AC_SUBST([GELEMENTAL_CXXFLAGS], ["$MAINT_CXXFLAGS $DISABLE_DEPRECATED"])
AC_SUBST([GELEMENTAL_LIBS])

AC_CONFIG_FILES([
	Makefile
	libelemental/Makefile
	libelemental/misc/Makefile
	src/Makefile
	po/Makefile.in
	docs/Makefile
	docs/api/Makefile
	docs/api/Doxyfile
	data/Makefile
	data/libelemental.pc
	data/libelemental-uninstalled.pc
])
AC_CONFIG_HEADERS([config.h])

AC_OUTPUT