"Fossies" - the Fresh Open Source Software Archive 
Member "passwd_exp-1.2.11/configure.in" (3 Dec 2009, 5087 Bytes) of package /linux/privat/old/passwd_exp-1.2.11.tar.gz:
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.
1 dnl -*- sh -*-
2 dnl Config script for passwd_exp by Sam <samkob@gmail.com>
3 dnl
4
5 #initalize
6 AC_INIT()
7 PERL_REQUIRE=
8 PROGNAME="passwd_exp"
9 VERSION="1.2.11"
10 PACKAGE=$PROGNAME
11
12 #defaults
13 AC_PREFIX_DEFAULT(/usr/local)
14 AC_SUBST(PERL_REQUIRE)
15 AC_SUBST(PROGNAME)
16 AC_SUBST(VERSION)
17 AC_SUBST(PACKAGE)
18
19 #configs
20
21
22
23 #extra vars
24 datadir="${datadir}/passwd_exp"
25 pw_moddir="${datadir}/mod"
26 AC_SUBST(pw_moddir)
27
28 #install progs
29 AC_PROG_INSTALL()
30
31 #check perl existence
32 AC_PATH_PROG(PERL, perl)
33 if test "${PERL}x" = "x";
34 then AC_ERROR(missing perl interpreter !!!);
35 fi
36
37 AC_MSG_CHECKING(for perl version)
38 PERL_v=`perl -v | grep 'This is perl' | cut -d ' ' -f 4,7 2>/dev/null`
39 if test "${PERL_v}x" != "x";
40 then AC_MSG_RESULT($PERL_v);
41 else AC_MSG_RESULT(unknown);
42 fi
43 AC_SUBST(PERL_v)
44
45 #check for tokenizer packager
46 AC_MSG_CHECKING(for CPAN module)
47 if $PERL <<__EOF__ 2>/dev/null
48
49 use CPAN;
50
51 __EOF__
52 then AC_MSG_RESULT(present);
53 HAVE_CPAN=1;
54 else AC_MSG_RESULT(not found);
55 HAVE_CPAN=;
56 fi
57 AC_SUBST(HAVE_CPAN)
58
59 #check for tokenizer packager
60 AC_MSG_CHECKING(for Text::Tokenizer module)
61 if $PERL <<__EOF__ 2>/dev/null
62
63 use Text::Tokenizer;
64
65 __EOF__
66 then AC_MSG_RESULT(present);
67 else if test "${HAVE_CPAN}x" != "x";
68 then AC_MSG_RESULT(will try to install from CPAN);
69 PERL_REQUIRE="$PERL_REQUIRE Text::Tokenizer";
70 else AC_MSG_RESULT(not found);
71 AC_ERROR(You need Text::Tokenizer perl module to install this package);
72 exit 1;
73 fi;
74 fi
75
76 #check for locale
77 AC_ARG_ENABLE(locale,
78 [ --disable-locale disable locale support],
79 [ cf_disable_locale=$enableval ])
80 HAVE_LOCALE=
81 if test "${cf_disable_locale}x" = "x";
82 then
83 AC_MSG_CHECKING(for Locale::gettext module)
84 if $PERL <<__EOF__ 2>/dev/null
85
86 use Locale::gettext;
87
88 __EOF__
89 then AC_MSG_RESULT(present);
90 HAVE_LOCALE='\1';
91 else AC_MSG_RESULT(missing);
92 HAVE_LOCALE=;
93 fi
94 fi
95 AC_SUBST(HAVE_LOCALE)
96
97 #check if mail enabled
98 AC_MSG_CHECKING([if mail sending is enabled])
99 cf_enable_mail="yes"
100 AC_ARG_ENABLE(mail,
101 [ --disable-mail disable mail sending],
102 [ cf_enable_mail=$enableval ])
103 AC_MSG_RESULT($cf_enable_mail)
104 cf_report_mailerr="yes"
105 AC_ARG_ENABLE(nomail-errors,
106 [ --disable-nomail-errors disable reporting of missing mail programs],
107 [ cf_report_mailerr=$enableval ])
108
109 #check for sendmail
110 AC_MSG_CHECKING([for sendmail path])
111 cf_with_sendmail=""
112 AC_ARG_WITH(sendmail,
113 [ --with-sendmail=PATH path to sendmail binary],
114 [ cf_with_sendmail="$withval" ])
115 AC_MSG_RESULT($cf_with_sendmail)
116 if test "${cf_with_sendmail}x" = "x";
117 then AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail,
118 $PATH:/sbin:/usr/sbin:/usr/local/sbin)
119 else SENDMAIL="$cf_with_sendmail";
120 fi
121
122 #check for mail/mailx
123 AC_MSG_CHECKING([for mail/mailx path])
124 cf_with_mailx=""
125 AC_ARG_WITH(mail,
126 [ --with-mail=PATH path to mail/mailx binary],
127 [ cf_with_mailx="$withval" ])
128 AC_MSG_RESULT($cf_with_mailx)
129 if test "${cf_with_mailx}x" = "x";
130 then AC_PATH_PROG(MAILX, mail, /bin/mail, $PATH)
131 if test "${MAILX}x" = "x";
132 then AC_PATH_PROG(MAILX, mail, /bin/mailx, $PATH)
133 fi
134 else MAILX="$cf_with_mailx"
135 fi
136
137 #report error
138 if test "${SENDMAIL}x" = "x" && test "${MAILX}x" = "x";
139 then
140 msg="no mail sending tools found"
141 if test "$cf_enable_mail" = "no" || test "$cf_report_mailerr" = "no";
142 then AC_MSG_WARN([ $msg, ignoring...]);
143 else AC_ERROR([ $msg, exiting... ]);
144 exit 1;
145 fi
146 unset msg
147 fi
148
149 #fix for missing mailx
150 if test "{$MAILX}x" = "x";
151 then MAILX=/bin/mail;
152 fi
153
154 #check for sendmail
155 HAVE_SENDMAIL=1
156 if test "${SENDMAIL}x" = "x";
157 then HAVE_SENDMAIL=0;
158 fi
159 AC_SUBST(HAVE_SENDMAIL)
160
161 #checking for sed
162 AC_PATH_PROG(SED, sed, /bin/sed, $PATH)
163 AC_MSG_CHECKING(for sed version)
164 SED_v=`sed --version | grep 'sed version' | cut -d ' ' -f 1,4 2>/dev/null`
165 if test "${SED_v}x" != "x";
166 then AC_MSG_RESULT($SED_v);
167 else AC_MSG_RESULT(unknown);
168 fi
169 AC_SUBST(SED_v)
170
171 #check for crondir
172 AC_MSG_CHECKING(for crontab dirs (cron.*))
173 crondirs="${sysconfdir} /etc"
174 crondir=
175 for dir in $crondirs;
176 do if test -d "$dir/cron.daily";
177 then crondir=$dir
178 AC_MSG_RESULT($crondir);
179 break;
180 fi;
181 done
182 if test "${crondir}x" = "x";
183 then AC_MSG_RESULT(not found);
184 fi
185 AC_SUBST(crondir)
186
187 DB_MODULE=
188
189 #check for shadow
190 AC_MSG_CHECKING(for shadow)
191 t_shadow_file="/etc/shadow"
192 if test -f "$t_shadow_file";
193 then DB_MODULE='shadow.linux';
194 AC_MSG_RESULT(found);
195 else AC_MSG_RESULT(not found);
196 fi
197 #check for bsd
198 AC_MSG_CHECKING(for BSD system)
199 if uname -s | grep BSD >/dev/null;
200 then DB_MODULE='passwd.bsd';
201 AC_MSG_RESULT(found);
202 else AC_MSG_RESULT(not found);
203 fi
204 AC_SUBST(DB_MODULE)
205
206 #check for previous version < 0.9.x
207 #FIXME: dummy check
208 AC_MSG_CHECKING(for old passwd_exp 0.x)
209 HAVE_OLD_PEX=
210 sysconfdirs="${sysconfdir} /etc /usr/local/etc"
211 oldpex=
212 for dir in $sysconfdirs;
213 do if test -r "$dir/passwd_exp.conf";
214 then oldpex=$dir
215 AC_MSG_RESULT(found);
216 break;
217 fi;
218 done
219 if test "${oldpex}x" = "x";
220 then AC_MSG_RESULT(not found);
221 fi
222 AC_SUBST(HAVE_OLD_PEX)
223 AC_SUBST(oldpex)
224
225 #configured flag
226 AC_SUBST(NOT_CONFIGURED)
227
228 #end
229 AC_OUTPUT(confvars.map Makefile)
230 #EOF