114 lines
2.7 KiB
Plaintext
114 lines
2.7 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
AC_INIT(pgworker, 0.1, woho@hottis.de)
|
|
AM_INIT_AUTOMAKE(pgworker, 0.1)
|
|
AM_MAINTAINER_MODE
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_LANG_C
|
|
|
|
AC_ARG_WITH(smmapdfw-lib-dir,
|
|
[AC_HELP_STRING(--with-smmapdfw-lib-dir, [
|
|
Directory for smmapdfw library files])],
|
|
[ case "$withval" in
|
|
no)
|
|
AC_MSG_ERROR(Need smmapdfw-lib-dir)
|
|
;;
|
|
yes)
|
|
;;
|
|
*)
|
|
LDFLAGS="$LDFLAGS -L$withval -R$withval"
|
|
;;
|
|
esac ]
|
|
)
|
|
|
|
AC_ARG_WITH(smmapdfw-inc-dir,
|
|
[AC_HELP_STRING(--with-smmapdfw-inc-dir, [
|
|
Directory for smmapdfw include files])],
|
|
[ case "$withval" in
|
|
no)
|
|
AC_MSG_ERROR(Need smmapdfw-inc-dir)
|
|
;;
|
|
yes)
|
|
;;
|
|
*)
|
|
CPPFLAGS="$CPPFLAGS -I$withval"
|
|
;;
|
|
esac ]
|
|
)
|
|
|
|
AC_ARG_WITH(pgsql-lib-dir,
|
|
[AC_HELP_STRING(--with-pgsql-lib-dir, [
|
|
Directory for postgres library files])],
|
|
[ case "$withval" in
|
|
no)
|
|
AC_MSG_ERROR(Need pgsql-lib-dir)
|
|
;;
|
|
yes)
|
|
;;
|
|
*)
|
|
LDFLAGS="$LDFLAGS -L$withval -R$withval"
|
|
;;
|
|
esac ]
|
|
)
|
|
|
|
AC_ARG_WITH(pgsql-inc-dir,
|
|
[AC_HELP_STRING(--with-pgsql-inc-dir, [
|
|
Directory for postgres include files])],
|
|
[ case "$withval" in
|
|
no)
|
|
AC_MSG_ERROR(Need pgsql-inc-dir)
|
|
;;
|
|
yes)
|
|
;;
|
|
*)
|
|
CPPFLAGS="$CPPFLAGS -I$withval"
|
|
;;
|
|
esac ]
|
|
)
|
|
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_LIBTOOL
|
|
AC_PROG_MAKE_SET
|
|
|
|
# Checks for libraries.
|
|
AC_CHECK_LIB([m], [sin])
|
|
AC_CHECK_LIB([pq], [PQstatus])
|
|
AC_CHECK_LIB([smmapdfw], [findcfgl])
|
|
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([stdlib.h string.h strings.h syslog.h unistd.h libpq-fe.h cfg.h containers_public.h smmapd.h htmalloc.h queue.h count.h])
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_FORK
|
|
dnl AC_FUNC_MALLOC
|
|
dnl AC_FUNC_REALLOC
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
AC_CHECK_FUNCS([syslog findcfgl findcfglx htmalloc htrealloc], [],
|
|
[AC_MSG_ERROR([*** missing function, we can't go without it])])
|
|
|
|
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile pgworker/Makefile])
|
|
|
|
AC_OUTPUT
|