~ubuntu-branches/ubuntu/hardy/apache2/hardy-proposed

« back to all changes in this revision

Viewing changes to srclib/apr-util/build/dbd.m4

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch
  • Date: 2008-01-17 20:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080117202756-hv38rjknhwa2ilwi
Tags: upstream-2.2.8
ImportĀ upstreamĀ versionĀ 2.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl -------------------------------------------------------- -*- autoconf -*-
2
 
dnl Copyright 2005 The Apache Software Foundation or its licensors, as
3
 
dnl applicable.
4
 
dnl
5
 
dnl Licensed under the Apache License, Version 2.0 (the "License");
6
 
dnl you may not use this file except in compliance with the License.
7
 
dnl You may obtain a copy of the License at
 
2
dnl Licensed to the Apache Software Foundation (ASF) under one or more
 
3
dnl contributor license agreements.  See the NOTICE file distributed with
 
4
dnl this work for additional information regarding copyright ownership.
 
5
dnl The ASF licenses this file to You under the Apache License, Version 2.0
 
6
dnl (the "License"); you may not use this file except in compliance with
 
7
dnl the License.  You may obtain a copy of the License at
8
8
dnl
9
9
dnl     http://www.apache.org/licenses/LICENSE-2.0
10
10
dnl
24
24
AC_DEFUN([APU_CHECK_DBD], [
25
25
  apu_have_pgsql=0
26
26
 
27
 
  AC_ARG_WITH([pgsql], [
28
 
  --with-pgsql=DIR          specify PostgreSQL location
29
 
  ], [
 
27
  AC_ARG_WITH([pgsql],
 
28
    APR_HELP_STRING([--with-pgsql=DIR], [specify PostgreSQL location]),
 
29
  [
30
30
    apu_have_pgsql=0
31
31
    if test "$withval" = "yes"; then
32
32
      AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
78
78
AC_DEFUN([APU_CHECK_DBD_MYSQL], [
79
79
  apu_have_mysql=0
80
80
 
81
 
  AC_CHECK_FILES([dbd/apr_dbd_mysql.c],[
82
 
    AC_ARG_WITH([mysql], [
83
 
    --with-mysql=DIR          **** SEE INSTALL.MySQL ****
84
 
    ], [
85
 
      apu_have_mysql=0
86
 
      if test "$withval" = "yes"; then
87
 
        old_cppflags="$CPPFLAGS"
88
 
        old_ldflags="$LDFLAGS"
89
 
 
90
 
        AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
91
 
        if test "x$MYSQL_CONFIG" != 'x'; then
92
 
          mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
93
 
          mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
94
 
 
95
 
          APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
96
 
          APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
97
 
        fi
98
 
 
99
 
        AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
100
 
        if test "$apu_have_mysql" = "0"; then
101
 
          AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
102
 
        else
103
 
          if test "x$MYSQL_CONFIG" != 'x'; then
104
 
            APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
105
 
            APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
106
 
          fi
107
 
        fi
108
 
 
109
 
        CPPFLAGS="$old_cppflags"
110
 
        LDFLAGS="$old_ldflags"
111
 
      elif test "$withval" = "no"; then
112
 
        apu_have_mysql=0
113
 
      else
114
 
        old_cppflags="$CPPFLAGS"
115
 
        old_ldflags="$LDFLAGS"
116
 
 
117
 
        AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
118
 
        if test "x$MYSQL_CONFIG" != 'x'; then
119
 
          mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
120
 
          mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
121
 
        else
122
 
          mysql_CPPFLAGS="-I$withval/include"
123
 
          mysql_LDFLAGS="-L$withval/lib "
124
 
        fi
125
 
 
126
 
        APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
127
 
        APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
128
 
 
129
 
        AC_MSG_NOTICE(checking for mysql in $withval)
130
 
        AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
131
 
        if test "$apu_have_mysql" != "0"; then
132
 
          APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
133
 
          APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
134
 
        fi
135
 
 
136
 
        if test "$apu_have_mysql" != "1"; then
137
 
          AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
138
 
          if test "$apu_have_mysql" != "0"; then
139
 
            APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
140
 
            APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
141
 
          fi
142
 
        fi
143
 
 
144
 
        CPPFLAGS="$old_cppflags"
145
 
        LDFLAGS="$old_ldflags"
146
 
      fi
147
 
    ], [
148
 
      apu_have_mysql=0
149
 
 
 
81
  AC_ARG_WITH([mysql],
 
82
    APR_HELP_STRING([--with-mysql=DIR], [specify MySQL location (disabled by default)]),
 
83
  [
 
84
    apu_have_mysql=0
 
85
    if test "$withval" = "yes"; then
150
86
      old_cppflags="$CPPFLAGS"
151
87
      old_ldflags="$LDFLAGS"
152
88
 
160
96
      fi
161
97
 
162
98
      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
163
 
 
 
99
      if test "$apu_have_mysql" = "0"; then
 
100
        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
 
101
      else
 
102
        if test "x$MYSQL_CONFIG" != 'x'; then
 
103
          APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
 
104
          APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
 
105
        fi
 
106
      fi
 
107
 
 
108
      CPPFLAGS="$old_cppflags"
 
109
      LDFLAGS="$old_ldflags"
 
110
    elif test "$withval" = "no"; then
 
111
      apu_have_mysql=0
 
112
    else
 
113
      old_cppflags="$CPPFLAGS"
 
114
      old_ldflags="$LDFLAGS"
 
115
 
 
116
      AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
 
117
      if test "x$MYSQL_CONFIG" != 'x'; then
 
118
        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
 
119
        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
 
120
      else
 
121
        mysql_CPPFLAGS="-I$withval/include"
 
122
        mysql_LDFLAGS="-L$withval/lib "
 
123
      fi
 
124
 
 
125
      APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
 
126
      APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
 
127
 
 
128
      AC_MSG_NOTICE(checking for mysql in $withval)
 
129
      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
164
130
      if test "$apu_have_mysql" != "0"; then
165
 
        if test "x$MYSQL_CONFIG" != 'x'; then
166
 
          APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
167
 
          APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
 
131
        APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
 
132
        APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
 
133
      fi
 
134
 
 
135
      if test "$apu_have_mysql" != "1"; then
 
136
        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
 
137
        if test "$apu_have_mysql" != "0"; then
 
138
          APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
 
139
          APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
168
140
        fi
169
141
      fi
170
142
 
171
143
      CPPFLAGS="$old_cppflags"
172
144
      LDFLAGS="$old_ldflags"
173
 
    ])
 
145
    fi
174
146
  ])
175
147
 
176
148
  AC_SUBST(apu_have_mysql)
186
158
AC_DEFUN([APU_CHECK_DBD_SQLITE3], [
187
159
  apu_have_sqlite3=0
188
160
 
189
 
  AC_ARG_WITH([sqlite3], [
190
 
  --with-sqlite3=DIR         
191
 
  ], [
 
161
  AC_ARG_WITH([sqlite3],
 
162
    APR_HELP_STRING([--with-sqlite3=DIR], [enable sqlite3 DBD driver]),
 
163
  [
192
164
    apu_have_sqlite3=0
193
165
    if test "$withval" = "yes"; then
194
166
      AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
232
204
AC_DEFUN([APU_CHECK_DBD_SQLITE2], [
233
205
  apu_have_sqlite2=0
234
206
 
235
 
  AC_ARG_WITH([sqlite2], [
236
 
  --with-sqlite2=DIR         
237
 
  ], [
 
207
  AC_ARG_WITH([sqlite2],
 
208
    APR_HELP_STRING([--with-sqlite2=DIR], [enable sqlite2 DBD driver]),        
 
209
  [
238
210
    apu_have_sqlite2=0
239
211
    if test "$withval" = "yes"; then
240
212
      AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))