File: configure.in

package info (click to toggle)
mergeant 0.67-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,736 kB
  • ctags: 869
  • sloc: ansic: 9,388; sh: 8,954; makefile: 222; xml: 74
file content (188 lines) | stat: -rw-r--r-- 4,703 bytes parent folder | download
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
AC_PREREQ(2.52)

AC_INIT(mergeant, 0.67)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

dnl Put the ACLOCAL flags in the Makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

dnl Initialize maintainer mode
AM_MAINTAINER_MODE

AC_DEFINE_UNQUOTED(BONOBO_EXPLICIT_TRANSLATION_DOMAIN, "mergeant")

# Check for programs
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_PROG_INTLTOOL([0.11])

dnl ******************************
dnl Win32
dnl ******************************

AC_MSG_CHECKING([for Win32 platform])
case "$host" in
*-cygwin*)
        platform_win32=yes
        NO_UNDEFINED='-no-undefined'
        SOPREFIX=cyg
    ;;
*-mingw*)
        platform_win32=yes
        NO_UNDEFINED='-no-undefined' 
        SOPREFIX=lib
    ;;
*)
        platform_win32=no
        NO_UNDEFINED=
        SOPREFIX=lib
        AM_BINRELOC
        ;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
AC_SUBST(NO_UNDEFINED)
AC_SUBST(SOPREFIX)

dnl
dnl glib-genmarshal
dnl
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)

dnl
dnl MIME database
dnl
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AC_ARG_ENABLE(update-mimedb,
   AC_HELP_STRING([--disable-update-mimedb],
		  [disable the update-mime-database after install [default=no]]),,
   enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)

dnl
dnl Scrollkeeper
dnl
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
   AC_MSG_WARN(Couldn't find scrollkeeper-config -- please install the scrollkeeper package)
else
   SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir`
   AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR)
fi

AM_CONDITIONAL(HAVE_SCROLLKEEPER, test x$SCROLLKEEPER_CONFIG != xno)

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/share/locale")
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/share/locale")
fi


dnl
dnl Gettext stuff.
dnl
GETTEXT_PACKAGE=mergeant
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
ALL_LINGUAS="am ar az ca cs da de dz el en_CA en_GB es eu fa fi fr gl hr it ja lt lv ml ms nb ne nl oc pl pt pt_BR ru rw sk sl sq sr sr@Latn sv tr uk vi zh_CN  zh_HK zh_TW"
AM_GLIB_GNU_GETTEXT

PKG_CHECK_MODULES(MERGEANT, libgnomedb-3.0 >= 3.0.0 \
	libgnomedb-extra-3.0 \
        libgda-3.0 >= 3.0.0 \
        gtk+-2.0 >= 2.10.0 \
	gdk-pixbuf-2.0 \
	libxml-2.0 \
        libglade-2.0)
AC_SUBST(MERGEANT_CFLAGS)
AC_SUBST(MERGEANT_LIBS)

dnl 
dnl Checks for Libgnomedb-graph variants
dnl 

GNOMEDB_GRAPH_MODULES="libgnomedb-goo-3.0"
PKG_CHECK_MODULES(GNOMEDB_GRAPH, $GNOMEDB_GRAPH_MODULES, have_gnomedb_goocanvas=yes, have_gnomedb_goocanvas=no)
AM_CONDITIONAL(HAVE_GNOMEDB_GOOCANVAS, test x"$have_gnomedb_goocanvas" = "xyes")
if test x"$have_gnomedb_goocanvas" = "xyes"
then
        GNOMEDB_GRAPH_CFLAGS="$GNOMEDB_GRAPH_CFLAGS -DHAVE_GNOMEDB_GOOCANVAS"
        LIBGNOMEDB_REQUIRES="$LIBGNOMEDB_REQUIRES $GNOMEDB_GRAPH_MODULES"
else
	PKG_CHECK_MODULES(GNOMEDB_GRAPH, libgnomedb-graph-3.0)
fi
AC_SUBST(GNOMEDB_GRAPH_CFLAGS)
AC_SUBST(GNOMEDB_GRAPH_LIBS)

MERGEANT_CFLAGS="$MERGEANT_CFLAGS $GNOMEDB_GRAPH_CFLAGS"
MERGEANT_LIBS="$MERGEANT_LIBS $GNOMEDB_GRAPH_LIBS"
AC_SUBST(MERGEANT_CFLAGS)
AC_SUBST(MERGEANT_LIBS)


dnl
dnl Check if src should be build with the debug mode
dnl
AC_ARG_ENABLE(debug, 
	[  --enable-debug          debug [default=no]],
	use_debug="Yes";
	AC_DEFINE(debug), use_debug="No")



dnl
dnl Check if src should be build with the debug_signals mode
dnl
AC_ARG_ENABLE(debug-signal, 
	[  --enable-debug-signal   debug signals sent [default=no]],
	use_debug_sig="Yes";
	AC_DEFINE(debug_signal), use_debug_sig="No")


dnl
dnl where to install various files
dnl
dnl just for info:
dnl $datadir will be $prefix/share
dnl $pkgdatadir will be $datadir/mergeant

MERGEANT_Pixmapdir=${datadir}/pixmaps/${PACKAGE}
AC_SUBST(MERGEANT_Pixmapdir)
MERGEANT_Appdir=${datadir}/gnome/applications
AC_SUBST(MERGEANT_Appdir)
MERGEANT_Helpdir=${datadir}/gnome/help/${PACKAGE}
AC_SUBST(MERGEANT_Helpdir)

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT([
mergeant.spec
mergeant.spec_mdk
Makefile
data/Makefile
src/Makefile
src/binreloc/Makefile
doc/Makefile
doc/mergeant-C.omf
doc/C/Makefile
po/Makefile.in
])

dnl
dnl Print a little note
dnl
echo ""
echo "* Install directories:"
echo "   - Help is in " $MERGEANT_Helpdir
echo "   - Pixmaps are in " $MERGEANT_Pixmapdir
echo "   - .desktop entry is in " $MERGEANT_Appdir
echo "* Compiler flags: " $CFLAGS
echo "* Type make to build mergeant in" $prefix
echo ""