1dnl 2dnl configure.in 3dnl 4dnl Author: Internet Message Group <img@mew.org> 5dnl Created: Apr 23, 1997 6dnl Revised: Dec 20, 2002 7dnl 8 9AC_INIT(imget.in) 10 11dnl Checks for programs. 12AC_PROG_INSTALL() 13AC_CANONICAL_HOST 14AC_PROG_CC 15AC_PROG_CPP 16 17im_file_attr="Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL()" 18im_nosync="no" 19 20AC_SUBST(im_rpop) 21AC_SUBST(im_db_type) 22AC_SUBST(im_file_attr) 23AC_SUBST(im_src_siteperl) 24AC_SUBST(im_my_siteperl) 25AC_SUBST(im_usecl) 26AC_SUBST(im_nosync) 27AC_SUBST(im_fsync_no) 28AC_SUBST(im_hostname) 29AC_SUBST(im_path_ssh) 30IM_PATH_PERLV_PROGS(im_path_perl, perl perl5, PERL5_NOT_FOUND) 31case "$im_path_perl" in 32""|PERL5_NOT_FOUND) 33 echo "fatal error: perl 5.004 not found. install perl 5.004 or later." 1>&2 34 exit 1 35esac 36IM_PATH_SITEPERL(im_path_siteperl, "$im_path_perl", missing_siteperl) 37AC_PATH_PROGS(im_path_chmod, chmod, missing_chmod) 38AC_PATH_PROGS(im_path_mkdir, mkdir, missing_mkdir) 39AC_PATH_PROGS(im_path_rm, rm, missing_rm) 40AC_PATH_PROGS(im_path_mv, mv, missing_mv) 41AC_PATH_PROGS(im_path_sed, sed, missing_sed) 42IM_DB_TYPE(im_db_type, $im_path_perl) 43 44dnl Checks for libraries. 45 46dnl Checks for header files. 47 48dnl Checks for typedefs, structures, and compiler characteristics. 49 50dnl Checks for library functions. 51 52AC_ARG_ENABLE(rpop, 53[ --enable-rpop Use RPOP (suidperl is needed)], 54[im_rpop="${enableval}"]) 55if test "x$im_rpop" = 'xyes'; then 56 im_rpop="-o root -m 4755" 57else 58 im_rpop="-m 755" 59fi 60 61im_fsync_no=undef 62AC_ARG_WITH(fsyncno, 63[ --with-fsyncno=NUMBER Use NUMBER as SYS_fsync], 64[im_fsync_no="${withval}"]) 65if test "x$im_fsync_no" = 'xundef'; then 66 dnl check fsync() is in sys/syscall.h 67 im_nosync="undefined" 68 AC_CHECK_HEADER(sys/syscall.h) 69 if test "$ac_cv_header_sys_syscall_h" = yes ; then 70 cat > conftest.c << EOF 71#include <sys/syscall.h> 72#ifdef SYS_fsync 73IM_FSYNC_NO=SYS_fsync 74#else 75IM_FSYNC_NO=undef 76#endif 77EOF 78 im_fsync_no=`eval $ac_cpp conftest.c | sed -n -e 's/ *//g' -e 's/^IM_FSYNC_NO=//p'` 79 rm -f conftest.c 80 fi 81fi 82if test "x$im_fsync_no" = 'xundef'; then 83 im_nosync="yes" 84else 85 im_nosync="no" 86fi 87 88im_src_siteperl="use lib '`pwd`'; ###DELETE-ON-INSTALL###" 89AC_ARG_WITH(perldir, 90[ --with-perldir=DIR Use DIR as site_perl directory], 91[im_path_siteperl="${withval}" 92 im_my_siteperl="use lib '${withval}';"], 93[if test "${prefix}" != "NONE" ; then 94dnl prefix is equal to exec_prefix 95 im_my_siteperl="use lib '${prefix}/lib';" 96 im_path_siteperl='${exec_prefix}/lib' 97 fi]) 98 99AC_ARG_ENABLE(usecl, 100[ --enable-usecl Use value of Content-Length header], 101[im_usecl="${enableval}"]) 102if test "x$im_usecl" = 'x'; then 103 AC_MSG_CHECKING([OS type]) 104 case "$host" in 105 *-*-solaris2*) 106 AC_MSG_RESULT([Seems to be a Solaris; Content-Length: should be checked]) 107 im_usecl=yes ;; 108 *) 109 AC_MSG_RESULT([Not a Solaris; Content-Length: can be ignored]) 110 im_usecl=no ;; 111 esac 112fi 113 114im_path_ssh='' 115AC_ARG_WITH(ssh, 116[ --with-ssh=PATH Use PATH as SSH location], 117[im_path_ssh="${withval}"]) 118if test "x$im_path_ssh" = 'x'; then 119 AC_PATH_PROG(im_path_ssh, ssh, '/usr/local/bin/ssh') 120fi 121 122im_hostname='' 123AC_ARG_WITH(hostname, 124[ --with-hostname=DOMAIN Use DOMAIN as default domain for mail-address], 125[im_hostname="${withval}"]) 126if test "x$im_hostname" = 'x'; then 127 AC_MSG_CHECKING([domain for mail-address]) 128 im_hostname=`hostname` 129 AC_MSG_RESULT([$im_hostname]) 130fi 131 132AC_OUTPUT(imali:imali.in imcat:imcat.in imcd:imcd.in \ 133 imclean:imclean.in imget:imget.in \ 134 imgrep:imgrep.in imhist:imhist.in imhsync:imhsync.in \ 135 imjoin:imjoin.in imls:imls.in \ 136 immknmz:immknmz.in immv:immv.in impack:impack.in \ 137 impath:impath.in imput:imput.in \ 138 impwagent:impwagent.in imrm:imrm.in imsetup:imsetup.in \ 139 imsort:imsort.in imstore:imstore.in imtar:imtar.in \ 140 Makefile:Makefile.in \ 141 cnf.im/SiteConfig:cnf.im/SiteConfig.in \ 142 IM/Config.pm:IM/Config.pm.in \ 143 , chmod 755 imali imcat imcd imclean imget \ 144 imgrep imhist imhsync imjoin imls \ 145 immknmz immv impack impath imput \ 146 impwagent imrm imsetup imsort imstore imtar) 147 148dnl Copyright (C) 1997, 1998, 1999 IM developing team. 149dnl All rights reserved. 150dnl 151dnl Redistribution and use in source and binary forms, with or without 152dnl modification, are permitted provided that the following conditions 153dnl are met: 154dnl 155dnl 1. Redistributions of source code must retain the above copyright 156dnl notice, this list of conditions and the following disclaimer. 157dnl 2. Redistributions in binary form must reproduce the above copyright 158dnl notice, this list of conditions and the following disclaimer in the 159dnl documentation and/or other materials provided with the distribution. 160dnl 3. Neither the name of the team nor the names of its contributors 161dnl may be used to endorse or promote products derived from this software 162dnl without specific prior written permission. 163dnl 164dnl THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND 165dnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 166dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 167dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE 168dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 169dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 170dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 171dnl BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 172dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 173dnl OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 174dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 175