Xfce Wiki

Sub domains
 
aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: 8a9a9111435a30624813bdccd34e26a35d9b192a (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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
dnl $Id$
dnl
dnl Orage - Calendar application for Xfce
dnl
dnl Copyright (c) 2003-2011
dnl         The Xfce development team. All rights reserved.
dnl
dnl Written for Xfce by Juha Kautto <juha@xfce.org>
dnl

dnl Version information
m4_define([orage_version], [4.10.0])

m4_define([gtk_minimum_version], [2.14.0])
m4_define([xfce_minimum_version], [4.8.0])
m4_define([dbus_minimum_version], [0.1])
m4_define([notify_minimum_version], [0.3.2])
m4_define([intltool_minimum_version], [0.31])
m4_define([libical_minimum_version], [0.43])


dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
dnl # YOU ARE DOING.


dnl Initialize autoconf
AC_COPYRIGHT([Copyright (c) 2003-2011
        The Xfce development team. All rights reserved.

Written for Xfce by Juha Kautto <juha@xfce.org>.])
AC_INIT([orage], [orage_version], [xfce4-dev@xfce.org])
AC_CANONICAL_SYSTEM()
AC_PREREQ([2.50])
AC_REVISION([$Id$])

dnl Initialize automake
ORAGE_VERSION=orage_version()
AM_INIT_AUTOMAKE([orage], [$ORAGE_VERSION])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()

dnl Check for UNIX variants
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()
AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""])

dnl Check for basic programs
AC_PROG_CC()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
AC_PROG_LIBTOOL()
AC_PROG_YACC()
AC_PROG_LN_S()
AM_PROG_LEX()
AM_PROG_CC_C_O()
 
dnl Check for standard header files
AC_HEADER_STDC()
AC_CHECK_HEADERS([assert.h errno.h pthread.h stdint.h time.h sys/types.h unistd.h wctype.h])

dnl Checks for typedefs, structures, and compiler characteristics (libical)
AC_C_CONST()
AC_TYPE_SIZE_T()
AC_TYPE_MODE_T()
AC_STRUCT_TM()

dnl Checks for library functions (libical)
AC_CHECK_FUNCS([gmtime_r iswspace strdup snprintf])

dnl Check for i18n support
XDT_I18N([@LINGUAS@])

dnl Check for required packages
#XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [xfce_minimum_version])
XDT_CHECK_PACKAGE([LIBGTK], [gtk+-2.0], [gtk_minimum_version])

dnl Needed for panel plugin
#XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [xfce_minimum_version])

dnl ************************************************
dnl *** Optional support for Xfce Panel          ***
dnl ************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0],
                            [xfce_minimum_version], [libxfce4panel],
                            [LIBXFCE4PANEL support])

dnl *********************************************
dnl *** Optional support for external libical ***
dnl *********************************************
dnl *** This is optional NOW, but will become mandatory after external
dnl *** libical can do what Orage internal version can do or Orage works
dnl *** with it.
XDT_CHECK_OPTIONAL_PACKAGE([LIBICAL], [libical],
                           [libical_minimum_version], [libical],
                           [LIBICAL support])

if test x"$LIBICAL_FOUND" = x"yes"; then
echo "* LIBICAL support:           yes"
else
echo "* LIBICAL support:           no"
dnl the ical magic
ac_INCLUDED_LIBICAL=yes

dnl Check for additional programs (libical)
AC_CHECK_PROGS([AR], [ar aal], [ar])
AC_CHECK_PROGS([PERL], [perl5 perl])  
 
AC_MSG_CHECKING(for Berkeley DB4 support)
AC_ARG_WITH(bdb4, [  --with-bdb4             Add support for Berkeley DB 4.0],
[case $with_bdb4 in  
    yes)	AC_MSG_RESULT(yes)
    AC_MSG_RESULT(  Adding Berkeley DB support)
    WITH_BDB4="yes"
    ;;
    no)		AC_MSG_RESULT(no)
    ;;
    *)		AC_MSG_RESULT(no)
    AC_MSG_RESULT(Ignoring unknown argument to --with-bdb4: $with_bdb4)
    ;;
esac],
AC_MSG_RESULT(no))

if test x$WITH_BDB4 = xyes; then
  AC_ARG_WITH(bdb4_dir, [  --with-bdb4-dir=PATH    Use PATH as location of BerkeleyDB 4.0],
     BDB_DIR=$withval,
     BDB_DIR=/usr/local/BerkeleyDB.4.0
  )

  AC_MSG_CHECKING(for Berkeley DB include files)
  if test -f $BDB_DIR/include/db.h; then
   BDB_DIR_INCLUDE=$BDB_DIR/include
   AC_MSG_RESULT($BDB_DIR_INCLUDE)
  else
    if test -f $BDB_DIR/include/db4/db.h; then
     BDB_DIR_INCLUDE=$BDB_DIR/include/db4
     AC_MSG_RESULT($BDB_DIR_INCLUDE)
    else
     WITH_BDB4="no"
     AC_MSG_RESULT(not found!)
    fi
  fi

  AC_MSG_CHECKING(for Berkeley DB libraries)
  if test -f $BDB_DIR/lib/libdb-4.0.la; then
   BDB_DIR_LIB=$BDB_DIR/lib
   BDB_LIB=libdb-4.0.la
   AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB)
  else
    if test -f $BDB_DIR/lib/libdb4.la; then
     BDB_DIR_LIB=$BDB_DIR/lib
     BDB_LIB=libdb4.la
     AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB)
    else
     WITH_BDB4="no"
     AC_MSG_RESULT(not found!)
    fi
  fi

  AC_SUBST(BDB_DIR)
  AC_SUBST(BDB_DIR_INCLUDE)
  AC_SUBST(BDB_DIR_LIB)
  AC_SUBST(BDB_LIB)
  dnl 4.0 is required...
  BDB_VERSION="4.0"
  AC_SUBST(BDB_VERSION)
fi

AC_MSG_CHECKING(whether to define _REENTRANT)
AC_ARG_ENABLE(reentrant, [  --enable-reentrant      define _REENTRANT to enable reentrant system calls],
[ case "${enableval}" in
  no)
    AC_MSG_RESULT(no)
    ac_cv_reentrant=no
    ;;
  *) 
    AC_MSG_RESULT(yes)
    AC_DEFINE([ICAL_REENTRANT], ,[Define if we want _REENTRANT]) [CFLAGS="$CFLAGS -D_REENTRANT"]
    ac_cv_reentrant=yes
    ;;
  esac ],
  AC_MSG_RESULT(no)
)
case "${host}" in 
        *-*-freebsdelf4* )
    AC_MSG_RESULT(checking for pthread_create in -lpthread... -pthread (FreeBSD 4.x style))
    AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
    PTHREAD_LIBS=-pthread;;

  *)
  AC_CHECK_LIB([pthread], [pthread_create], [have_pthread=yes])
  if test "x$have_pthread" = xyes; then
     AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
     PTHREAD_LIBS=-lpthread
  fi;;
esac
AC_SUBST([PTHREAD_LIBS])
LIBICAL_DIRS="
libical/Makefile
libical/design-data/Makefile
libical/doc/Makefile
libical/scripts/Makefile
libical/src/Makefile
libical/src/libical/Makefile
libical/src/libical/icalversion.h
libical/src/libicalss/Makefile
libical/zoneinfo/Makefile"
fi

dnl **********************************
dnl *** check if we have _NL_TIME_FIRST_WEEKDAY 
dnl *** note that it is an enum and not a define
dnl **********************************
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *)  nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
], nl_ok=yes, nl_ok=no)
AC_MSG_RESULT($nl_ok)
if test "$nl_ok" = "yes"; then
  AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
      [Define if _NL_TIME_FIRST_WEEKDAY is available])
fi

AM_CONDITIONAL([INCLUDED_LIBICAL], [test x"$ac_INCLUDED_LIBICAL" = x"yes"])
AM_CONDITIONAL([HAVE_PTHREAD], [test x"$have_pthread" = x"yes"])
AM_CONDITIONAL([WITH_BDB4], [test x"$WITH_BDB4" = x"yes"])

dnl **********************************
dnl *** Optional support for D-BUS ***
dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1],
                           [dbus_minimum_version], [dbus],
                           [D-BUS support])

dnl **************************************
dnl *** Optional support for libnotify ***
dnl **************************************
XDT_CHECK_OPTIONAL_PACKAGE([NOTIFY], [libnotify],
                           [notify_minimum_version], [libnotify],
                           [LIBNOTIFY support])

dnl **************************************
dnl *** Check support for libpopt      ***
dnl **************************************
AC_CHECK_LIB([popt], [poptGetContext], 
        [have_popt="yes"
         AC_DEFINE([HAVE_LIBPOTPT], [1], [Define if we have popt])
        ])
AM_CONDITIONAL([HAVE_LIBPOTPT], [test x"$have_popt" = x"yes"])

dnl ************************************************
dnl *** Optional support for automatic archiving ***
dnl ************************************************
have_archive="no"
AC_ARG_ENABLE([archive],
AC_HELP_STRING([--enable-archive], [use automatic archiving (defaut=yes)])
AC_HELP_STRING([--disable-archive], [do not use automatic archiving]),
  [], [enable_archive=yes])
if test x"$enable_archive" = x"yes"; then
    AC_DEFINE([HAVE_ARCHIVE], [1], [Define to enable archiving])
    have_archive="yes"
fi

dnl ************************************************
dnl *** Optional support for 4.6 Xfce            ***
dnl ************************************************
dnl XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0],
dnl                            [xfce_minimum_version], [libxfcegui4],
dnl                            [LIBXFCEGUI4 support])

dnl ************************************************
dnl *** Optional support for 4.8 Xfce            ***
dnl ************************************************
dnl XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],
dnl                            [xfce_minimum_version], [libxfce4ui],
dnl                            [LIBXFCE4UI support])

dnl Check for debugging support
dnl BM_DEBUG_SUPPORT()
XDT_FEATURE_DEBUG

dnl the intention was to use variable
dnl $LIBICAL_DIRS
dnl to control if libical is being compiled or not, but only very
dnl recent autotools can have such variables in AC_OUTPUT.
dnl Reverting back to full list until time is right for using it.
dnl This causes some extra work at compile time, but should not cause
dnl any issues to users.

AC_OUTPUT([ 
Makefile
libical/Makefile
libical/design-data/Makefile
libical/doc/Makefile
libical/scripts/Makefile
libical/src/Makefile
libical/src/libical/Makefile
libical/src/libical/icalversion.h
libical/src/libicalss/Makefile
libical/zoneinfo/Makefile
xfcalendar.spec
icons/Makefile
icons/48x48/Makefile
icons/160x160/Makefile
icons/scalable/Makefile
po/Makefile.in
sounds/Makefile
src/Makefile
plugin/Makefile
doc/Makefile
doc/C/Makefile
doc/C/images/Makefile
panel-plugin/Makefile
globaltime/Makefile
tz_convert/Makefile
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$DBUS_FOUND" = x"yes"; then
echo "* D-BUS support:             yes"
else
echo "* D-BUS support:             no"
fi
if test x"$NOTIFY_FOUND" = x"yes"; then
echo "* LIBNOTIFY support:         yes"
else
echo "* LIBNOTIFY support:         no"
fi
if test x"$LIBICAL_FOUND" = x"yes"; then
echo "* LIBICAL support:           yes"
else
echo "* LIBICAL support:           no. Using Orage local libical"
fi
echo "* Automatic archiving:       $have_archive"
if test x"$have_popt" = x"yes"; then
echo "* libpopt available:         yes, building tz_convert"
else
echo "* libpopt not available:     no, not building tz_convert"
fi
if test x"$LIBXFCE4PANEL_FOUND" = x"yes"; then
echo "* LIBXFCE4PANEL support:     yes, building xfce panel plugin"
else
echo "* LIBXFCE4PANEL support:     no, not building xfce panel plugin"
fi
echo