source: filezilla/trunk/fuentes/.pc/01_remove-xdg-check.patch/configure.ac @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 22.0 KB
Line 
1AC_INIT([FileZilla],[3.14.1],[tim.kosse@filezilla-project.org],[],[https://filezilla-project.org/])
2AC_CONFIG_HEADERS([src/include/config.h])
3AC_CONFIG_MACRO_DIR([m4])
4AC_CONFIG_AUX_DIR(config)
5AM_INIT_AUTOMAKE([dist-bzip2])
6
7AC_CANONICAL_HOST
8
9AC_PROG_CXX
10AM_PROG_CC_C_O
11AC_PROG_INSTALL
12
13LT_INIT
14LT_LANG([C++])
15
16AC_CACHE_SAVE
17
18AC_ARG_ENABLE(locales, AS_HELP_STRING([--enable-locales],[Build message catalogs]), \
19        [locales="$enableval"], [locales="yes"])
20
21# Todo: Investigate using sub-configure scripts
22AC_ARG_ENABLE(localesonly, AS_HELP_STRING([--enable-localesonly],[Just build locales]), \
23        [localesonly="$enableval"], [localesonly="no"])
24
25if test "$locales" != "yes" -a "$localesonly" = "yes"; then
26  AC_MSG_ERROR([invalid flags: --disable-locales cannot be used together with --enable-localesonly])
27fi
28
29if test "$localesonly" = "yes"; then
30  buildmain="no"
31else
32  buildmain="yes"
33fi
34
35if ! test "$localesonly" = "yes"; then
36
37  if test "X$GCC" = Xyes; then
38    CFLAGS="$CFLAGS -Wall -g"
39    CXXFLAGS="$CXXFLAGS -Wall -g"
40  fi
41
42  # Check for C++14 support
43  CXX_COMPILE_STDCXX_14([],[mandatory])
44  CHECK_LIBCXX
45
46  # libstdc++ as shipped with GCC 4.7 lacks std::map::emplace
47  FZ_CHECK_MAP_EMPLACE
48
49  # libstdc++ as shipped with GCC 4.7 has a steady clock that isn't steady (who implements such crap?)
50  CHECK_STEADY_CLOCK
51
52  # No thread_local in GCC 4.7 and it for some reason isn't supported on OS X either
53  CHECK_THREAD_LOCAL
54
55  # std::atomic on PPC seems to require -latomic
56  CHECK_ATOMIC
57
58  # Add build information to config.h
59  # ---------------------------------
60
61  # Add host to config.h
62  AC_DEFINE_UNQUOTED(USED_HOST, ["$host"], [Host system under which the program will run.])
63  AC_DEFINE_UNQUOTED(USED_BUILD, ["$build"], [Build system under which the program was compiled on.])
64
65  # Add used CXXFLAGS to config.h
66  AC_DEFINE_UNQUOTED(USED_CXXFLAGS, ["$CXXFLAGS"], [Define to the used CXXFLAGS to compile this package.])
67
68  # Get compiler (version)
69  AH_TEMPLATE(USED_COMPILER, [Define to name and version of used compiler])
70  if COMPILER=`$CC --version | head -n 1`; then
71    AC_DEFINE_UNQUOTED(USED_COMPILER, ["$COMPILER"])
72  fi
73
74  # Get buildtype.
75  AC_ARG_ENABLE(buildtype, AS_HELP_STRING([--enable-buildtype=TYPE],[DO NOT USE. Reserved for use by official maintainer. TYPE can either be 'official' or 'nightly'.]),
76    [buildtype="$enableval"], [buildtype=])
77  buildtype_valid=false
78  if test -z "$buildtype"; then
79    buildtype_valid=true
80  elif test "$buildtype" = "official"; then
81    buildtype_valid=true
82  elif test "$buildtype" = "nightly"; then
83    buildtype_valid=true
84  fi
85
86  if test "$buildtype_valid" != "true"; then
87    AC_MSG_ERROR([invalid buildtype passed])
88  fi
89
90  if ! test -z "$buildtype"; then
91    AC_DEFINE_UNQUOTED(BUILDTYPE, ["$buildtype"], [Buildtype, indicates official builds and nightly builds])
92  fi
93fi
94
95# Shell extension
96# ---------------
97
98AC_MSG_NOTICE([Running sub-configure for shell extension])
99if false; then
100  # For autoreconf machinery
101  AC_CONFIG_SUBDIRS([src/fzshellext])
102fi
103
104OLD_DIR="`pwd`"
105mkdir -p "$OLD_DIR/src/fzshellext/32"
106mkdir -p "$OLD_DIR/src/fzshellext/64"
107
108AC_ARG_ENABLE(shellext, [], \
109        [shellext="$enableval"], [shellext="yes"])
110
111if test "$localesonly" != "yes" && echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1 && test "$shellext" = "yes"; then
112  cd "$OLD_DIR/src/fzshellext/32" || exit 1
113  "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=i686-w64-mingw32 || exit 1
114  cd "$OLD_DIR/src/fzshellext/64" || exit 1
115  "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=x86_64-w64-mingw32 || exit 1
116else
117  cd "$OLD_DIR/src/fzshellext/64" || exit 1
118  "$ac_abs_confdir/src/fzshellext/configure" --disable-shellext || exit 1
119fi
120cd "$OLD_DIR"
121
122
123
124if test "$buildmain" = "yes"; then
125
126  # Require pkg-config
127  # ------------------
128  PKG_PROG_PKG_CONFIG
129  if test -z "$PKG_CONFIG"; then
130    AC_MSG_ERROR([pkg-config not found. pkg-config is required to check for some dependencies.])
131  fi
132 
133  # Detect wxWidgets
134  # ----------------
135
136  AM_OPTIONS_WXCONFIG
137
138  MIN_WX_VERSION="3.0.2"
139  AM_PATH_WXCONFIG([$MIN_WX_VERSION], [wxWin=1], , [aui,xrc,adv,core,xml,net,base], [--unicode=yes --universal=no])
140  if test "$wxWin" != 1; then
141    AC_MSG_ERROR([
142        wxWidgets must be installed on your system
143        but either the wx-config script couldn't be found or
144        no compatible wxWidgets configuration has been installed.
145
146        Compatible wxWidgets configurations are the unicode builds
147        of wxGTK, wxMac and wxMSW.
148
149        Please check that wx-config is in path, the directory
150        where wxWidgets libraries are installed (returned by
151        'wx-config --libs' command) is in LD_LIBRARY_PATH or
152        equivalent variable and wxWidgets version is $MIN_WX_VERSION or above.
153    ])
154  fi
155
156  # --universal=no doesn't work correctly, it still accepts universal builds. Reject it manually here.
157  if echo "$WX_CPPFLAGS" | grep __WXUNIVERSAL__ > /dev/null; then
158    AC_MSG_ERROR([wxUniversal is not acceptable as flavour of wxWidgets. Please recompile wxWidgets with --disable-universal])
159  fi
160
161  AC_LANG_PUSH(C++)
162  CPPFLAGS_OLD="$CPPFLAGS"
163  CXXFLAGS_OLD="$CXXFLAGS"
164  CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
165  CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
166  AC_MSG_CHECKING([positional printf argument support in wxWidgets])
167  AC_COMPILE_IFELSE(
168    [AC_LANG_PROGRAM([[
169          #include <wx/wx.h>
170          #if !wxUSE_PRINTF_POS_PARAMS
171            #error wx compiled without wxUSE_PRINTF_POS_PARAMS
172          #endif
173        ]])],
174      AC_MSG_RESULT([yes]),
175      [
176        AC_MSG_RESULT([no])
177        AC_MSG_FAILURE([Positional printf argument support in wxWidgets is required by FileZilla. Please rebuild wxWidgets and pass --enable-printfposparam to its configure script.])
178      ]
179    )
180  CPPFLAGS="$CPPFLAGS_OLD"
181  CXXFLAGS="$CXXFLAGS_OLD"
182  AC_LANG_POP
183
184  AC_SUBST(WX_CONFIG_WITH_ARGS)
185
186  AC_CACHE_SAVE
187
188  # Get OS type for PUTTY frontend
189  # ------------------------------
190
191  AC_MSG_CHECKING([system type for sftp stub])
192  sftpbuild="unix"
193  if echo $host_os | grep "mingw" > /dev/null 2>&1; then sftpbuild="mingw"; fi
194  AC_MSG_RESULT([$sftpbuild])
195
196  # Checks for PuTTY
197  # ----------------
198
199  AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
200  #include <sys/types.h>
201  #include <utmp.h>])
202
203  AC_SEARCH_LIBS([socket], [xnet])
204  AC_SEARCH_LIBS([getaddrinfo], [xnet])
205  AC_SEARCH_LIBS([in6addr_loopback], [socket])
206
207  AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
208  AC_CHECK_FUNCS([gettimeofday ftime])
209  AC_CHECK_FUNCS([in6addr_loopback in6addr_any])
210  AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
211
212  AC_CACHE_CHECK([for SO_PEERCRED and dependencies], [x_cv_linux_so_peercred], [
213      AC_COMPILE_IFELSE([
214          AC_LANG_PROGRAM([[
215              #define _GNU_SOURCE
216              #include <features.h>
217              #include <sys/socket.h>
218            ]],[[
219              struct ucred cr;
220              socklen_t crlen = sizeof(cr);
221              return getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cr, &crlen) +
222              cr.pid + cr.uid + cr.gid;
223            ]]
224          )],
225          AS_VAR_SET(x_cv_linux_so_peercred, yes),
226          AS_VAR_SET(x_cv_linux_so_peercred, no)
227      )
228  ])
229  AS_IF([test AS_VAR_GET(x_cv_linux_so_peercred) = yes],
230      [AC_DEFINE([HAVE_SO_PEERCRED], [1],
231       [Define if SO_PEERCRED works in the Linux fashion.])]
232  )
233fi
234
235if test "$buildmain" = "yes"; then
236
237  # Check for windres on MinGW builds
238  # ---------------------------------
239
240  # Small function to filter the flags for windres,
241  # so that only includes and defines are passed to windres.
242  parseflags() {
243    WINDRESFLAGS=""
244    for opt in "$@"
245    do
246        case "$opt" in
247        -I*)
248            WINDRESFLAGS="$WINDRESFLAGS --include-dir=${opt#-I}"
249            ;;
250        -D*)
251            WINDRESFLAGS="$WINDRESFLAGS $opt"
252            ;;
253        esac
254    done
255  }
256
257  WINDRESFLAGS=
258  use_resourcefile=
259  AC_MSG_CHECKING([whether to use windres])
260  if echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1; then
261    if echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
262      AC_MSG_RESULT([yes])
263      AC_CHECK_TOOL([WINDRES], [windres])
264      if test "x$WINDRES" = "x"; then
265        AC_MSG_ERROR([windres could not be found, please make sure this program is within your path.])
266      fi
267      use_resourcefile=true
268      parseflags $WX_CPPFLAGS
269
270      FZ_CHECK_ICOPYHOOKW
271    else
272      AC_MSG_RESULT([no])
273    fi
274  else
275    AC_MSG_RESULT([no])
276  fi
277  AC_SUBST(WINDRES)
278  AC_SUBST(WINDRESFLAGS)
279
280  # Set version macros
281  # ------------------
282
283  # version.rc.in needs a major, minor and micro version number
284  vnumber=${PACKAGE_VERSION%-*}
285  PACKAGE_VERSION_MAJOR=${vnumber%%.*}
286  vnumber=${vnumber#$PACKAGE_VERSION_MAJOR}
287  vnumber=${vnumber#.}
288  PACKAGE_VERSION_MINOR=${vnumber%%.*}
289  vnumber=${vnumber#$PACKAGE_VERSION_MINOR}
290  vnumber=${vnumber#.}
291  PACKAGE_VERSION_MICRO=${vnumber%%.*}
292  vnumber=${vnumber#$PACKAGE_VERSION_MICRO}
293  vnumber=${vnumber#.}
294  PACKAGE_VERSION_NANO=${vnumber%%.*}
295
296  if test -z "$PACKAGE_VERSION_MAJOR"; then
297    PACKAGE_VERSION_MAJOR=0
298  fi
299  if test -z "$PACKAGE_VERSION_MINOR"; then
300    PACKAGE_VERSION_MINOR=0
301  fi
302  if test -z "$PACKAGE_VERSION_MICRO"; then
303    PACKAGE_VERSION_MICRO=0
304  fi
305  if test -z "$PACKAGE_VERSION_NANO"; then
306    PACKAGE_VERSION_NANO=0
307  fi
308
309  AC_SUBST(PACKAGE_VERSION_MAJOR)
310  AC_SUBST(PACKAGE_VERSION_MINOR)
311  AC_SUBST(PACKAGE_VERSION_MICRO)
312  AC_SUBST(PACKAGE_VERSION_NANO)
313
314  # Enable DEP and ASLR linker flags
315  # --------------------------------
316
317  AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])
318  AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"])
319
320  # Set Windows-specific linker flags
321  # ---------------------------------
322  if echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1; then
323    # We currently require Vista minimum.
324    AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6], [LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6"])
325    AX_CHECK_LINK_FLAG([-Wl,--minor-subsystem-version -Wl,0], [LDFLAGS="$LDFLAGS -Wl,--minor-subsystem-version -Wl,0"])
326    AX_CHECK_LINK_FLAG([-Wl,--major-os-version -Wl,6], [LDFLAGS="$LDFLAGS -Wl,--major-os-version -Wl,6"])
327    AX_CHECK_LINK_FLAG([-Wl,--minor-os-version -Wl,0], [LDFLAGS="$LDFLAGS -Wl,--minor-os-version -Wl,0"])
328
329    # Set the Large Address Aware flag on 32bit Windows
330    if ! echo $host_cpu | grep "x86_64" > /dev/null 2>&1; then
331      AX_CHECK_LINK_FLAG([-Wl,--large-address-aware], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
332    fi
333  fi
334fi
335
336if test "$buildmain" = "yes"; then
337
338  # Mac OS X specific checks
339  # ------------------------
340
341  # Create application bundle on OS X
342  if echo $WX_CPPFLAGS | grep __WXMAC__; then
343    macappbundle="yes"
344  else
345    macappbundle="no"
346  fi
347
348  # Installer creation under Windows
349  # --------------------------------
350
351  # Create installer under Windows
352  if echo $host_os | grep "mingw" > /dev/null 2>&1; then
353    makensisscript="yes"
354    if echo $host_cpu | grep "x86_64" > /dev/null 2>&1; then
355      NSIS_64BIT=1
356    else
357      NSIS_64BIT=0
358    fi
359    AC_SUBST(NSIS_64BIT)
360  else
361    makensisscript="no"
362  fi
363
364  if echo $host_os | grep "mingw" > /dev/null 2>&1; then
365    AC_CONFIG_FILES(data/install.nsi)
366    AC_CONFIG_FILES(data/makezip.sh)
367  fi
368
369  # Libidn checks
370  # -------------
371
372  IDN_LIB=
373  if ! echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
374    AC_LANG_PUSH(C++)
375    AX_CHECK_DEFINE([netdb.h], [AI_IDN],
376      [],
377      [
378        AC_CHECK_HEADER(idna.h,,
379        [
380          AC_MSG_ERROR([idna.h not found which is part of GNU libidn.])
381        ])
382
383        AC_ARG_WITH(idn-lib,
384            AS_HELP_STRING([--with-idn-lib=FILE],[Use the given path to the idn library.]),
385        [
386          if test "$withval" != "yes" -a "$withval" != ""; then
387              IDN_LIB=$withval
388          fi
389        ])
390
391        if test "x$IDN_LIB" = "x"; then
392          AC_CHECK_LIB(idn, stringprep_check_version, IDN_LIB="-lidn",
393                       AC_MSG_ERROR([GNU libidn not found. Try using --with-idn-lib=FILE to specify the library path.])
394                       )
395        fi
396      ])
397    AC_LANG_POP(C++)
398  fi
399  AC_SUBST(IDN_LIB)
400
401  # Binreloc
402  # --------
403
404  # Check if we should use BinReloc
405  AH_TEMPLATE(ENABLE_BINRELOC, [Define ENABLE_BINRELOC on systems where the executable
406                                location can be obtained using /proc/self/maps])
407  AC_MSG_CHECKING([whether to use BinReloc])
408  if echo $host_os | grep -i "cygwin\|mingw\|mac\|apple" > /dev/null 2>&1 ; then
409    use_binreloc=no
410  else
411    use_binreloc=yes
412    AC_DEFINE(ENABLE_BINRELOC)
413  fi
414
415  AC_MSG_RESULT([$use_binreloc])
416
417  # Precompiled headers support
418  # ---------------------------
419
420  AC_MSG_CHECKING([whether to use precompiled headers])
421  use_precomp=""
422  AC_ARG_ENABLE(precomp, AS_HELP_STRING([--enable-precomp],[Use precompiled headers]), \
423                use_precomp="$enableval")
424  if test "x$enable_dependency_tracking" = "xno"; then
425    use_precomp="no"
426  fi
427  if test -z "$use_precomp"; then
428    if test "X$GCC" = Xyes; then
429      if gcc_version=`$CC -dumpversion` > /dev/null 2>&1; then
430        major=`echo $gcc_version | cut -d. -f1`
431        minor=`echo $gcc_version | sed "s/@<:@-,a-z,A-Z@:>@.*//" | cut -d. -f2`
432        if test -z "$major" || test -z "$minor"; then
433          use_precomp=no
434        elif test "$major" -ge 4; then
435          use_precomp=yes
436        else
437          use_precomp=no
438        fi
439      else
440        use_precomp=no
441      fi
442    else
443      use_precomp=no
444    fi
445  fi
446  if test "x$use_precomp" = "xyes"; then
447    CPPFLAGS="$CPPFLAGS -fpch-preprocess"
448    AC_MSG_RESULT([yes])
449  else
450    AC_MSG_RESULT([no])
451  fi
452
453  # CppUnit tests
454  # -------------
455
456  AM_PATH_CPPUNIT([1.10.2], [has_cppunit="yes"])
457
458  # Updatecheck related flags
459  # -------------------------
460
461  AC_ARG_ENABLE(manualupdatecheck, AS_HELP_STRING([--disable-manualupdatecheck],[Disallow the user to manually check for new versions. Implies --disable-autoupdatecheck]),
462    [manualupdatecheck="$enableval"], [manualupdatecheck="yes"])
463
464  if test "$manualupdatecheck" = "no"; then
465    manualupdatecheck="0"
466  else
467    manualupdatecheck="1"
468  fi
469  AC_DEFINE_UNQUOTED(FZ_MANUALUPDATECHECK, $manualupdatecheck, [Set to 1 to enable user initiated update checks])
470
471  AC_ARG_ENABLE(autoupdatecheck, AS_HELP_STRING([--disable-autoupdatecheck],[Disables the ability of FileZilla to check for new versions automatically.]),
472    [autoupdatecheck="$enableval"], [autoupdatecheck="yes"])
473
474  if test "$manualupdatecheck" = "1" -a "$autoupdatecheck" != "no"; then
475    autoupdatecheck="1"
476  else
477    autoupdatecheck="0"
478  fi
479  AC_DEFINE_UNQUOTED(FZ_AUTOUPDATECHECK, $autoupdatecheck, [Set to 1 to add support for automated update checks])
480
481  # GnuTLS
482  # ------
483
484  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.12],, [
485    AC_MSG_ERROR([libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/])
486  ])
487
488  AC_SUBST(LIBGNUTLS_LIBS)
489  AC_SUBST(LIBGNUTLS_CFLAGS)
490
491  AC_ARG_ENABLE(gnutlssystemciphers, AS_HELP_STRING([--enable-gnutlssystemciphers],[Enables the use of gnutls system ciphers.]),
492    [gnutlssystemciphers="$enableval"], [gnutlssystemciphers="no"])
493
494  if test "$gnutlssystemciphers" = "yes"; then
495    AC_DEFINE(FZ_USE_GNUTLS_SYSTEM_CIPHERS, 1, [Set to 1 to use ciphers defined in system policy.])
496  fi
497 
498  # pugixml
499  # ------
500
501  FZ_CHECK_PUGIXML()
502
503  # Libdbus
504  # -------
505
506  AC_ARG_WITH(dbus, AS_HELP_STRING([--with-dbus],[Enable D-Bus support through libdbus. Used for GNOME Session manager D-Bus API. Default: auto]),
507    [
508    ],
509    [
510      with_dbus="auto"
511    ])
512
513  if test "$with_dbus" = "auto"; then
514    if echo $WX_CPPFLAGS | grep __WXMAC__ > /dev/null 2>&1; then
515      with_dbus="no"
516    elif echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
517      with_dbus="no"
518    else
519      with_dbus="yes"
520    fi
521  elif test "$with_dbus" = "yes"; then
522    if echo "$WX_CPPFLAGS" | grep __WXMAC__; then
523      AC_MSG_ERROR([D-Bus support is not needed or available on your platform])
524    elif echo "$WX_CPPFLAGS" | grep __WXMSW__; then
525      AC_MSG_ERROR([D-Bus support is not needed or available on your platform])
526    fi
527  else
528    with_dbus="no"
529  fi
530
531  if test "$with_dbus" != "no"; then
532    PKG_CHECK_MODULES(LIBDBUS, dbus-1 >= 1.2, [with_dbus_v="2"],
533      [
534        PKG_CHECK_MODULES(LIBDBUS, dbus-1, [with_dbus_v="1"],
535          [
536            AC_MSG_ERROR([libdbus not found. Install libdbus or configure with --without-dbus])
537          ])
538      ])
539    AC_DEFINE_UNQUOTED(WITH_LIBDBUS, [$with_dbus_v], [Set to 2 to if libdbus >= 1.2 is available, set to 1 if an older version is available.])
540  fi
541
542  AC_MSG_CHECKING([D-Bus support])
543  AC_MSG_RESULT([$with_dbus])
544
545  # We want xdg-open on *nix
546  if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk > /dev/null 2>&1; then
547    AC_PATH_PROG(xdgopen, xdg-open)
548    if test -z "$xdgopen"; then
549      AC_MSG_ERROR([xdg-open not found. This program is the preferred way to launch the default browser. Please install the xdg-utils.])
550    fi
551
552    if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk2 > /dev/null 2>&1; then
553      PKG_CHECK_MODULES(LIBGTK, gtk+-2.0,, [
554        AC_MSG_ERROR([gtk+-2.0 was not found, even though the used version of wxWidgets depends on it. Are you missing the gtk+2.0 development files?])
555      ])
556    fi
557    if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk3 > /dev/null 2>&1; then
558      PKG_CHECK_MODULES(LIBGTK, gtk+-3.0,, [
559        AC_MSG_ERROR([gtk+-3.0 was not found, even though the used version of wxWidgets depends on it. Are you missing the gtk+3.0 development files?])
560      ])
561    fi
562
563    AC_SUBST(LIBGTK_LIBS)
564    AC_SUBST(LIBGTK_CFLAGS)
565  fi
566
567  # Some more obscure platforms (e.g. HP-UX) don't have setenv which is required by POSIX
568  AC_CHECK_FUNC(setenv, [AC_DEFINE([HAVE_SETENV], [1], [Define to 1 if setenv function is available.])], [])
569  AC_CHECK_FUNC(putenv, [AC_DEFINE([HAVE_PUTENV], [1], [Define to 1 if putenv function is available.])], [])
570
571  # Some platforms, e.g. OS X, lack posix_fadvise
572  AC_CHECK_FUNCS(posix_fadvise)
573
574  # Some platforms have no d_type entry in their dirent structure
575  gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
576
577  CHECK_THREADSAFE_LOCALTIME
578  CHECK_THREADSAFE_GMTIME
579  CHECK_INVERSE_GMTIME
580
581  AC_CHECK_FUNCS([clock_gettime])
582  AC_CHECK_DECLS([pthread_condattr_setclock], [], [], [[#include <pthread.h>]])
583
584  # SQLite3
585  # -------
586
587  PKG_CHECK_MODULES(LIBSQLITE3, sqlite3 >= 3.7,, [
588
589    AC_CHECK_HEADER(sqlite3.h,,
590    [
591      AC_MSG_ERROR([sqlite3.h not found which is part of SQLite3.])
592    ])
593
594    AC_CHECK_LIB(sqlite3, sqlite3_version, LIBSQLITE3_LIBS="-lsqlite3",
595    [
596      AC_MSG_ERROR([SQLite3 not found.])
597    ])
598  ])
599
600  AC_SUBST(LIBSQLITE3_LIBS)
601  AC_SUBST(LIBSQLITE3_CFLAGS)
602
603fi
604
605# Everything translation related
606# ------------------------------
607
608FILEZILLA_LINGUAS=
609FILEZILLA_LINGUAS_PO=
610FILEZILLA_LINGUAS_MO=
611FILEZILLA_LINGUAS_PO_NEW=
612
613if test "$locales" = "yes"; then
614  AC_PATH_PROG(xgettext, xgettext)
615  if test -z "$xgettext"; then
616    AC_MSG_ERROR([xgettext not found, please install the GNU gettext package and make sure xgettext is in the path.])
617  fi
618
619  AC_PATH_PROG(msgfmt, msgfmt)
620  if test -z "$msgfmt"; then
621    AC_MSG_ERROR([ msgfmt not found, please install the GNU gettext package and make sure  msgfmt is in the path.])
622  fi
623
624  FZ_PATH_PROG_VER(msgmerge, msgmerge, 0.11.0)
625  if test -z "$msgmerge"; then
626    AC_MSG_ERROR([msgmerge not found or too old, please install a current version of the GNU gettext package and make sure msgmerge is in the path.])
627  fi
628
629  AC_MSG_CHECKING([available FZ3 message catalogs])
630
631  FILEZILLA_LINGUAS_PO=
632  FILEZILLA_LINGUAS=
633
634  if /bin/ls > /dev/null; then
635    LSPROG='/bin/ls'
636  else
637    LSPROG='ls'
638  fi
639
640  if test x$srcdir = x; then
641    path="locales"
642  else
643    path="$srcdir/locales"
644  fi
645  for i in `$LSPROG $path/*.po`; do
646    i=${i%.*}
647    i=${i##*/}
648    FILEZILLA_LINGUAS_PO=$FILEZILLA_LINGUAS_PO${FILEZILLA_LINGUAS_PO:+ }\$\(srcdir\)/$i.po
649    FILEZILLA_LINGUAS_PO_NEW=$FILEZILLA_LINGUAS_PO_NEW${FILEZILLA_LINGUAS_PO_NEW:+ }$i.po.new
650    FILEZILLA_LINGUAS=$FILEZILLA_LINGUAS${FILEZILLA_LINGUAS:+ }$i
651    FILEZILLA_LINGUAS_MO=$FILEZILLA_LINGUAS_MO${FILEZILLA_LINGUAS_MO:+ }$i.mo
652  done
653
654  AC_MSG_RESULT([$FILEZILLA_LINGUAS])
655
656  AC_PATH_PROG([WXRC], [wxrc --version])
657  if test "x$WXRC" = "x"; then
658    AC_MSG_ERROR([
659      wxrc could not be found. This program gets build together with wxWidgets.
660      Please make sure wxrc is within your path.
661    ])
662  fi
663fi
664
665AC_SUBST(FILEZILLA_LINGUAS)
666AC_SUBST(FILEZILLA_LINGUAS_PO)
667AC_SUBST(FILEZILLA_LINGUAS_PO_NEW)
668AC_SUBST(FILEZILLA_LINGUAS_MO)
669
670
671# Output automake conditionals
672# ----------------------------
673
674AM_CONDITIONAL([MINGW], [echo $host_os | grep "mingw" > /dev/null])
675AM_CONDITIONAL([LOCALES_ONLY], [test "$localesonly" = "yes"])
676AM_CONDITIONAL([LOCALES], [test "$locales" = "yes"])
677AM_CONDITIONAL(SFTP_MINGW, [test "$sftpbuild" = "mingw"])
678AM_CONDITIONAL(SFTP_UNIX, [test "$sftpbuild" = "unix"])
679AM_CONDITIONAL(USE_RESOURCEFILE, test "$use_resourcefile" = "true")
680AM_CONDITIONAL(MACAPPBUNDLE, [test "$macappbundle" = "yes"])
681AM_CONDITIONAL(MAKENSISSCRIPT, [test "$makensisscript" = "yes"])
682AM_CONDITIONAL(USE_BINRELOC, test "$use_binreloc" = "yes")
683AM_CONDITIONAL(ENABLE_PRECOMP, test "x$use_precomp" = "xyes")
684AM_CONDITIONAL(HAS_CPPUNIT, [test "$has_cppunit" = "yes"])
685AM_CONDITIONAL(HAVE_LIBPUGIXML, [test "x$with_pugixml" = "xsystem"])
686AM_CONDITIONAL(HAVE_DBUS, [test "x$with_dbus" = "xyes"])
687
688AC_CONFIG_FILES(Makefile src/Makefile src/engine/Makefile src/pugixml/Makefile
689src/dbus/Makefile
690src/interface/Makefile src/interface/resources/Makefile src/include/Makefile
691locales/Makefile src/interface/resources/16x16/Makefile
692src/interface/resources/32x32/Makefile data/Makefile
693src/interface/resources/cyril/Makefile
694src/interface/resources/cyril/16x16/Makefile
695src/interface/resources/blukis/Makefile
696src/interface/resources/flatzilla/Makefile
697src/interface/resources/lone/Makefile
698src/interface/resources/minimal/Makefile
699src/interface/resources/opencrystal/Makefile
700src/interface/resources/sun/Makefile
701src/interface/resources/tango/Makefile
702src/putty/Makefile
703src/putty/unix/Makefile
704src/putty/windows/Makefile
705tests/Makefile
706src/interface/resources/version.rc
707src/interface/resources/MacInfo.plist
708src/fzshellext/version.rc)
709AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.