Changeset 5212:1c9acc32a5bf for configure.ac
- Timestamp:
- 2007-09-08 15:20:47 (16 months ago)
- Branch:
- HEAD
- Files:
-
- 1 modified
-
configure.ac (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r5204 r5212 809 809 810 810 dnl -- start cache -- 811 AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching]), 812 [if test x$enableval = xyes; then 811 use_qdbm=no 812 AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], 813 [Enable header caching])) 814 AC_ARG_WITH(qdbm, AC_HELP_STRING([--without-qdbm], 815 [Don't use qdbm even if it is available])) 816 AC_ARG_WITH(gdbm, AC_HELP_STRING([--without-gdbm], 817 [Don't use gdbm even if it is available])) 818 AC_ARG_WITH(bdb, AC_HELP_STRING([--with-bdb[=DIR]], 819 [Use BerkeleyDB4 if gdbm is not available]), ac_bdb_prefix=$withval) 820 821 if test x$enable_hcache = xyes 822 then 813 823 AC_DEFINE(USE_HCACHE, 1, [Enable header caching]) 814 824 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache.o" 815 825 816 826 OLDCPPFLAGS="$CPPFLAGS" 827 OLDLDFLAGS="$LDFLAGS" 817 828 OLDLIBS="$LIBS" 818 829 … … 822 833 AC_CHECK_PROGS([MD5], [md5 md5sum openssl], [none]) 823 834 824 use_qdbm=no 825 AC_ARG_WITH(qdbm, AC_HELP_STRING([--without-qdbm], [Don't use qdbm even if it is available])) 835 dnl -- QDBM -- 826 836 if test "$with_qdbm" != "no" 827 837 then … … 842 852 saved_LIBS="$LIBS" 843 853 AC_CHECK_HEADERS(villa.h) 844 AC_CHECK_LIB(qdbm, vlopen, [MUTTLIBS="$MUTTLIBS -lqdbm"; use_qdbm=yes]) 854 AC_CHECK_LIB(qdbm, vlopen, 855 [MUTTLIBS="$MUTTLIBS -lqdbm" 856 AC_DEFINE(HAVE_QDBM, 1, [QDBM Support]) 857 use_qdbm=yes], 858 [CPPFLAGS="$OLDCPPFLAGS" 859 LDFLAGS="$OLDLDFLAGS"]) 845 860 LIBS="$saved_LIBS" 846 861 if test -n "$with_qdbm" && test "$use_qdbm" != yes … … 850 865 fi 851 866 852 AC_ARG_WITH(gdbm, AC_HELP_STRING([--without-gdbm], [Don't use gdbm even if it is available])) 853 if test x$with_gdbm != xno && test $use_qdbm != yes; then 867 dnl -- GDBM -- 868 if test x$with_gdbm != xno && test $use_qdbm != yes 869 then 854 870 if test "$with_gdbm" != "yes" 855 871 then … … 857 873 LDFLAGS="$LDFLAGS -L$with_gdbm/lib" 858 874 fi 859 CPPFLAGS="$OLDCPPFLAGS"860 LIBS="$ OLDLIBS -lgdbm";875 saved_LIBS="$LIBS" 876 LIBS="$LIBS -lgdbm" 861 877 AC_CACHE_CHECK(for gdbm_open, ac_cv_gdbmopen,[ 862 878 ac_cv_gdbmopen=no 863 879 AC_TRY_LINK([#include <gdbm.h>],[gdbm_open(0,0,0,0,0);],[ac_cv_gdbmopen=yes]) 864 880 ]) 881 LIBS="$saved_LIBS" 882 if test "$ac_cv_gdbmopen" = yes 883 then 884 AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) 885 MUTTLIBS="$MUTTLIBS -lgdbm" 886 elif test -n "$with_gdbm" 887 then 888 AC_MSG_ERROR([GDBM could not be used. Check config.log for details.]) 889 fi 865 890 fi 866 891 892 dnl -- BDB -- 867 893 ac_bdb_prefix=yes 868 AC_ARG_WITH(bdb, AC_HELP_STRING([--with-bdb[=DIR]], [Use BerkeleyDB4 if gdbm is not available]),869 ac_bdb_prefix=$withval)870 894 if test x$ac_bdb_prefix != xno && test x$ac_cv_gdbmopen != xyes && test $use_qdbm != yes; then 871 895 test x$ac_bdb_prefix = xyes && ac_bdb_prefix="$mutt_cv_prefix /opt/csw/bdb4 /opt /usr/local /usr" … … 908 932 test x$BDB_LIB != x && break 909 933 done 910 if test x$ac_cv_dbcreate = xyes; then 934 if test x$ac_cv_dbcreate = xyes 935 then 911 936 AC_MSG_RESULT(yes) 937 CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR" 938 LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB" 939 AC_DEFINE(HAVE_DB4, 1, [Berkeley DB4 Support]) 912 940 else 913 941 AC_MSG_RESULT(no) … … 915 943 fi 916 944 917 if test "$use_qdbm" = yes; then 918 AC_DEFINE(HAVE_QDBM, 1, [QDBM Support]) 919 elif test x$ac_cv_gdbmopen = xyes; then 920 CPPFLAGS="$OLDCPPFLAGS" 921 LIBS="$OLDLIBS -lgdbm"; 922 AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) 923 elif test x$ac_cv_dbcreate = xyes; then 924 CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR" 925 LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB" 926 AC_DEFINE(HAVE_DB4, 1, [Berkeley DB4 Support]) 927 else 945 if test x$use_qdbm != xyes && test x$ac_cv_gdbmopen != xyes && test x$ac_cv_dbcreate != xyes 946 then 928 947 AC_MSG_ERROR([You need QDBM, GDBM or Berkeley DB4 for hcache]) 929 948 fi 930 fi ])949 fi 931 950 dnl -- end cache -- 932 951
