Skip to content

Commit 21899a7

Browse files
committed
Use pkg-config if doent detect odbc_config
1 parent 2c1a0e2 commit 21899a7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Summary of important user-visible changes for odbc 0.0.2:
2+
-------------------------------------------------------------------
3+
4+
** Use pkg-config if cant find odbc_config tool
5+
16
Summary of important user-visible changes for odbc 0.0.1:
27
-------------------------------------------------------------------
38

src/configure.ac

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,12 @@ if test $have_windows = yes; then
196196
else
197197
# look for unix odbc
198198
AC_CHECK_TOOL([ODBC_CONFIG], [odbc_config], [none])
199-
if [ test "x$ODBC_CONFIG" = "xnone" ]; then
200-
AC_MSG_ERROR([*** 'odbc_config' not found.])
199+
if ! [ test "x$ODBC_CONFIG" = "xnone" ]; then
200+
ODBC_LIBS=`$ODBC_CONFIG --libs`
201+
ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
202+
else
203+
PKG_CHECK_MODULES([ODBC], [odbc])
201204
fi
202-
ODBC_LIBS=`$ODBC_CONFIG --libs`
203-
ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
204205
fi
205206
AC_SUBST([ODBC_LIBS])
206207
AC_SUBST([ODBC_CFLAGS])

0 commit comments

Comments
 (0)