-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
172 lines (143 loc) · 4.48 KB
/
Copy pathconfigure.ac
File metadata and controls
172 lines (143 loc) · 4.48 KB
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
# configure.ac for osso-pdf-viewer
# Mandatory, inits autoconf
# NOTE Update version number to reflect debian/changelog (DON*T USE -x; unnecessary)
#
AC_INIT([osso-pdf-viewer],[1.2.26])
# Tests that source dir exists
AC_CONFIG_SRCDIR([src/main.c])
# For automake: generate rules to reproduce config.h, if needed
AM_CONFIG_HEADER(aconf.h)
#Initialize automake, takes package name and version from AC_INIT
AM_INIT_AUTOMAKE([foreign])
AM_PROG_CC_C_O
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_INSTALL
LT_INIT
dnl Enable these unconditionally.
AC_DEFINE([A4_PAPER], [1], [Default to A4 paper.])
#AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.])
AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])
AC_DEFINE([USE_FIXEDPOINT], [0], [Enable fixed point arithmetic support.])
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations"
CPPFLAGS ="-Wall -Wmissing-declarations"
CXXFLAGS += $(CPPFLAGS)
AC_MSG_CHECKING([whether to use maemo launcher])
AC_ARG_ENABLE([maemo-launcher],
[AS_HELP_STRING([--enable-maemo-launcher],
[default=yes])],
[
case "${enableval}" in
yes) maemo_launcher=true
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
MAEMO_LAUNCHER_LIBS="-Xcompiler \"$MAEMO_LAUNCHER_LIBS\""
AC_SUBST(MAEMO_LAUNCHER_LIBS)
;;
no) maemo_launcher=false
AC_MSG_RESULT([no])
;;
*) AC_MSG_ERROR([
"Bad value ${enableval} for --enable-maemo-launcher,\n"
"give exactly 'yes' or 'no' value."]) ;;
esac
], [maemo_launcher=false])
# Check module dependencies, will automatically inlude all needed
# compiler options to DEPS-variables, see src/Makefile.am for details
PKG_CHECK_MODULES(GDEPS, [
gtk+-2.0 >= 2.2
glib-2.0 >= 2.2
gio-2.0,
gconf-2.0 >= 2.6.4
comapp >= 0.1.1,
x11]
)
AC_SUBST(GDEPS_CFLAGS)
AC_SUBST(GDEPS_LIBS)
# 'libossohelp' dependency
PKG_CHECK_MODULES(HILDON, [
hildon-1 >= 0.8.1
hildon-fm-2 >= 0.8.1
libosso >= 0.8.1
libhildonmime]
)
AC_SUBST(HILDON_CFLAGS)
AC_SUBST(HILDON_LIBS)
AC_MSG_CHECKING([for Bluetooth support])
conbtui=`pkg-config --cflags conbtdialogs 2> /dev/null`
AM_CONDITIONAL(HAVE_BLUETOOTH, test "x$conbtui" != "x")
if test "x$conbtui" != "x" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
# Localization-related
#AC_PROG_INTLTOOL([0.23])
GETTEXT_PACKAGE=osso-pdf-viewer
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of gettext package])
#ALL_LINGUAS="de_DE en_GB en_US es_ES es_MX fr_FR it_IT"
#ALL_LINGUAS="en_GB"
AM_GLIB_GNU_GETTEXT
localedir=${datadir}/locale
AC_SUBST(localedir)
pixmapsdir=${datadir}/pixmaps
AC_SUBST(pixmapsdir)
# Mime
dnl MIME-type registration check (2.6 / 2.8 version)
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AM_CONDITIONAL(HAVE_26_MIME, test x$UPDATE_MIME_DATABASE != xno)
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
AM_CONDITIONAL(HAVE_28_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)
# xpdf related checks
dnl #### Default values for Unix
LIBPREFIX="lib"
AR="ar"
UP_DIR=""
dnl #### Do substitutions
AC_SUBST(LIBPREFIX)
AC_SUBST(AR)
AC_SUBST(UP_DIR)
dnl #### check for freetype2
PKG_CHECK_MODULES(FREETYPE, freetype2)
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
dnl #### Check for headers
AC_PATH_XTRA
AC_HEADER_DIRENT
dnl #### Check for library functions
AC_CHECK_FUNCS(popen mkstemp mkstemps)
dnl ##### Check for fseeko/ftello or fseek64/ftell64
dnl The LARGEFILE and FSEEKO macros have to be called in C, not C++, mode.
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(fseek64, xpdf_cv_func_fseek64=yes, xpdf_cv_func_fseek64=no)
AC_CHECK_FUNCS(ftell64, xpdf_cv_func_ftell64=yes, xpdf_cv_func_ftell64=no)
if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
AC_DEFINE(HAVE_FSEEK64)
fi
dbuslibpathdir=`pkg-config --variable=libdir dbus-1`
dbusconfdir=/etc/dbus-1/system.d
dbusservdir=/usr/share/dbus-1/services
AC_SUBST(dbuslibpathdir)
AC_SUBST(dbusconfdir)
AC_SUBST(dbusservdir)
# Define ouput files
AC_CONFIG_FILES([
Makefile
data/Makefile
data/osso_pdfviewer.desktop
data/com.nokia.osso_pdfviewer.service
fofi/Makefile
goo/Makefile
splash/Makefile
xpdf/Makefile
src/Makefile
])
# po/Makefile.in
# po/porules.mk
# Mandatory, produce ouput
AC_OUTPUT