File: configure.ac

package info (click to toggle)
postgresql-autodoc 1.25-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 332 kB
  • ctags: 24
  • sloc: sh: 2,805; perl: 1,563; makefile: 104
file content (55 lines) | stat: -rw-r--r-- 1,212 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
AC_PREREQ(2.53)
AC_REVISION($Header: /cvsroot/autodoc/autodoc/configure.ac,v 1.1.1.1 2004/05/12 16:00:34 rbt Exp $)
AC_INIT(postgresql_autodoc.pl)


# Programs
AC_PROG_INSTALL

AC_PATH_PROGS([SED], [sed], ,
             [$PATH:/bin:/usr/bin])

# Check for Perl
AC_ARG_WITH(perl-prefix,
	[  --with-perl-prefix      Location of Perl],
	PERLPATH=$withval,
	PERLPATH="")

if ( test -n "$PERLPATH" -a "`echo $PERLPATH | cut -c-3`" = "../" ); then
	PERLPATH="$PWD/$PERLPATH"
fi

PERL=""
if ( test -n "$PERLPATH" ); then
	AC_CHECK_FILE("$PERLPATH/bin/perl",PERL="$PERLPATH/bin/perl")
else
	AC_PATH_PROGS([PERL], [perl], ,
   	          [$PATH:/usr/bin:/usr/local/bin:/usr/pkg/bin:/usr/local/perl/bin:/opt/sfw/bin])
fi
if ( test -z "$PERL" ); then
	AC_MSG_ERROR("Perl is required")
fi
AC_SUBST(PERL)


# Check that Perl Libraries are available:
#	DBI
#	DBD::Pg
#	Fcntl
#	HTML::Template
#
# Output of if test redirected to /dev/null to keep quiet
for module in DBI DBD::Pg Fcntl HTML::Template ; do
	AC_MSG_CHECKING(${module})
	if [ ! (${PERL} -e "use ${module}" 2>&1 /dev/null ) ]; then
		AC_MSG_RESULT(no)
		AC_MSG_ERROR(Perl module ${module} is required)
	else
		AC_MSG_RESULT(yes)
	fi
done


AC_OUTPUT([
config.mk
])