"Fossies" - the Fresh Open Source Software Archive

Member "sqwebmail-6.0.3/configure.ac" (29 Aug 2019, 9407 Bytes) of package /linux/www/sqwebmail-6.0.3.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 6.0.2_vs_6.0.3.

    1 dnl
    2 dnl Copyright 1998 - 2019 Double Precision, Inc.  See COPYING for
    3 dnl distribution information.
    4 
    5 AC_PREREQ(2.59)
    6 AC_INIT(sqwebmail, 6.0.3, [courier-sqwebmail@lists.sourceforge.net])
    7 AC_CONFIG_SRCDIR(dbobj.config.in)
    8 AC_CONFIG_HEADERS(config.h)
    9 AM_INIT_AUTOMAKE
   10 >confdefs.h # Kill PACKAGE_ macros
   11 
   12 LPATH="$PATH:/usr/local/bin"
   13 
   14 AC_PROG_MAKE_SET
   15 AC_PROG_LN_S
   16 AC_PROG_SYSCONFTOOL
   17 AC_PROG_CC
   18 AC_LIBTOOL_DLOPEN
   19 AM_PROG_LIBTOOL
   20 
   21 AC_PATH_PROGS(SETENV, env)
   22 
   23 dnl Checks for programs.
   24 AC_ARG_WITH(notice,[AS_HELP_STRING([--with-notice=unicode],
   25 [The --with-notice=unicode option is required, and indicates that you
   26 are aware of the instructions in INSTALL for upgrading to this
   27 version])], [notice="$withval"], [])
   28 
   29 case "$notice" in
   30 unicode)
   31 	;;
   32 *)
   33 	AC_MSG_ERROR([
   34 ************************************************************************
   35 Please rerun configure and add the
   36 
   37       --with-notice=unicode
   38 
   39 option.
   40 
   41 This indicates that you've read the instructions in the maildirmake
   42 manual page (see "Converting pre-unicode format maildirs" at
   43 http://www.courier-mta.org/maildirmake.html, or in the man page in
   44 this package) about updating from earlier versions; specifically the
   45 need to convert any existing maildirs to a Unicode naming scheme,
   46 and the need to update any other Courier packages together with
   47 updating this one.
   48 
   49 If you are building RPMs directly using the spec file from the source
   50 tarball, add a
   51 
   52       --define 'notice_option --with-notice=unicode'
   53 
   54 option to the rpmbuild command:
   55 
   56 $ rpmbuild -ta --define 'notice_option --with-notice=unicode'
   57 
   58 This message is only meant to make sure you are aware of the contents
   59 of the man page about updating from earlier versions, and the need for
   60 manual steps to update any existing maildirs.
   61 
   62 If you are installing for the first time, you can simply rerun configure
   63 with this option.
   64 ************************************************************************])
   65 	;;
   66 esac
   67 AC_PATH_PROGS(COURIERAUTHCONFIG, courierauthconfig)
   68 
   69 if test "$COURIERAUTHCONFIG" = ""
   70 then
   71 	hash='#'
   72 	AC_MSG_WARN(=== Courier authentication library not found.)
   73 	AC_MSG_WARN(=== You need to download and install)
   74 	AC_MSG_WARN([=== http://www.courier-mta.org/download.php${hash}authlib first.])
   75 	AC_MSG_WARN(=== If courier-authlib is installed in a non-default)
   76 	AC_MSG_WARN([=== directory, set the COURIERAUTHCONFIG environment])
   77 	AC_MSG_WARN(=== variable to the full path to the courierauthconfig)
   78 	AC_MSG_WARN(=== binary and rerun this configure script.)
   79 	AC_MSG_WARN([])
   80 	AC_MSG_ERROR(courierauthconfig not found)
   81 fi
   82 $COURIERAUTHCONFIG --configfiles >conftest || exit 1
   83 sed 's/^/auth/' <conftest >conftest2
   84 . ./conftest2
   85 if test ! -x $authsbindir/courierlogger$EXEEXT
   86 then
   87 	AC_MSG_ERROR(authlib configuration error - $authsbindir/courierlogger$EXEEXT not found)
   88 fi
   89 courierlogger=$authsbindir/courierlogger$EXEEXT
   90 AC_SUBST(courierlogger)
   91 
   92 AC_ARG_WITH(mailuser,[],
   93 	mailuser="$withval",
   94 	[ mailuser="$authmailuser"
   95 	ac_configure_args="$ac_configure_args --with-mailuser=$mailuser"]
   96 	)
   97 
   98 AC_ARG_WITH(mailgroup, [],
   99 	mailgroup="$withval",
  100 	[ mailgroup="$authmailgroup"
  101 	ac_configure_args="$ac_configure_args --with-mailgroup=$mailgroup"]
  102 	)
  103 
  104 
  105 AC_SUBST(mailuser)
  106 AC_SUBST(mailgroup)
  107 
  108 if test `$COURIERAUTHCONFIG --version=0.57` = "no"
  109 then
  110 	AC_MSG_ERROR(Courier authentication library version 0.57 required.)
  111 fi
  112 
  113 dnl Check whether we should use gdbm, or db.
  114 
  115 needs_withdb=0
  116 
  117 AC_ARG_WITH(db, [  --with-db=gdbm          Use the GDBM library.
  118   --with-db=db            Use the libdb.a library.],
  119 	db="$withval", db=""; needs_withdb=1)
  120 
  121 case "$db" in
  122 gdbm)
  123 	;;
  124 db)
  125 	;;
  126 "")
  127 	;;
  128 *)
  129 	AC_MSG_ERROR(Invalid --with-db option.)
  130 	;;
  131 esac
  132 
  133 saveLIBS="$LIBS"
  134 
  135 if test "$db" != "db"
  136 then
  137 	AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ])
  138 	AC_CHECK_FUNC(gdbm_open, [ HAVE_GDBM=y ])
  139 fi
  140 
  141 LIBS="$saveLIBS"
  142 
  143 if test "$db" != "gdbm"
  144 then
  145 
  146 	AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ],
  147 		AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"],
  148 		AC_CHECK_LIB(db, db_env_create,
  149 					[ LIBDB=-ldb; LIBS="-ldb $LIBS"])
  150 	))
  151 
  152 	AC_CHECK_FUNC(dbopen, HAVE_BDB=1)
  153 	AC_CHECK_FUNC(db_open, HAVE_BDB=1)
  154 	AC_CHECK_FUNC(db_env_create, HAVE_BDB=1)
  155 fi
  156 
  157 LIBS="$saveLIBS"
  158 
  159 if test "$HAVE_GDBM$HAVE_BDB" = ""
  160 then
  161 	AC_MSG_ERROR(Cannot find either the gdbm or the db library.)
  162 fi
  163 
  164 USE_GDBM=0
  165 USE_DB=0
  166 
  167 if test "$HAVE_GDBM" = "y"
  168 then
  169 	USE_GDBM=1
  170 	if test "$needs_withdb" = 1
  171 	then
  172 		ac_configure_args="$ac_configure_args --with-db=gdbm"
  173 	fi
  174 	dblibrary=libs/gdbmobj/libgdbmobj.la
  175 	LIBDB=""
  176 else
  177 	USE_DB=1
  178 	if test "$needs_withdb" = 1
  179 	then
  180 		ac_configure_args="$ac_configure_args --with-db=db"
  181 	fi
  182 	dblibrary=libs/bdbobj/libbdbobj.la
  183 	LIBGDBM=""
  184 fi
  185 
  186 AC_SUBST(USE_GDBM)
  187 AC_SUBST(USE_DB)
  188 AC_SUBST(dblibrary)
  189 
  190 AX_COURIER_UNICODE_VERSION
  191 
  192 dnl Checks for header files.
  193 
  194 AC_CHECK_HEADER([pcre.h],
  195 		[ : ],
  196 		[
  197 
  198 		AC_CHECK_HEADER([pcre/pcre.h],
  199 				[ : ],
  200 				[
  201 						AC_MSG_ERROR(pcre.h not found - install PCRE from www.pcre.org)
  202 				])
  203 		]
  204 )
  205 
  206 dnl Checks for library functions.
  207 
  208 dnl Other
  209 
  210 
  211 dnl ***********************************************************************
  212 
  213 dnl Find my cgi-bin directory
  214 
  215 dnl ***********************************************************************
  216 
  217 cgibindir=""
  218 imagedir=""
  219 
  220 for f in /var/lib/httpd /var/www /home/httpd /usr/local/apache /usr/local/www /var/lib/apache/share
  221 do
  222 	if test -d $f/cgi-bin
  223 	then
  224 		cgibindir=$f/cgi-bin
  225 	fi
  226 
  227 	if test -d $f/htdocs
  228 	then
  229 		imagedir="$f/htdocs/webmail"
  230 	fi
  231 	if test -d $f/html
  232 	then
  233 		imagedir="$f/html/webmail"
  234 	fi
  235 	# FreeBSD Apache port
  236 	if test -d $f/data
  237 	then
  238 		imagedir="$f/data/webmail"
  239 	fi
  240 done
  241 
  242 AC_ARG_ENABLE(cgibindir, [  --enable-cgibindir={dir}   HTTP server's cgi-bin directory.],
  243 	cgibindir="$enableval",
  244 	[
  245 		if test "$cgibindir" = ""
  246 		then
  247 			AC_MSG_ERROR([Unable to find your cgi-bin directory, specify --enable-cgibindir.])
  248 		fi
  249 		if test "$imagedir" != ""
  250 		then
  251 			if test "$imageurl" = ""
  252 			then
  253 				imageurl="/webmail"
  254 			fi
  255 		fi
  256 	] )
  257 
  258 AC_SUBST(cgibindir)
  259 
  260 AC_ARG_ENABLE(imagedir, [  --enable-imagedir={dir}    HTTP server's document directory for images.],
  261 	imagedir="$enableval",
  262 		[
  263 		if test "$imagedir" = ""
  264 		then
  265 			AC_MSG_ERROR([Unable to find your htdocs or html directory, specify --enable-imagedir.])
  266 		fi
  267 		]
  268 )
  269 AC_SUBST(imagedir)
  270 
  271 AC_MSG_CHECKING(where to install sqwebmail cgi binary)
  272 AC_MSG_RESULT($cgibindir)
  273 AC_MSG_CHECKING(where to install images)
  274 AC_MSG_RESULT($imagedir)
  275 
  276 dnl for cgi subdir
  277 
  278 AC_ARG_WITH(formdata, [], , ac_configure_args="$ac_configure_args --with-formdata")
  279 
  280 AC_PATH_PROGS(GPG, gpg gpg2, /usr/bin/gpg, $LPATH)
  281 
  282 AC_ARG_WITH(plenty-of-beer, [
  283   --enable-imageurl={url}   URL to the document directory for images.
  284   --without-fcgi        Do not compile fastcgi support
  285   --with-fcgi           Compile with fastcgi support
  286   --without-ispell      Do not compile ispell support
  287   --with-ispell=prog    Pathname to ispell (if not in default path)
  288   --enable-autorenamesent  Enable Autorename Sent folder periodically (default)
  289   --disable-autorenamesent Disable Autorename Sent folder periodically
  290   --enable-https          Generate https:// URLs for all accesses
  291   --enable-https=login    Use https:// URLs for password transmission only
  292   --enable-hardtimeout=7200  Hard session timeout (2hrs default)
  293   --enable-softtimeout=1200  Inactivity timeout (20 min default)
  294   --enable-autopurge=7       Automatically purge deleted messages (days).
  295   --enable-maxpurge=90       Maximum value for autopurge (days).
  296   --prefix={dir}             Install sqwebmail HTML data in {dir}, instead of
  297                              PREFIX/share/sqwebmail (which is usually
  298                              /usr/lib/sqwebmail)
  299   --with-defaultlang={lang}  Default language to use (only en, so far)
  300   --enable-mimetypes={dir}   Your mime.types file.
  301   --enable-bannerprog=prog   Program which will generate a banner.
  302   --with-maxargsize=nbytes       Limit maximum size of CGI args
  303   --with-maxformargsize=nbytes   Maximum size of multipart/formdata uploads
  304   --with-cachedir            Cache logins
  305   --with-cachedir=dir        Use dir instead of /var/run/sqwebmail or /var/cache/sqwebmail
  306   --with-cacheowner=user     Owner of the cache directory (default: bin)
  307   --without-gzip             Do not use gzip to compress messages])
  308 
  309 AC_ARG_ENABLE(hostname, [],
  310 	AC_MSG_ERROR(--enable-hostname option is obsolete, see INSTALL))
  311 
  312 if test "x$prefix" = xNONE
  313 then
  314 	prefix=/usr/lib/sqwebmail
  315 	ac_configure_args="$ac_configure_args --prefix=$prefix"
  316 fi
  317 
  318 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  319 eval "prefix=$prefix"
  320 eval "libexecdir=$libexecdir"
  321 eval "localstatedir=$localstatedir"
  322 
  323 # For rfc2045
  324 
  325 AC_ARG_WITH(package, [], ,
  326 	ac_configure_args="$ac_configure_args --with-package=sqwebmail --with-version=$VERSION")
  327 
  328 AC_ARG_WITH(socks, [], ,
  329 	ac_configure_args="$ac_configure_args --without-socks")
  330 
  331 #
  332 # autoconf bug
  333 #
  334 
  335 ac_given_INSTALL="$INSTALL"
  336 
  337 pkglibPROGRAMS_exec='$(pkglibPROGRAMS)'
  338 AC_SUBST(pkglibPROGRAMS_exec)
  339 
  340 AM_CONDITIONAL(HAVE_HTMLPAGES, test -d $srcdir/html)
  341 
  342 AC_ARG_WITH(repository, [], REPOSITORY="$withval")
  343 AC_SUBST(REPOSITORY)
  344 
  345 AC_CONFIG_SUBDIRS(libs/numlib libs/bdbobj libs/gdbmobj libs/md5 libs/sha1
  346 	libs/random128 libs/libhmac libs/liblock
  347 	libs/rfc822 libs/rfc2045 libs/maildir libs/soxwrap
  348 	libs/http11 libs/cgi libs/ldapaddressbook
  349 	libs/gpglib libs/pcp libs/sqwebmail)
  350 AC_OUTPUT(Makefile dbobj.h dbobj.config sqwebmail.spec sqwebmail.lpspec sqwebmaild.rc)