"Fossies" - the Fresh Open Source Software Archive

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


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. 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_INIT(sqwebmail, 6.0.3, [courier-sqwebmail@lists.sourceforge.net])
    6 
    7 >confdefs.h  # Kill PACKAGE_ macros
    8 
    9 AC_CONFIG_SRCDIR(sqwebmail.c)
   10 AC_CONFIG_AUX_DIR(../..)
   11 AM_INIT_AUTOMAKE([foreign no-define])
   12 
   13 LPATH="$PATH:/usr/local/bin"
   14 AC_CONFIG_HEADERS(config.h)
   15 AC_PROG_MAKE_SET
   16 
   17 dnl Checks for programs.
   18 AC_USE_SYSTEM_EXTENSIONS
   19 AC_PROG_CC
   20 AC_LIBTOOL_DLOPEN
   21 AM_PROG_LIBTOOL
   22 
   23 if test "$GCC" = yes ; then
   24         CXXFLAGS="$CXXFLAGS -Wall"
   25         CFLAGS="$CFLAGS -Wall"
   26 fi
   27 
   28 AC_PATH_PROGS(SETENV, env)
   29 AC_PATH_PROGS(PERL,perl5 perl, perl, $LPATH)
   30 AC_PATH_PROGS(GZIP,gzip,gzip,$LPATH)
   31 
   32 if test "$PERL" = "perl"
   33 then
   34     AC_MSG_ERROR(Perl not found)
   35 fi
   36 
   37 AC_PATH_PROGS(COURIERAUTHCONFIG, courierauthconfig)
   38 
   39 if test "$COURIERAUTHCONFIG" = ""
   40 then
   41     AC_MSG_ERROR(COURIERAUTHCONFIG not found)
   42 fi
   43 
   44 CPPAUTH="`$COURIERAUTHCONFIG --cppflags`"
   45 LDAUTH="`$COURIERAUTHCONFIG --ldflags`"
   46 AC_SUBST(CPPAUTH)
   47 AC_SUBST(LDAUTH)
   48 
   49 test "x$prefix" = xNONE && prefix=$ac_default_prefix
   50 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
   51 
   52 eval "prefix=$prefix"
   53 eval "exec_prefix=$exec_prefix"
   54 eval "datadir=$datadir"
   55 eval "bindir=$bindir"
   56 eval "localstatedir=$localstatedir"
   57 
   58 htmldir="$datadir/sqwebmail/html"
   59 scriptdir="$datadir/sqwebmail"
   60 
   61 AC_SUBST(htmldir)
   62 AC_SUBST(scriptdir)
   63 
   64 AC_ARG_WITH(mailer,
   65 [  --with-mailer=prog  Your mail submission program],
   66     mailer="$withval",
   67 
   68 [
   69     if test -d ${srcdir}/../../courier
   70     then
   71         mailer="$bindir/sendmail"
   72     else
   73         SENDMAIL_PATH=$PATH:/etc:/sbin:/usr/sbin:/usr/local/bin:/var/qmail/bin
   74         AC_PATH_PROG(sendmail, sendmail, /usr/bin/sendmail, $SENDMAIL_PATH)
   75         mailer="$sendmail -oi -t"
   76     fi
   77 ]
   78 )
   79 
   80 AC_SUBST(mailer)
   81 
   82 if test -d ${srcdir}/../../courier
   83 then
   84     pkglibexecdir='$(libexecdir)/courier'
   85 else
   86     pkglibexecdir='$(libexecdir)/sqwebmail'
   87 fi
   88 AC_SUBST(pkglibexecdir)
   89 
   90 AC_ARG_WITH(ispell,
   91 [  --without-ispell      Do not compile ispell support
   92   --with-ispell=prog    Pathname to ispell (if not in default path)],
   93     ispell="$withval", [ AC_PATH_PROG(ispell, ispell, N, $LPATH) ] )
   94 
   95 case $ispell in
   96 "/"*)
   97     AC_DEFINE_UNQUOTED(ISPELL, "$ispell",
   98     [ Path to ispell or aspell ])
   99     ;;
  100 *)
  101     ispell=""
  102     ;;
  103 esac
  104 
  105 AM_CONDITIONAL(ISPELL, test "$ispell" != "")
  106 
  107 AC_ARG_ENABLE(autorenamesent, [
  108   --enable-autorenamesent   Enable Autorename Sent folder periodically (default)
  109   --disable-autorenamesent  Disable Autorename Sent folder periodically
  110 ], , enable_autorenamesent=yes)
  111 if test ! "$enable_autorenamesent" = no; then
  112         AC_DEFINE(AUTORENAMESENT, "yes",
  113     [ Whether the Sent directory is automatically renamed monthly ])
  114 else
  115         AC_DEFINE(AUTORENAMESENT, "no",
  116     [ Whether the Sent directory is automatically renamed monthly ])
  117 fi
  118 
  119 dnl Checks for libraries.
  120 
  121 AC_CHECK_LIB(sun,getpwnam)
  122 AC_CHECK_LIB(crypt, crypt)
  123 
  124 dnl Check whether we should use gdbm, or db.
  125 
  126 needs_withdb=0
  127 
  128 . ../../dbobj.config
  129 dblibrary="../../$dblibrary"
  130 AC_SUBST(dblibrary)
  131 
  132 USENSL=no
  133 saveLIBS="$LIBS"
  134 AC_CHECK_LIB(socket,socket,result=yes,result=no)
  135 if test $result = yes; then
  136         NETLIBS="-lsocket"
  137 else
  138         AC_CHECK_LIB(socket,socket,result=yes,result=no,-lnsl)
  139         if test $result = yes; then
  140                 NETLIBS = "-lsocket -lnsl"
  141                 USENSL=yes
  142         else
  143                 AC_CHECK_LIB(socket,connect,result=yes,result=no)
  144                 if test $result = yes; then
  145                         NETLIBS="-lsocket"
  146                 else
  147                         AC_CHECK_LIB(socket,connect,result=yes,result=no,-lnsl)
  148                         if test $result = yes; then
  149                                 NETLIBS="-lsocket -lnsl"
  150                                 USENSL=yes
  151                         fi
  152                 fi
  153         fi
  154 fi
  155 
  156 if test $USENSL != yes; then
  157     LIBS="$LIBS $NETLIBS"
  158     AC_TRY_LINK_FUNC(inet_addr, [ : ],
  159     [
  160             AC_CHECK_LIB(nsl,inet_addr,result=yes,result=no)
  161             if test $result = yes; then
  162                     NETLIBS="$NETLIBS -lnsl"
  163             fi
  164     ])
  165 fi
  166 LIBS="$saveLIBS"
  167 
  168 AC_SUBST(NETLIBS)
  169 
  170 AC_ARG_WITH(piddir, [  --with-piddir         Directory where imapd.pid is created ], piddir="$withval", piddir=$localstatedir/run)
  171 
  172 AC_SUBST(piddir)
  173 
  174 dnl Checks for header files.
  175 AC_HEADER_DIRENT
  176 AC_HEADER_STDC
  177 AC_CHECK_HEADERS(fcntl.h sys/wait.h sys/select.h sys/uio.h sys/stat.h sys/time.h utime.h unistd.h locale.h crypt.h wchar.h)
  178 
  179 AC_HEADER_SYS_WAIT
  180 AC_HEADER_TIME
  181 
  182 dnl Checks for typedefs, structures, and compiler characteristics.
  183 AC_C_CONST
  184 AC_STRUCT_TM
  185 AC_TYPE_PID_T
  186 AC_TYPE_UID_T
  187 AC_TYPE_SIGNAL
  188 AC_SYS_LARGEFILE
  189 
  190 AC_TRY_RUN( [
  191 
  192 #include    <stdio.h>
  193 #include    <stdlib.h>
  194 #include    <limits.h>
  195 
  196 int main()
  197 {
  198 FILE    *fp=fopen("conftestval", "w");
  199 
  200     if (!fp)    exit(1);
  201     fprintf(fp, "-%lu\n", ULONG_MAX);
  202     fclose(fp);
  203     return (0);
  204 }
  205 ]
  206     , [ MAXLONGSIZE=`wc -c conftestval | awk ' { print $1 } '  ` ],
  207     [
  208         AC_MSG_ERROR(Unable to run test program.)
  209     ] ,
  210     [
  211         MAXLONGSIZE=60
  212         AC_MSG_WARN([Cross compiling, setting MAXLONGSIZE to $MAXLONGSIZE])
  213     ]
  214         )
  215 
  216 dnl Checks for library functions.
  217 AC_FUNC_STRFTIME
  218 AC_CHECK_FUNCS(crypt utime utimes setreuid setlocale)
  219 AC_REPLACE_FUNCS(strdup strcasecmp strncasecmp)
  220 
  221 AC_CACHE_CHECK([for crypt() prototype],sqwebmail_cv_NEED_CRYPT_PROTOTYPE,
  222 
  223 AC_TRY_COMPILE( [
  224        #if HAVE_CRYPT_H
  225        #include <crypt.h>
  226        #endif
  227        #if HAVE_UNISTD_H
  228        #include <unistd.h>
  229        #endif
  230        int crypt(int, int);
  231 
  232         ], [], sqwebmail_cv_NEED_CRYPT_PROTOTYPE=1,
  233                 sqwebmail_cv_NEED_CRYPT_PROTOTYPE=0 )
  234 
  235 )
  236 
  237 AC_DEFINE_UNQUOTED(NEED_CRYPT_PROTOTYPE,$sqwebmail_cv_NEED_CRYPT_PROTOTYPE,
  238     [ Whether crypt() must be prototyped ])
  239 
  240 AC_MSG_CHECKING([whether libcharset is used])
  241 AC_ARG_WITH(libcharset,
  242     [  --with-libcharset     Use the libcharset library],
  243     sqwebmail_with_libcharset=$withval,
  244     sqwebmail_with_libcharset=no)
  245 AC_MSG_RESULT($sqwebmail_with_libcharset)
  246 if test "$sqwebmail_with_libcharset" = "yes"; then
  247   AC_CHECK_LIB(charset,locale_charset)
  248   if test "$ac_cv_lib_charset_locale_charset" = "yes"; then
  249     AC_CHECK_HEADERS(localcharset.h libcharset.h)
  250   else
  251     AC_MSG_ERROR([libcharset was not found.  Install libcharset package.])
  252   fi
  253   AC_DEFINE_UNQUOTED(USE_LIBCHARSET, 1,
  254     [ Set this to 1 to use libcharset library. ])
  255 else
  256   AM_LANGINFO_CODESET
  257 fi
  258 
  259 dnl Other
  260 
  261 AC_ARG_ENABLE(https, [  --enable-https          Generate https:// URLs for all accesses
  262   --enable-https=login    Use https:// URLs for password transmission only
  263   --enable-https=auto     Use relative URLs (up to user which to use)
  264   --disable-https         Do not use https:// URLs no matter what.
  265                           (auto is the default)],
  266     https="$enableval", https="auto")
  267 
  268 case "$https" in
  269 1*|y*|Y*)
  270     AC_DEFINE_UNQUOTED(USE_HTTPS, 1, [ Always use https:// URLs ])
  271     AC_DEFINE_UNQUOTED(USE_HTTPS_LOGIN, 1,
  272         [ Use https:// for logins ])
  273     ;;
  274 login)
  275     AC_DEFINE_UNQUOTED(USE_HTTPS_LOGIN, 1,
  276         [ Use https:// for logins ])
  277     ;;
  278 auto)
  279     AC_DEFINE_UNQUOTED(USE_RELATIVE_URL, 1,
  280         [ Autodetect whether to use http or https URLs ])
  281     ;;
  282 esac
  283 
  284 
  285 AC_ARG_ENABLE(hardtimeout, [  --enable-hardtimeout=7200  Hard session timeout (2hrs default)],
  286     TIMEOUTHARD=$enableval, TIMEOUTHARD=7200)
  287 AC_DEFINE_UNQUOTED(TIMEOUTHARD,$TIMEOUTHARD,
  288     [ Hard login timeout ])
  289 AC_SUBST(TIMEOUTHARD)
  290 
  291 AC_ARG_ENABLE(softtimeout, [  --enable-softtimeout=1200  Inactivity timeout (20 min default)],
  292     TIMEOUTSOFT=$enableval, TIMEOUTSOFT=1200)
  293 AC_DEFINE_UNQUOTED(TIMEOUTSOFT,$TIMEOUTSOFT,
  294     [ Soft login timeout ])
  295 
  296 AC_ARG_ENABLE(autopurge, [  --enable-autopurge=7       Automatically purge deleted messages (days).],
  297     AUTOPURGE=$enableval, AUTOPURGE=7)
  298 AC_DEFINE_UNQUOTED(AUTOPURGE,$AUTOPURGE,
  299     [ Automatically purge Trash after this many days ])
  300 
  301 AC_ARG_ENABLE(maxpurge,  [  --enable-maxpurge=90       Maximum value for autopurge (days).],
  302     MAXPURGE=$enableval, MAXPURGE=90)
  303 AC_DEFINE_UNQUOTED(MAXPURGE,$MAXPURGE,
  304     [ Maximum number of days mail is kept in Trash, before deleting ])
  305 
  306 AC_ARG_WITH(maxmsgsize,
  307 [  --with-maxmsgsize=nbytes       Limit max size of a created message, in bytes
  308                                  (default: 2 megabytes)],
  309     MAXMSGSIZE=$withval,
  310     MAXMSGSIZE=2097152)
  311 
  312 AC_SUBST(MAXMSGSIZE)
  313 
  314 AC_ARG_ENABLE(lang, [  --with-defaultlang={lang}       Default language to use (only en, so far)],
  315     lang="$enableval",lang=en; ac_configure_args="$ac_configure_args --with-defaultlang=$lang")
  316 
  317 AC_ARG_ENABLE(mimecharset,
  318     [  --enable-mimecharset=charset   Default MIME charset to set on new messages])
  319 
  320 mimetypes=""
  321 
  322 for f in /usr/lib /usr/local/lib /usr/lib/pine /usr/local/lib/pine /etc \
  323          /var/lib/httpd/conf /home/httpd/conf /usr/local/etc/apache \
  324          /usr/local/apache/conf /var/lib/apache/etc /etc/httpd \
  325          /usr/local/apache2/conf
  326 do
  327     if test -f $f/mime.types
  328     then
  329         if test "$mimetypes" != ""
  330         then
  331             mimetypes="$mimetypes:"
  332         fi
  333         mimetypes="$mimetypes$f/mime.types"
  334     fi
  335 done
  336 
  337 AC_ARG_ENABLE(mimetypes, [  --enable-mimetypes={dir}   Your mime.types file.],
  338     mimetypes="$enableval",
  339     [
  340         if test "$mimetypes" = ""
  341         then
  342             AC_MSG_ERROR([Unable to find your mime.types file, specify --enable-mimetypes.])
  343         fi
  344     ] )
  345 AC_DEFINE_UNQUOTED(MIMETYPES, "$mimetypes",
  346                   [ Your mime.types files ])
  347 
  348 AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
  349                 [ Maximum size of a long ])
  350 
  351 AC_ARG_ENABLE(bannerprog,
  352     [  --enable-bannerprog=prog   Program which will generate a banner.],
  353     [
  354         AC_DEFINE_UNQUOTED(BANNERPROG, "$enableval",
  355         [ External banner generating program ])
  356          ])
  357 
  358 
  359 CFLAGS="$CFLAGS -I.. -I$srcdir/.. -I../.. -I$srcdir/../.."
  360 
  361 AC_ARG_WITH(maxargsize,
  362     [  --with-maxargsize=nbytes       Limit maximum size of CGI args])
  363 AC_ARG_WITH(maxformargsize,
  364     [  --with-maxformargsize=nbytes   Maximum size of multipart/formdata uploads])
  365 
  366 cachedir=$localstatedir/webmail-logincache
  367 
  368 AC_ARG_WITH(cachedir,
  369     [  --with-cachedir=dir        Specify location of the cache directory],
  370     cachedir="$withval")
  371 AC_SUBST(cachedir)
  372 AC_DEFINE_UNQUOTED(CACHEDIR, "$cachedir",
  373                  [ Login cache directory location ])
  374 
  375 AC_ARG_WITH(cacheowner,
  376     [  --with-cacheowner=user     Owner of the cache directory (default: bin)],
  377     cacheowner="$withval", cacheowner="bin")
  378 
  379 AC_DEFINE_UNQUOTED(CACHEOWNER, "$cacheowner",
  380                    [ Login cache directory owner ])
  381 AC_SUBST(cacheowner)
  382 
  383 dogzip="no"
  384 if test "$GZIP" != "gzip"
  385 then
  386     dogzip="yes"
  387 fi
  388 
  389 AC_ARG_WITH(gzip,
  390     [  --without-gzip                 Do not use gzip to compress messages],
  391     dogzip="$withval")
  392 
  393 if test "$dogzip" = "no"
  394 then
  395     GZIP=""
  396 fi
  397 
  398 if test "$GZIP" != ""
  399 then
  400     AC_DEFINE_UNQUOTED(GZIP,"$GZIP",
  401     [ Path to gzip ])
  402 fi
  403 
  404 AC_ARG_WITH(efence,
  405     [  --with-efence                  Link with efence.a debugger ],
  406     efence=$withval, efence="N")
  407 
  408 case $efence in
  409 1*|y*|Y*)
  410     LIBS="$LIBS -lefence"
  411     ;;
  412 *)
  413     ;;
  414 esac
  415 
  416 imageurl="/webmail"
  417 
  418 AC_ARG_ENABLE(imageurl, [  --enable-imageurl={url}   URL to <DocumentRoot> directory for images.],
  419     imageurl="$enableval")
  420 
  421 AC_SUBST(imageurl)
  422 AC_MSG_CHECKING(URL to access images)
  423 AC_MSG_RESULT($imageurl)
  424 
  425 AC_CONFIG_SUBDIRS(images html)
  426 
  427 INSTALL_SCRIPT='${INSTALL} -m 0755'
  428 
  429 cp -f $srcdir/sqwebmail.pamconf webmail.authpam
  430 
  431 if test -f /etc/pam.d/system-auth
  432 then
  433     if ls /lib*/security/pam_stack.so 2>/dev/null >/dev/null
  434     then
  435         cp -f $srcdir/sqwebmail-system-auth.pamconf webmail.authpam
  436     else
  437         cp -f $srcdir/sqwebmail-system-auth2.pamconf webmail.authpam
  438     fi
  439 fi
  440 
  441 AC_ARG_WITH(mailuser, [], mailuser="$withval",
  442     AC_MSG_ERROR(--with-mailuser missing))
  443 AC_ARG_WITH(mailgroup, [], mailgroup="$withval",
  444     AC_MSG_ERROR(--with-mailgroup missing))
  445 
  446 AC_SUBST(mailuser)
  447 AC_SUBST(mailgroup)
  448 
  449 AC_ARG_WITH(minpasslen,
  450 [  --with-minpasslen=ncharacters        Minimum length of a password, in characters
  451                                  (default: 1 character)],
  452     MINPASSLEN=$withval,
  453     MINPASSLEN=1)
  454 
  455 AC_SUBST(MINPASSLEN)
  456 AC_DEFINE_UNQUOTED(MINPASSLEN, $MINPASSLEN,
  457                  [ Minimum length of a password ])
  458 
  459 
  460 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
  461 
  462 # This gets built by the make rule, and is not in the git repo
  463 
  464 for f in sqwebmaild.dist.in
  465 do
  466     if test ! -f "$srcdir/$f"
  467     then
  468     cp -p "$srcdir/$f.git" "$srcdir/$f"
  469     touch "$srcdir/$f.git"
  470     fi
  471 done
  472 
  473 AC_OUTPUT(Makefile sendit.sh cleancache.pl sqwebmaild.dist)
  474 
  475 if test ! -d html/$lang
  476 then
  477     AC_MSG_ERROR(Unknown language: $lang)
  478 fi