1 AC_INIT(http_getter.pl.in)
3 PACKAGE=helm_http_getter
7 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
9 if test "x$prefix" != xNONE; then
10 RESOLVED_PREFIX=$prefix
12 RESOLVED_PREFIX=$ac_default_prefix
15 if test "x$exec_prefix" != xNONE; then
16 RESOLVED_EXEC_PREFIX=$exec_prefix
18 RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
21 AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
22 if test $HAVE_HELM_CONFIG = no; then
23 AC_MSG_ERROR(helm-config not found)
26 DEFAULT_HELM_LIB_DIR=`helm-config --lib-dir`
28 AC_MSG_CHECKING("for configuration.pl")
29 if test ! -f $DEFAULT_HELM_LIB_DIR/configuration.pl; then
30 AC_MSG_ERROR(Could not find configuration.pl in $DEFAULT_HELM_LIB_DIR, please check your installation)
32 AC_MSG_RESULT(in $DEFAULT_HELM_LIB_DIR)
34 AC_PATH_PROG(PERL_BINARY,perl,no)
35 if test $PERL_BINARY = no ; then
36 AC_MSG_ERROR(Could not find perl)
39 dnl Perl modules checks
40 PERL_MODS="HTTP::Daemon HTTP::Status HTTP::Request LWP::UserAgent DB_File Compress::Zlib"
41 PERL_INC=`perl -e 'print(join(" ",@INC))'`
42 for perl_mod in $PERL_MODS; do
43 AC_MSG_CHECKING("for perl module: $perl_mod")
44 perl_mod_file=`echo $perl_mod | sed -e 's/::/\//' -e 's/$/\.pm/'`
46 for perl_lib_dir in $PERL_INC; do
47 if test -f "$perl_lib_dir/$perl_mod_file"; then
49 AC_MSG_RESULT("found in $perl_lib_dir")
53 if test "$module_found" != "true"; then
54 AC_MSG_ERROR("not found")
60 AC_SUBST(RESOLVED_PREFIX)
61 AC_SUBST(RESOLVED_EXEC_PREFIX)
62 AC_SUBST(DEFAULT_HELM_LIB_DIR)
69 ], chmod +x http_getter.pl)