/[pcre]/code/trunk/configure.ac
ViewVC logotype

Diff of /code/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 471 by ph10, Fri Dec 11 15:11:55 2009 UTC revision 478 by ph10, Sun Jan 3 16:05:13 2010 UTC
# Line 9  dnl empty. Line 9  dnl empty.
9  m4_define(pcre_major, [8])  m4_define(pcre_major, [8])
10  m4_define(pcre_minor, [01])  m4_define(pcre_minor, [01])
11  m4_define(pcre_prerelease, [])  m4_define(pcre_prerelease, [])
12  m4_define(pcre_date, [2009-12-11])  m4_define(pcre_date, [2010-01-02])
13    
14  # Libtool shared library interface versions (current:revision:age)  # Libtool shared library interface versions (current:revision:age)
15  m4_define(libpcre_version, [0:1:0])  m4_define(libpcre_version, [0:1:0])
# Line 66  AC_LANG_PUSH(C++) Line 66  AC_LANG_PUSH(C++)
66  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),, CXX=""; CXXCP=""; CXXFLAGS="")  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),, CXX=""; CXXCP=""; CXXFLAGS="")
67  AC_LANG_POP  AC_LANG_POP
68    
69    # Check for a 64-bit integer type
70    AC_TYPE_INT64_T
71    
72  AC_PROG_INSTALL  AC_PROG_INSTALL
73  AC_LIBTOOL_WIN32_DLL  AC_LIBTOOL_WIN32_DLL
74  AC_PROG_LIBTOOL  AC_PROG_LIBTOOL
# Line 365  AC_CHECK_FUNCS(bcopy memmove strerror) Line 368  AC_CHECK_FUNCS(bcopy memmove strerror)
368  AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])  AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
369  AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])  AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
370    
371  # Check for the availability of libbz2  # Check for the availability of libbz2. Originally we just used AC_CHECK_LIB,
372    # as for libz. However, this had the following problem, diagnosed and fixed by
373    # a user:
374    #
375    #   - libbz2 uses the Pascal calling convention (WINAPI) for the functions
376    #     under Win32.
377    #   - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h",
378    #     therefore missing the function definition.
379    #   - The compiler thus generates a "C" signature for the test function.
380    #   - The linker fails to find the "C" function.
381    #   - PCRE fails to configure if asked to do so against libbz2.
382    #
383    # Solution:
384    #
385    #   - Replace the AC_CHECK_LIB test with a custom test.
386    
387  AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])  AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
388  AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])  # Original test
389    # AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
390    #
391    # Custom test follows
392    
393    AC_MSG_CHECKING([for libbz2])
394    OLD_LIBS="$LIBS"
395    LIBS="$LIBS -lbz2"
396    AC_LINK_IFELSE( AC_LANG_PROGRAM([[
397    #ifdef HAVE_BZLIB_H
398    #include <bzlib.h>
399    #endif]],
400    [[return (int)BZ2_bzopen("conftest", "rb");]]),
401    [AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],
402    AC_MSG_RESULT([no]))
403    LIBS="$OLD_LIBS"
404    
405  # Check for the availabiity of libreadline  # Check for the availabiity of libreadline
406    

Legend:
Removed from v.471  
changed lines
  Added in v.478

  ViewVC Help
Powered by ViewVC 1.1.5