44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ([2.69])
|
|
AC_INIT([pgear], [0.3], [barnold@tilde.club], [], [https://tildegit.org/barnold/pgear])
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
|
AC_CONFIG_SRCDIR([src/main.c])
|
|
AC_CONFIG_HEADERS([src/config.h])
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_INSTALL
|
|
AC_CHECK_PROG([FOUND_PG_CONFIG],[pg_config],[yes],[no])
|
|
if test x$FOUND_PG_CONFIG = xno; then
|
|
AC_MSG_ERROR([
|
|
The program `pg_config' is not on your PATH. You might need to
|
|
install the PostgreSQL client package or a package for PostgreSQL
|
|
development files. E.g. on Debian, install the package libpq-dev.])
|
|
fi
|
|
|
|
# For the Makefile to use in AM_CPPFLAGS and AM_LDFLAGS.
|
|
AC_SUBST([LIBPQ_FE_INCDIR],[`pg_config --includedir`])
|
|
AC_SUBST([LIBPQ_FE_LIBDIR],[`pg_config --libdir`])
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_ASSERT
|
|
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h syslog.h unistd.h])
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_HEADER_STDBOOL
|
|
AC_TYPE_PID_T
|
|
AC_C_RESTRICT
|
|
AC_TYPE_SSIZE_T
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_FORK
|
|
AC_CHECK_FUNCS([alarm atexit select strerror strtol])
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
src/Makefile
|
|
doc/pgear.1
|
|
doc/Makefile])
|
|
AC_OUTPUT
|