Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f4b56d

Browse files
committed
Use pkg-config to locate libraries.
Get the necessary CFLAGS for the desired libraries with pkg-config.
1 parent 14295c5 commit 5f4b56d

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

‎guile-dbd-postgresql/configure.ac‎

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
# -*- Autoconf -*-
2222
# Process this file with autoconf to produce a configure script.
2323

24-
AC_PREREQ(2.57)
25-
AC_INIT(guile-dbd-postgresql, 2.1.8, bug-guile@gnu.org)
24+
AC_PREREQ([2.71])
25+
AC_INIT([guile-dbd-postgresql],[2.1.8],[bug-guile@gnu.org])
2626
AM_INIT_AUTOMAKE
2727
AM_MAINTAINER_MODE
28-
AC_CONFIG_HEADER([config.h])
29-
AC_GNU_SOURCE
28+
AC_CONFIG_HEADERS([config.h])
29+
AC_USE_SYSTEM_EXTENSIONS
30+
PKG_PREREQ(0.29)
3031

3132
maintainer_mode=${enable_maintainer_mode-no}
3233

@@ -37,7 +38,7 @@ LT_INIT
3738
AC_PROG_CC
3839
AC_PROG_CXX
3940
AM_PROG_AS
40-
AC_PROG_LIBTOOL
41+
LT_INIT
4142
AC_CHECK_TOOL([AR], [ar], :)
4243
AC_CHECK_TOOL([NM], [nm], :)
4344
AC_PATH_PROG([GUILECONFIG], [guile-config], :)
@@ -52,13 +53,25 @@ AC_CHECK_FUNCS([strerror])
5253
AC_CHECK_FUNCS([strndup])
5354
AC_CHECK_HEADERS([string.h])
5455
AC_FUNC_MALLOC
55-
AC_HEADER_STDC
56+
m4_warn([obsolete],
57+
[The preprocessor macro `STDC_HEADERS' is obsolete.
58+
Except in unusual embedded environments, you can safely include all
59+
ISO C90 headers unconditionally.])dnl
60+
# Autoupdate added the next two lines to ensure that your configure
61+
# script's behavior did not change. They are probably safe to remove.
62+
AC_CHECK_INCLUDES_DEFAULT
63+
AC_PROG_EGREP
64+
5665

5766
# Checks for libs.
58-
AC_CHECK_LIB(pq,PQconnectStart,,
59-
AC_MSG_ERROR([*** Can't find libpq]))
67+
PKG_CHECK_MODULES([PQ], [libpq],,
68+
AC_MSG_ERROR([*** Can't find libpq]))
69+
70+
PKG_CHECK_MODULES([GUILE_DBI], [guile-dbi],,
71+
AC_MSG_ERROR([*** Can't find guile-dbi]))
6072

61-
CFLAGS=`guile-config compile`
73+
CFLAGS="${CFLAGS:+${CFLAGS} }$PQ_CFLAGS $GUILE_DBI_CFLAGS \
74+
`guile-config compile`"
6275
LIBS=`guile-config link`
6376

6477
. $srcdir/DBD-VERSION

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /