quick fix for ispell detection
[claws.git] / configure.in
index e2801f37ff2c78b40c66d5ce997f83e3681303df..f4b0e959cea6c1b071a3a340d2edb44403ec9265 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=5
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws3
+EXTRA_VERSION=claws4
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
@@ -24,6 +24,9 @@ if test "$GNOME_CONFIG" != no; then
 fi
 AM_CONDITIONAL(SYLPHEED_GNOME, test -d "$gnomedir")
 
+dnl Claws version
+AC_DEFINE(CLAWS, 1)
+
 dnl libtool versioning
 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
@@ -122,7 +125,7 @@ if test $ac_cv_enable_ssl = yes; then
        [ AC_MSG_RESULT(no) 
          LIBS="$ac_save_LIBS" ])
 fi
-         
+
 dnl Check for X-Face support
 AC_ARG_ENABLE(compface,
        [  --disable-compface      Do not use compface (X-Face)],
@@ -132,6 +135,7 @@ if test "$ac_cv_disable_compface" = no; then
 fi
 
 dnl for JPilot support in addressbook
+dnl no check for libraries: these are dynamically loaded
 AC_ARG_ENABLE(jpilot,
        [  --enable-jpilot         Enable JPilot support [default=no]],
        [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
@@ -139,13 +143,25 @@ AC_ARG_ENABLE(jpilot,
 AC_MSG_CHECKING([whether to use jpilot])
 if test "$ac_cv_enable_jpilot" = yes; then
        AC_MSG_RESULT(yes)
-       LIBS="$LIBS -lpisock"
-       AC_DEFINE(USE_JPILOT)
+       if test "$ac_cv_enable_jpilot" = yes; then
+               AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h, , [ac_cv_enable_jpilot=no])
+               if test "$ac_cv_enable_jpilot" = yes; then              
+                       LIBS="$LIBS -lpisock"
+                       AC_DEFINE(USE_JPILOT)
+               fi
+       fi
+       AC_MSG_CHECKING(whether jpilot is available)
+       if test "$ac_cv_enable_jpilot" = yes; then
+               AC_MSG_RESULT(yes)
+       else
+               AC_MSG_RESULT(no)
+       fi
 else
        AC_MSG_RESULT(no)
 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])
@@ -153,12 +169,34 @@ AC_ARG_ENABLE(ldap,
 AC_MSG_CHECKING([whether to use ldap])
 if test "$ac_cv_enable_ldap" = yes; then
        AC_MSG_RESULT(yes)
-       LIBS="$LIBS -lldap -llber -lpthread -lresolv"
-       AC_DEFINE(USE_LDAP)
+       if test "$ac_cv_enable_ldap" = yes; then
+               AC_CHECK_HEADERS(ldap.h lber.h pthread.h, , [ac_cv_enable_ldap=no])
+               if test "$ac_cv_enable_ldap" = yes; then
+                       LIBS="$LIBS -lldap -llber -lpthread -lresolv"
+                       AC_DEFINE(USE_LDAP)
+               fi      
+       fi
+       AC_MSG_CHECKING(whether ldap is available)
+       if test "$ac_cv_enable_ldap" = yes; then
+               AC_MSG_RESULT(yes)
+       else
+               AC_MSG_RESULT(no)
+       fi
 else
        AC_MSG_RESULT(no)
 fi
 
+dnl get ispell path
+dnl
+AC_PATH_PROG(ispell_path, ispell, no)
+if test "$ispell_path" != no; then
+       AC_DEFINE_UNQUOTED(ISPELL_PATH, "$ispell_path")
+       AC_SUBST(ISPELL_PATH)
+else
+       AC_DEFINE_UNQUOTED(ISPELL_PATH, "/usr/bin/ispell")
+       AC_SUBST(ISPELL_PATH)
+fi
+
 dnl Check for libjconv
 AC_ARG_ENABLE(jconv,
        [  --disable-jconv         Do not use libjconv],
@@ -278,4 +316,5 @@ libkcc/Makefile
 src/Makefile
 manual/Makefile
 manual/ja/Makefile
+manual/en/Makefile
 ])