Fixed two memory leaks when creating folderitems.
[claws.git] / configure.ac
index 4e38388bd25b45409a533f7e9af73825048ea2e4..596535730c9453066e56bf00bdba5e53aaf1d33f 100644 (file)
@@ -110,18 +110,25 @@ dnl ******************************
 dnl AC_CANONICAL_HOST
 
 dnl Copied from the official gtk+-2 configure.in
-AC_MSG_CHECKING([for some Win32 platform])
+AC_MSG_CHECKING([for host platform])
 case "$host" in
   *-*-mingw*|*-*-cygwin*)
     platform_win32=yes
-    LDFLAGS="$LDFLAGS -mwindows"
+    LDFLAGS="$LDFLAGS -mwindows -Wl,--export-all-symbols"
     ;;
+       *-apple-*)
+               platform_osx=yes
+               LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+               ;;
   *)
     platform_win32=no
+               platform_osx=no
+               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     ;;
 esac
-AC_MSG_RESULT([$platform_win32])
 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
+AM_CONDITIONAL(PLATFORM_OSX, test x"$platform_osx" = x"yes")
+AC_MSG_RESULT([$host])
 
 AC_MSG_CHECKING([for native Win32])
 case "$host" in
@@ -203,7 +210,7 @@ AC_CHECK_FUNCS(bind_textdomain_codeset)
 LIBS=$syl_save_LIBS
 
 dnl for gettext
-ALL_LINGUAS="ca cs de en_GB es fi fr he hu it lt nb nl pt_BR ru sk sv zh_TW"
+ALL_LINGUAS="ca cs da de en_GB es fi fr he hu id_ID it nb nl pt_BR ru sk sv tr zh_TW"
 GETTEXT_PACKAGE=claws-mail
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
@@ -523,13 +530,14 @@ AC_ARG_WITH(password-encryption, [  --with-password-encryption=PROVIDER    Which
                                                pwd_crypto="$withval", pwd_crypto="default")
 
 if test x"$pwd_crypto" = xdefault; then
-dnl ===Default set to "old" for testing, remove the dnls to restore
-dnl ===intended functionality.
-dnl    if test x"$enable_gnutls" = xyes; then
-dnl            pwd_crypto="gnutls"
-dnl    else
-               pwd_crypto="old"
-dnl    fi
+       if test x"$enable_gnutls" = xyes; then
+               if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
+                       pwd_crypto="gnutls"
+               fi
+       fi
+fi
+if test x"$pwd_crypto" = xdefault; then
+       pwd_crypto="old"
 fi
 
 case $pwd_crypto in
@@ -537,6 +545,9 @@ case $pwd_crypto in
                if test x"$enable_gnutls" = xno; then
                        AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
                fi
+               if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
+                       AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
+               fi
                AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
                ;;
        old)
@@ -1229,7 +1240,7 @@ AM_PATH_PYTHON([2.5], [
                if test x"$platform_win32" = xno; then
                        # libpython.so
                        PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so"
-                       LIBS="-ldl"
+                       AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl"])
                        AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works])
                        AC_RUN_IFELSE(
                                [AC_LANG_PROGRAM(