3 # Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
11 # $Id: configure.sh,v 8.46 2003/08/20 18:08:35 gshapiro Exp $
14 # Special script to autoconfigure for M4 generation of Makefile
21 bin_dir
=`echo $0 | sed -e 's%\/[^/]*$%%'`
26 find_prog
=$bin_dir/find_in_path.sh
32 -s) # skip auto-configure
46 for p
in `echo $PATH | sed 's/:/ /g'`
55 if [ $usehostname -ne 0 ]
63 if [ $usewhoami -ne 0 ]
69 if [ $usewhoami -ne 0 ]
76 if [ $usehostname -ne 0 ]
83 echo "####################################################################"
84 echo "##### This file is automatically generated -- edit at your own risk"
85 echo '#####' Built by
$user@
$host
86 echo '#####' on
`date` using template OS
/$os
87 if [ ! -z "$SITECONFIG" ]
89 echo '#####' including
$SITECONFIG
91 echo '#####' in `pwd` |
sed 's/\/tmp_mnt//'
92 echo "####################################################################"
95 echo "define(\`__HOST__', \`$host')dnl"
96 echo "ifdef(\`confMAPDEF',, \`define(\`confMAPDEF', \`')')dnl"
97 echo "ifdef(\`confLIBS',, \`define(\`confLIBS', \`')')dnl"
99 LIBDIRS
="$LIBDIRS $LIBPATH"
104 for p
in `echo $LIBDIRS | sed -e 's/:/ /g' -e 's/^-L//g' -e 's/ -L/ /g'`
110 if [ -f $p/lib
$l.a
-o -f $p/lib
$l.so
]
115 mapdef
="$mapdef -DNEWDB"
118 if [ -n "$resolver" ]
126 if [ "x$resolver" != "xresolv" ]
138 for p
in `echo $PATH | sed 's/:/ /g'`
140 pbase
=`echo $p | sed -e 's,/bin,,'`
147 echo "ifdef(\`confDEPEND_TYPE',, \`define(\`confDEPEND_TYPE', \`BSD')')dnl"
153 echo "define(\`confMAPDEF', \`$mapdef' confMAPDEF)dnl"
154 echo "define(\`confLIBS', \`$libs' confLIBS)dnl"
157 if [ ! -z "`$SHELL $find_prog ranlib`" ]
159 echo "define(\`confRANLIB', \`ranlib')dnl"
162 roff_progs
="groff nroff"
163 for roff_prog
in $roff_progs
165 if [ ! -z "`$SHELL $find_prog $roff_prog`" ]
167 found_roff
=$roff_prog
175 echo "ifdef(\`confNROFF',,\`define(\`confNROFF', \`$found_roff -Tascii')')dnl"
178 echo "ifdef(\`confNROFF',,\`define(\`confNROFF', \`$found_roff')')dnl"
181 echo "ifdef(\`confNROFF',,\`define(\`confNO_MAN_BUILD')')dnl"