1
1
dnl -------------------------------------------------------- -*- autoconf -*-
2
dnl Copyright 2002-2005 The Apache Software Foundation, or its licensors, as
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
9
9
dnl http://www.apache.org/licenses/LICENSE-2.0
36
36
apu_iconv_dir="unknown"
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])
44
if test -f "$apu_iconv_dir/include/api_version.h"; then
41
if test "$apu_iconv_dir" = "no"; then
47
APR_REMOVEFROM(LIBS,[-lapriconv])
48
AC_MSG_RESULT("Using apr-iconv")
45
elif test "$apu_iconv_dir" != "yes"; then
46
if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
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
55
APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
56
APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
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" ], [
67
76
], [ have_iconv="0" ])
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])