summaryrefslogtreecommitdiff
path: root/configure.in
blob: 04f01a3330343b3fb9747a75254f5200c50b7637 (plain)
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
192
193
194
195
196
197
198
199
200
201
202
203
204
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.52)

AC_INIT(gedit, 2.8.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gedit)
AC_CONFIG_SRCDIR(gedit/gedit2.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

GEDIT_MAJOR=2.8
AC_SUBST(GEDIT_MAJOR)

AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AM_DISABLE_STATIC

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AC_PROG_INTLTOOL([0.31])

AM_PROG_LIBTOOL

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")

dnl ================================================================
dnl Gettext stuff.
dnl ================================================================
GETTEXT_PACKAGE=gedit-2.6
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
ALL_LINGUAS="af am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja kn ko lt lv mi mk ml mn mr ms nb ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tk tr uk vi wa zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

dnl ******************
dnl pspell checks
dnl ******************

AC_MSG_CHECKING([for aspell/pspell])
if pspell-config version > /dev/null 2>&1; then
	pspell_ver=`pspell-config version`
	pspell_num=`echo ${pspell_ver} | awk 'BEGIN {FS="."}{printf $1*10000 + $2*100 + $3;}'`
	if test ${pspell_num} -lt 1200; then
		AC_MSG_RESULT([pspell version .12 or later required, you have ${pspell_ver} installed])
	else
		AC_MSG_RESULT([found ($pspell_ver)])

		AC_CHECK_HEADER(pspell/pspell.h,
			[AC_CHECK_LIB(aspell, new_aspell_speller, 
				[PSPELL_LIBS="-laspell" SPELL_PLUGIN_DIR="spell" AC_SUBST(SPELL_PLUGIN_DIR)],
   				[AC_CHECK_LIB(pspell, new_pspell_manager, 
					[PSPELL_LIBS="-lpspell" SPELL_PLUGIN_DIR="spell" AC_SUBST(SPELL_PLUGIN_DIR)],
					[AC_MSG_WARN([You must have the aspell or pspell dev packages to build the spell plugin.])] 
				)]
			)],
			[AC_MSG_WARN([You must have the aspell or pspell dev packages to build the spell plugin.])] 
		)
	fi
else
	AC_MSG_RESULT([not found])
fi

AC_SUBST(PSPELL_LIBS)

dnl
dnl Start of pkg-config checks
dnl
PKG_CHECK_MODULES(GEDIT, libgnomeui-2.0 >= 2.6.0 libglade-2.0 >= 2.3.6
                         eel-2.0 >= 2.6.0 gtksourceview-1.0 >= 1.0.0
			 libgnomeprintui-2.2 >= 2.6.0)
GEDIT_LIBS="${GEDIT_LIBS}"
AC_SUBST(GEDIT_LIBS)
AC_SUBST(GEDIT_CFLAGS)

dnl
dnl GConf related settings
dnl

AM_GCONF_SOURCE_2

dnl
dnl Check popt
dnl

AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
gedit. You can download the latest version from ftp://people.redhat.com/sopwith/popt/]))

dnl
dnl Check ngettext
dnl

AC_CHECK_FUNCS(ngettext,, AC_MSG_ERROR([ngettext function is required to build gedit.]))

dnl ================================================================
dnl GEDIT_DATA_DIR - Sets the location of the data directory, where we install
dnl source files added to projects (such as all the Gnome m4 macros).
dnl This will substitute GEDIT_DATA_DIR in config.h.
dnl ================================================================
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Directory of data files])
  else
    AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${prefix}/share/${PACKAGE}", [Directory of data files])
  fi
else
  AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${datadir}/${PACKAGE}", [Directory of data files])
fi

dnl ================================================================
dnl PIXMAPS 
dnl ================================================================
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [Directory of pixmaps])
  pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
else
  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [Directory of pixmaps])
  pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
fi

AC_SUBST(pixmapsdir)

AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
			      
GNOME_COMPILE_WARNINGS(yes)

AC_ARG_ENABLE(deprecations,
              [AC_HELP_STRING([--enable-deprecations],
                              [warn about deprecated usages [default=no]])],,
              [enable_deprecations=no])

if test "x$enable_deprecations" = "xyes"; then
   DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED"
   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

dnl stuff for the CORBA interface

ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)

LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(LIBBONOBO_IDL)

BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL)

PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)

AC_OUTPUT([
Makefile
data/gedit.pc
data/Makefile
po/Makefile.in
gedit/Makefile
gedit/dialogs/Makefile
gedit/recent-files/Makefile
pixmaps/Makefile
plugins/Makefile
plugins/changecase/Makefile
plugins/spell/Makefile
plugins/docinfo/Makefile
plugins/sample/Makefile
plugins/time/Makefile
plugins/indent/Makefile
plugins/taglist/Makefile
plugins/shell_output/Makefile
plugins/sort/Makefile
viewer/Makefile
help/Makefile
help/C/Makefile
help/de/Makefile
help/es/Makefile
help/eu/Makefile
help/fr/Makefile
help/it/Makefile
help/sv/Makefile
help/ja/Makefile
help/ko/Makefile
help/zh_CN/Makefile
help/zh_HK/Makefile
help/zh_TW/Makefile
help/ro/Makefile
])


echo "

Configuration:

	Source code location:	${srcdir}
	Compiler:		${CC} 

"

dnl cat $srcdir/message-of-doom