* src/folder.[ch]
[claws.git] / configure.in
index 8153df889b15e237a2e838778d0c37e4238772cc..07811ec305be52c4aae9d9378176cc7052b59a2c 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws4
+EXTRA_VERSION=claws58
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
@@ -85,6 +85,8 @@ manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
 AC_SUBST(manualdir)
 faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
 AC_SUBST(faqdir)
+mandir='${prefix}/man/man1'
+AC_SUBST(mandir)
 
 dnl Set PACKAGE_DATA_DIR in config.h.
 if test "x${datadir}" = 'x${prefix}/share'; then
@@ -165,22 +167,41 @@ else
 fi
 
 dnl for LDAP support in addressbook
-dnl no check for libraries; dynamically loaded
 AC_ARG_ENABLE(ldap,
        [  --enable-ldap           Enable LDAP support [default=no]],
        [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
 AC_MSG_CHECKING([whether to use LDAP])
 if test "$ac_cv_enable_ldap" = yes; then
        AC_MSG_RESULT(yes)
+
+       dnl check for available libraries, and pull them in
+       AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
+       AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
+       AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
+       AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber")
+
+       dnl we need libpthread for sylpheed ldap,  until we find
+       dnl a better way to handle ldap requests asynchronously...
+       AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
+
+       dnl the check for the headers 
        AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
-                        [ AC_DEFINE(USE_LDAP) ],
+                        [ ac_cv_enable_ldap=yes ],
                         [ ac_cv_enable_ldap=no ])
-       AC_MSG_CHECKING([whether ldap is available])
+       AC_MSG_CHECKING([whether ldap headers were detected])
        AC_MSG_RESULT($ac_cv_enable_ldap)
 
        if test "$ac_cv_enable_ldap" = yes; then
-               CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
-               LIBS="$LIBS -lldap -llber -lpthread -lresolv `$GLIB_CONFIG --libs gthread`"
+               AC_CHECK_LIB(ldap, ldap_open, [ 
+                               ac_cv_enable_ldap=yes
+                               CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
+                               LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
+                               AC_DEFINE(USE_LDAP)
+                               AC_SUBST(LDAP_LIBS)
+                               ], 
+                               [ ac_cv_enable_ldap=no ], $LDAP_LIBS )
+               AC_MSG_CHECKING([whether ldap libs were detected])
+               AC_MSG_RESULT($ac_cv_enable_ldap)
        fi
 else
        AC_MSG_RESULT(no)
@@ -224,7 +245,6 @@ if test "$ac_cv_enable_jconv" = yes; then
 fi
 
 AC_CHECK_LIB(xpg4, setlocale)
-dnl AC_CHECK_LIB(kcc, KCC_filter)
 
 dnl for GThread support (currently disabled)
 dnl AC_ARG_ENABLE(threads,
@@ -340,7 +360,7 @@ AC_CHECK_SIZEOF(unsigned long, 4)
 
 dnl Checks for library functions.
 AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr \
+AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
               wcsstr wcswcs iswalnum iswspace towlower \
               wcslen wcscpy wcsncpy \
               uname flock lockf inet_aton inet_addr \
@@ -349,8 +369,9 @@ AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr \
 AC_OUTPUT([
 Makefile
 sylpheed.spec
+intl/Makefile
 ac/Makefile
-libkcc/Makefile
+po/Makefile.in
 src/version.h
 src/Makefile
 faq/Makefile
@@ -359,6 +380,7 @@ faq/en/Makefile
 faq/es/Makefile
 faq/fr/Makefile
 faq/it/Makefile
+man/Makefile
 manual/Makefile
 manual/de/Makefile
 manual/en/Makefile
@@ -366,7 +388,6 @@ manual/es/Makefile
 manual/fr/Makefile
 manual/ja/Makefile
 tools/Makefile
-intl/Makefile po/Makefile.in
 ])
 
 dnl Output the configuration summary