Switch to unified view

a/src/configure.ac b/src/configure.ac
...
...
6
AC_PROG_CXX
6
AC_PROG_CXX
7
if test C$CXX = C ; then
7
if test C$CXX = C ; then
8
   AC_MSG_ERROR([C++ compiler needed. Please install one (ie: gnu g++)])
8
   AC_MSG_ERROR([C++ compiler needed. Please install one (ie: gnu g++)])
9
fi
9
fi
10
10
11
sys=`uname | tr / _`
11
sys=`uname | tr / _ | awk -F_ '{print $1}'`
12
12
13
if test ! -f mk/$sys ; then
13
if test ! -f mk/$sys ; then
14
   AC_MSG_NOTICE([
14
   AC_MSG_NOTICE([
15
    No system configuration file found in mk/ for uname = '$sys'. 
15
    No system configuration file found in mk/ for uname = '$sys'. 
16
    Trying with Default file. 
16
    Trying with Default file. 
...
...
249
249
250
##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
250
##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
251
##### libiconv. We'd need a --with-libiconv= option
251
##### libiconv. We'd need a --with-libiconv= option
252
AC_LANG(C++)
252
AC_LANG(C++)
253
LIBICONV=""
253
LIBICONV=""
254
S_LDFLAGS=$LDFLAGS
254
S_LIBS=$LIBS
255
S_CPPFLAGS=$CPPFLAGS
255
S_CPPFLAGS=$CPPFLAGS
256
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
256
for dir in ${libdir} /opt/local/lib /usr/local/lib;do
257
  CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
257
  CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
258
258
259
  LDFLAGS="$S_LDFLAGS -L$dir"
259
  LIBS="$S_LIBS -L$dir"
260
  AC_TRY_LINK([#include <stdlib.h>
260
  AC_TRY_LINK([#include <stdlib.h>
261
#include <iconv.h>],
261
#include <iconv.h>],
262
      [iconv_t cd = iconv_open("","");
262
      [iconv_t cd = iconv_open("","");
263
       iconv(cd,NULL,NULL,NULL,NULL);
263
       iconv(cd,NULL,NULL,NULL,NULL);
264
       iconv_close(cd);],
264
       iconv_close(cd);],
265
      LIBICONV="-L$dir";INCICONV=-I$dir/../include)
265
      LIBICONV="-L$dir";INCICONV=-I$dir/../include)
266
  if test A"$LIBICONV" != A ; then
266
  if test A"$LIBICONV" != A ; then
267
     break
267
     break
268
  fi
268
  fi
269
269
270
  LDFLAGS="$S_LDFLAGS -L$dir -liconv"
270
  LIBS="$S_LIBS -L$dir -liconv"
271
  AC_TRY_LINK([#include <stdlib.h>
271
  AC_TRY_LINK([#include <stdlib.h>
272
#include <iconv.h>],
272
#include <iconv.h>],
273
      [iconv_t cd = iconv_open("","");
273
      [iconv_t cd = iconv_open("","");
274
       iconv(cd,NULL,NULL,NULL,NULL);
274
       iconv(cd,NULL,NULL,NULL,NULL);
275
       iconv_close(cd);],
275
       iconv_close(cd);],
...
...
278
     break
278
     break
279
  fi
279
  fi
280
280
281
done
281
done
282
282
283
LDFLAGS=$S_LDFLAGS
283
LIBS=$S_LIBS
284
CPPFLAGS=$S_CPPFLAGS
284
CPPFLAGS=$S_CPPFLAGS
285
285
286
if test A"$LIBICONV" = A ; then
286
if test A"$LIBICONV" = A ; then
287
   AC_MSG_ERROR([Cannot find iconv_open anywhere. Please install iconv])
287
   AC_MSG_ERROR([Cannot find iconv_open anywhere. Please install iconv])
288
   exit 1
288
   exit 1
...
...
313
if test X$rcl_putenv_string_const = X1 ; then
313
if test X$rcl_putenv_string_const = X1 ; then
314
  AC_DEFINE(PUTENV_ARG_CONST, 1, [putenv parameter is const])
314
  AC_DEFINE(PUTENV_ARG_CONST, 1, [putenv parameter is const])
315
fi
315
fi
316
316
317
317
318
#### Look for Xapian
318
#### Look for Xapian. Done in a strange way to work around autoconf
319
# cache
320
XAPIAN_CONFIG=no
321
if test "$XAPIAN_CONFIG" = "no"; then 
319
AC_PATH_PROG(XAPIAN_CONFIG, xapian-config, no)
322
    AC_PATH_PROG(XAPIAN_CONFIG0, [xapian-config], no)
323
    XAPIAN_CONFIG=$XAPIAN_CONFIG0
324
fi
325
if test "$XAPIAN_CONFIG" = "no"; then 
326
   AC_PATH_PROG(XAPIAN_CONFIG1, [xapian-config-1.3], no)
327
   XAPIAN_CONFIG=$XAPIAN_CONFIG1
328
fi
329
if test "$XAPIAN_CONFIG" = "no"; then 
330
   AC_PATH_PROG(XAPIAN_CONFIG2, [xapian-config-1.1], no)
331
   XAPIAN_CONFIG=$XAPIAN_CONFIG2
332
fi
333
320
if test "$XAPIAN_CONFIG" = "no" ; then
334
if test "$XAPIAN_CONFIG" = "no" ; then
321
   AC_MSG_ERROR([Cannot find xapian-config command in $PATH. Is
335
   AC_MSG_ERROR([Cannot find xapian-config command in $PATH. Is
322
xapian-core installed ?])
336
xapian-core installed ?])
323
   exit 1
337
   exit 1
324
fi
338
fi