summaryrefslogtreecommitdiffstats
path: root/m4/ac_prog_ecpg.m4
blob: b1025a95c4e9f34677072223b8f14bffab8715e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
dnl @synopsis AC_PROG_ECPG
dnl
dnl Finds e precompiler for PostgreSQL embedded code.
dnl
dnl @category PostgreSQL
dnl @author Sorin Stancu-Mara <smsorin@gmail.com>
dnl @version 2009-02-22
dnl @license GPLWithACException

AC_DEFUN([AC_PROG_ECPG],
[
 AC_ARG_WITH([ecpg], 
             [AS_HELP_STRING([--with-ecpg=PATH],
                             [path to ecpg])],
             [
              ECPG="$withval"
             ],
             [with_ecpg=check])
 if test "x$with_ecpg" = xcheck; then
    AC_PATH_PROG([ECPG], [ecpg], [])
 fi

 if test  ! -x "$ECPG"; then
    AC_MSG_ERROR([Unable to find ecpg or it's an executable file.])
 fi

 AC_SUBST([ECPG])

])