1 AC_INIT(http_getter.pl.in)
3 PACKAGE=helm_http_getter
7 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
9 DEFAULT_HELM_LIB_DIR=/usr/local/lib/helm
13 [ --enable-defaults[=ARG] if yes then use defaults (don't ask user) [default=auto]],
14 USE_DEFAULTS=$enableval,
18 if test "x$prefix" != xNONE; then
19 RESOLVED_PREFIX=$prefix
21 RESOLVED_PREFIX=$ac_default_prefix
24 if test "x$exec_prefix" != xNONE; then
25 RESOLVED_EXEC_PREFIX=$exec_prefix
27 RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
30 if test $USE_DEFAULTS = auto; then
31 AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
32 if test $HAVE_HELM_CONFIG = yes; then
33 HELM_LIB_DIR=`helm-config --lib-dir`
39 if test $USE_DEFAULTS = no; then
41 echo "\`helm-config' is not installed (or I can't find it in your path)."
42 echo "Please, insert the lib directory HELM..."
44 echo -n "[[$DEFAULT_HELM_LIB_DIR]] ? "
46 if test "x$HELM_LIB_DIR" = "x"; then
47 HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR
49 elif test $USE_DEFAULTS = yes; then
50 HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR
53 AC_MSG_CHECKING(for $HELM_LIB_DIR/configuration.pl)
54 if test -f $HELM_LIB_DIR/configuration.pl; then
58 AC_MSG_ERROR(please check your installation)
61 AC_PATH_PROG(PERL_BINARY,perl,no)
62 if test $PERL_BINARY = no ; then
63 AC_MSG_ERROR(Could not find perl)
66 dnl Perl modules checks
67 PERL_MODS="HTTP::Daemon HTTP::Status HTTP::Request LWP::UserAgent DB_File Compress::Zlib"
68 PERL_INC=`perl -e 'print(join(" ",@INC))'`
69 for perl_mod in $PERL_MODS; do
70 AC_MSG_CHECKING("for perl module: $perl_mod")
71 perl_mod_file=`echo $perl_mod | sed -e 's/::/\//' -e 's/$/\.pm/'`
73 for perl_lib_dir in $PERL_INC; do
74 if test -f "$perl_lib_dir/$perl_mod_file"; then
76 AC_MSG_RESULT("found in $perl_lib_dir")
80 if test "$module_found" != "true"; then
81 AC_MSG_ERROR("not found")
87 AC_SUBST(RESOLVED_PREFIX)
88 AC_SUBST(RESOLVED_EXEC_PREFIX)
89 AC_SUBST(HELM_LIB_DIR)
96 ], chmod +x http_getter.pl)