Child: [243bea] (diff)

Download this file

patch-configure.diff    172 lines (159 with data), 5.0 kB

  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
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
--- configure.orig 2011-06-06 10:05:13.000000000 +0200
+++ configure 2011-06-06 10:04:15.000000000 +0200
@@ -4341,12 +4341,8 @@
done
-##### Look for iconv. We look for libiconv in ${libdir}, /opt/local/lib,
-##### /usr/local/lib then in libc (Linux, solaris). Note that there is no
-##### way to find libiconv in /usr/local if one exists in ${libdir} (can't
-##### do because the link will always succeed in this case so that if we
-##### put /usr/local/lib in front in this case, we may end up with using it
-##### even if no libiconv in there. We'd need a --with-libiconv= option
+##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
+##### libiconv. We'd need a --with-libiconv= option
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4355,112 +4351,70 @@
LIBICONV=""
S_LDFLAGS=$LDFLAGS
-
+S_CPPFLAGS=$CPPFLAGS
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
+ CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
+
LDFLAGS="$S_LDFLAGS -L$dir"
- unset ac_cv_lib_iconv_iconv_open
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
-$as_echo_n "checking for iconv_open in -liconv... " >&6; }
-if ${ac_cv_lib_iconv_iconv_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char iconv_open ();
+#include <stdlib.h>
+#include <iconv.h>
int
main ()
{
-return iconv_open ();
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_iconv_iconv_open=yes
-else
- ac_cv_lib_iconv_iconv_open=no
+ LIBICONV="-L$dir";INCICONV=-I$dir/../include
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
-$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
-if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
- LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
-fi
-
if test A"$LIBICONV" != A ; then
break
fi
-done
-if test A"$LIBICONV" = A; then
- dir=${libdir}
- LDFLAGS="$S_LDFLAGS -L$dir"
- unset ac_cv_lib_iconv_iconv_open
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -lc" >&5
-$as_echo_n "checking for iconv_open in -lc... " >&6; }
-if ${ac_cv_lib_c_iconv_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LDFLAGS="$S_LDFLAGS -L$dir -liconv"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char iconv_open ();
+#include <stdlib.h>
+#include <iconv.h>
int
main ()
{
-return iconv_open ();
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_c_iconv_open=yes
-else
- ac_cv_lib_c_iconv_open=no
+ LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_open" >&5
-$as_echo "$ac_cv_lib_c_iconv_open" >&6; }
-if test "x$ac_cv_lib_c_iconv_open" = xyes; then :
- LIBICONV=NONE;INCICONV=-I/usr/include
-fi
+ if test A"$LIBICONV" != A ; then
+ break
+ fi
-fi
+done
LDFLAGS=$S_LDFLAGS
+CPPFLAGS=$S_CPPFLAGS
+
if test A"$LIBICONV" = A ; then
as_fn_error $? "Cannot find iconv_open anywhere. Please install iconv" "$LINENO" 5
exit 1
fi
-if test A"$LIBICONV" = ANONE ; then
- LIBICONV=""
-fi
-#echo LIBICONV $LIBICONV
-#echo INCICONV $INCICONV
+echo LIBICONV $LIBICONV
+echo INCICONV $INCICONV
CPPFLAGS="$CPPFLAGS $INCICONV"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
@@ -4494,6 +4448,7 @@
fi
+############# Putenv
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of string parameter to putenv" >&5
$as_echo_n "checking for type of string parameter to putenv... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4523,6 +4478,7 @@
fi
+
#### Look for Xapian
# Extract the first word of "xapian-config", so it can be a program name with args.
set dummy xapian-config; ac_word=$2