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

« back to all changes in this revision

Viewing changes to srclib/apr-util/build/apu-iconv.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 2002-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
35
35
 
36
36
apu_iconv_dir="unknown"
37
37
have_apr_iconv="0"
 
38
want_iconv="1"
38
39
AC_ARG_WITH(iconv,[  --with-iconv[=DIR]        path to iconv installation],
39
40
  [ apu_iconv_dir="$withval"
40
 
    if test "$apu_iconv_dir" != "yes"; then
41
 
      APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
42
 
      APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
43
 
    fi
44
 
    if test -f "$apu_iconv_dir/include/api_version.h"; then
45
 
      have_apr_iconv="1"
 
41
    if test "$apu_iconv_dir" = "no"; then
 
42
      have_apr_iconv="0"
46
43
      have_iconv="0"
47
 
      APR_REMOVEFROM(LIBS,[-lapriconv])
48
 
      AC_MSG_RESULT("Using apr-iconv")
 
44
      want_iconv="0"
 
45
    elif test "$apu_iconv_dir" != "yes"; then
 
46
      if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
 
47
        have_apr_iconv="1"
 
48
        have_iconv="0"
 
49
        APR_ADDTO(APRUTIL_INCLUDES,[-I$apu_iconv_dir/include/apr-1])
 
50
        APR_ADDTO(APRUTIL_LIBS,[$apu_iconv_dir/lib/libapriconv-1.la])
 
51
        AC_MSG_RESULT(using apr-iconv)
 
52
      elif test -f "$apu_iconv_dir/include/iconv.h"; then
 
53
        have_apr_iconv="0"
 
54
        have_iconv="1"
 
55
        APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
 
56
        APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
 
57
      fi
49
58
    fi
50
59
  ])
51
60
 
52
 
if test "$have_apr_iconv" != "1"; then
 
61
if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
53
62
  AC_CHECK_HEADER(iconv.h, [
54
63
    APU_TRY_ICONV([ have_iconv="1" ], [
55
64
 
67
76
  ], [ have_iconv="0" ])
68
77
fi
69
78
 
70
 
if test "$apu_iconv_dir" != "unknown"; then
 
79
if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
71
80
  if test "$have_iconv" != "1"; then
72
81
    if test "$have_apr_iconv" != "1"; then 
73
82
      AC_MSG_ERROR([iconv support requested, but not found])