1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4AC_PREREQ(2.53) 5AC_INIT(Pgeasy, 3.0.4, pgeasy-general@gborg.postgresql.org) 6AM_MAINTAINER_MODE 7 8# init programs and stuff 9AM_INIT_AUTOMAKE([foreign]) 10AC_CONFIG_SRCDIR([libpgeasy.c]) 11AM_CONFIG_HEADER(config.h) 12 13# Evaluate options 14AC_ARG_WITH([pqinclude], 15 AC_HELP_STRING([--with-pqinclude=path],[set path where to find libpq-fe.h]), 16 [if test -d $withval; then CPPFLAGS="$CPPFLAGS -I$withval"; fi]) 17 18AC_ARG_WITH([pqlib], 19 AC_HELP_STRING([--with-pqlib=path],[set path where to find libpq.so]), 20 [if test -d $withval; then CFLAGS="$CFLAGS -L$withval"; fi]) 21 22# Checks for programs. 23AC_PROG_CC 24AC_PROG_LIBTOOL 25 26# Checks for libraries. 27AC_CHECK_LIB([pq], [PQconnectdb],,[echo "Error: libpq.so not found"; exit 1]) 28 29# Checks for header files. 30AC_HEADER_STDC 31AC_CHECK_HEADERS([stdlib.h string.h]) 32AC_CHECK_HEADER(libpq-fe.h,,[echo "Error: Required include file libpq-fe.h not found"; exit 1]) 33 34# Checks for typedefs, structures, and compiler characteristics. 35 36# Checks for library functions. 37AC_TYPE_SIGNAL 38AC_FUNC_VPRINTF 39 40AC_CONFIG_FILES([Makefile]) 41AC_OUTPUT 42