/[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 97 by ph10, Mon Mar 5 12:36:47 2007 UTC revision 155 by ph10, Tue Apr 24 13:36:11 2007 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
2    
3    dnl NOTE FOR MAINTAINERS: Do not use major or minor version numbers with
4    dnl leading zeros, because they may be treated as octal constants. The
5    dnl PCRE_PRERELEASE feature is for identifying release candidates. It might
6    dnl be defined as -RC2, for example. For real releases, it should be defined
7    dnl empty.
8    
9  m4_define(pcre_major, [7])  m4_define(pcre_major, [7])
10  m4_define(pcre_minor, [1])  m4_define(pcre_minor, [1])
11  m4_define(pcre_prerelease, [-RC0])  m4_define(pcre_prerelease, [])
12  m4_define(pcre_date, [2006-12-18])  m4_define(pcre_date, [2007-04-24])
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 20  AC_PROG_CXX Line 26  AC_PROG_CXX
26  AC_PROG_INSTALL  AC_PROG_INSTALL
27  AC_LIBTOOL_WIN32_DLL  AC_LIBTOOL_WIN32_DLL
28  AC_PROG_LIBTOOL  AC_PROG_LIBTOOL
29    AC_PROG_LN_S
30    
31  PCRE_MAJOR="pcre_major"  PCRE_MAJOR="pcre_major"
32  PCRE_MINOR="pcre_minor"  PCRE_MINOR="pcre_minor"
# Line 43  AC_ARG_ENABLE(cpp, Line 50  AC_ARG_ENABLE(cpp,
50                               [disable C++ support]),                               [disable C++ support]),
51                , enable_cpp=yes)                , enable_cpp=yes)
52    
53    # Handle --enable-rebuild-chartables
54    AC_ARG_ENABLE(rebuild-chartables,
55                  AS_HELP_STRING([--enable-rebuild-chartables],
56                                 [rebuild character tables in current locale]),
57                  , enable_rebuild_chartables=no)
58    
59  # Handle --enable-utf8 (disabled by default)  # Handle --enable-utf8 (disabled by default)
60  AC_ARG_ENABLE(utf8,  AC_ARG_ENABLE(utf8,
61                AS_HELP_STRING([--enable-utf8],                AS_HELP_STRING([--enable-utf8],
# Line 58  AC_ARG_ENABLE(unicode-properties, Line 71  AC_ARG_ENABLE(unicode-properties,
71  # Handle --enable-newline=NL  # Handle --enable-newline=NL
72  dnl AC_ARG_ENABLE(newline,  dnl AC_ARG_ENABLE(newline,
73  dnl               AS_HELP_STRING([--enable-newline=NL],  dnl               AS_HELP_STRING([--enable-newline=NL],
74  dnl                              [use NL as newline (lf, cr, crlf, any; default=lf)]),  dnl                              [use NL as newline (lf, cr, crlf, anycrlf, any; default=lf)]),
75  dnl               , enable_newline=lf)  dnl               , enable_newline=lf)
76    
77  # Separate newline options  # Separate newline options
# Line 75  AC_ARG_ENABLE(newline-is-crlf, Line 88  AC_ARG_ENABLE(newline-is-crlf,
88                AS_HELP_STRING([--enable-newline-is-crlf],                AS_HELP_STRING([--enable-newline-is-crlf],
89                               [use CRLF as newline sequence]),                               [use CRLF as newline sequence]),
90                ac_pcre_newline=crlf)                ac_pcre_newline=crlf)
91    AC_ARG_ENABLE(newline-is-anycrlf,
92                  AS_HELP_STRING([--enable-newline-is-anycrlf],
93                                 [use CR, LF, or CRLF as newline sequence]),
94                  ac_pcre_newline=anycrlf)
95  AC_ARG_ENABLE(newline-is-any,  AC_ARG_ENABLE(newline-is-any,
96                AS_HELP_STRING([--enable-newline-is-any],                AS_HELP_STRING([--enable-newline-is-any],
97                               [use any valid Unicode newline sequence]),                               [use any valid Unicode newline sequence]),
# Line 84  enable_newline="$ac_pcre_newline" Line 101  enable_newline="$ac_pcre_newline"
101  # Handle --enable-ebcdic  # Handle --enable-ebcdic
102  AC_ARG_ENABLE(ebcdic,  AC_ARG_ENABLE(ebcdic,
103                AS_HELP_STRING([--enable-ebcdic],                AS_HELP_STRING([--enable-ebcdic],
104                               [assume EBCDIC coding rather than ASCII]),                               [assume EBCDIC coding rather than ASCII (implies --enable-rebuild-chartables)]),
105                , enable_ebcdic=no)                , enable_ebcdic=no)
106    
107  # Handle --disable-stack-for-recursion  # Handle --disable-stack-for-recursion
# Line 141  then Line 158  then
158    enable_utf8=no    enable_utf8=no
159  fi  fi
160    
161    # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
162    #
163    if test "x$enable_ebcdic" = "xyes"
164    then
165      enable_rebuild_chartables=yes
166    fi
167    
168  # Convert the newline identifier into the appropriate integer value.  # Convert the newline identifier into the appropriate integer value.
169  case "$enable_newline" in  case "$enable_newline" in
170    lf)   ac_pcre_newline_value=10   ;;    lf)      ac_pcre_newline_value=10   ;;
171    cr)   ac_pcre_newline_value=13   ;;    cr)      ac_pcre_newline_value=13   ;;
172    crlf) ac_pcre_newline_value=3338 ;;    crlf)    ac_pcre_newline_value=3338 ;;
173    any)  ac_pcre_newline_value=-1   ;;    anycrlf) ac_pcre_newline_value=-2   ;;
174      any)     ac_pcre_newline_value=-1   ;;
175    *)    *)
176    AC_MSG_ERROR([invalid argument \"$enable_newline\" to --enable-newline option])    AC_MSG_ERROR([invalid argument \"$enable_newline\" to --enable-newline option])
177    ;;    ;;
# Line 161  case "$with_link_size" in Line 186  case "$with_link_size" in
186  esac  esac
187    
188  AH_TOP([  AH_TOP([
189  /* On Unix-like systems config.in is converted by "configure" into  /* On Unix-like systems config.h.in is converted by "configure" into config.h.
190  config.h.  Some other environments also support the use of "configure".  Some other environments also support the use of "configure". PCRE is written in
191  PCRE is written in Standard C, but there are a few non-standard things  Standard C, but there are a few non-standard things it can cope with, allowing
192  it can cope with, allowing it to run on SunOS4 and other "close to  it to run on SunOS4 and other "close to standard" systems.
193  standard" systems.  
194    If you are going to build PCRE "by hand" on a system without "configure" you
195  On a non-Unix-like system you should just copy this file into config.h,  should copy the distributed config.h.generic to config.h, and then set up the
196  and set up the macros the way you need them.  You should normally change  macros the way you need them. Alternatively, you can avoid editing by using -D
197  the definitions of HAVE_STRERROR and HAVE_MEMMOVE to 1.  Unfortunately,  on the compiler command line to set the macro values.
198  because of the way autoconf works, these cannot be made the defaults.  
199  If your system has bcopy() and not memmove(), change the definition of  PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
200  HAVE_BCOPY instead of HAVE_MEMMOVE.  If your system has neither bcopy()  HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
201  nor memmove(), leave them both as 0; an emulation function will be  them both to 0; an emulation function will be used. */])
 used. */])  
202    
203  # Checks for header files.  # Checks for header files.
204  AC_HEADER_STDC  AC_HEADER_STDC
# Line 188  then Line 212  then
212  AC_LANG_PUSH(C++)  AC_LANG_PUSH(C++)
213    
214  # We could be more clever here, given we're doing AC_SUBST with this  # We could be more clever here, given we're doing AC_SUBST with this
215  # (eg set a var to be the name of the include file we want).  But we're not  # (eg set a var to be the name of the include file we want). But we're not
216  # so it's easy to change back to 'regular' autoconf vars if we needed to.  # so it's easy to change back to 'regular' autoconf vars if we needed to.
217  AC_CHECK_HEADERS(string, [pcre_have_cpp_headers="1"],  AC_CHECK_HEADERS(string, [pcre_have_cpp_headers="1"],
218                           [pcre_have_cpp_headers="0"])                           [pcre_have_cpp_headers="0"])
# Line 204  AC_SUBST(pcre_have_bits_type_traits) Line 228  AC_SUBST(pcre_have_bits_type_traits)
228    
229  # Conditional compilation  # Conditional compilation
230  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
231    AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
232    
233  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
234    
# Line 246  fi Line 271  fi
271  if test "$enable_stack_for_recursion" = "no"; then  if test "$enable_stack_for_recursion" = "no"; then
272    AC_DEFINE([NO_RECURSE], [], [    AC_DEFINE([NO_RECURSE], [], [
273      PCRE uses recursive function calls to handle backtracking while      PCRE uses recursive function calls to handle backtracking while
274      matching.  This can sometimes be a problem on systems that have      matching. This can sometimes be a problem on systems that have
275      stacks of limited size.  Define NO_RECURSE to get a version that      stacks of limited size. Define NO_RECURSE to get a version that
276      doesn't use recursion in the match() function; instead it creates      doesn't use recursion in the match() function; instead it creates
277      its own stack by steam using pcre_recurse_malloc() to obtain memory      its own stack by steam using pcre_recurse_malloc() to obtain memory
278      from the heap. For more detail, see the comments and other stuff      from the heap. For more detail, see the comments and other stuff
# Line 257  if test "$enable_stack_for_recursion" = Line 282  if test "$enable_stack_for_recursion" =
282  fi  fi
283    
284  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
285    The value of NEWLINE determines the newline character. The default is    The value of NEWLINE determines the newline character sequence. On
286    to leave it up to the compiler, but some sites want to force a    Unix-like systems, "configure" can be used to override the default,
287    particular value.  On Unix-like systems, "configure" can be used to    which is 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF),
288    override this default.])    -1 (ANY), or -2 (ANYCRLF).])
289    
290  AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [  AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [
291    The value of LINK_SIZE determines the number of bytes used to store    The value of LINK_SIZE determines the number of bytes used to store
# Line 284  AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHO Line 309  AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHO
309  AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [  AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [
310    The value of MATCH_LIMIT determines the default number of times the    The value of MATCH_LIMIT determines the default number of times the
311    internal match() function can be called during a single execution of    internal match() function can be called during a single execution of
312    pcre_exec().  There is a runtime interface for setting a different    pcre_exec(). There is a runtime interface for setting a different
313    limit. The limit exists in order to catch runaway regular    limit. The limit exists in order to catch runaway regular
314    expressions that take for ever to determine that they do not match.    expressions that take for ever to determine that they do not match.
315    The default is set very large so that it does not accidentally catch    The default is set very large so that it does not accidentally catch
# Line 299  AC_DEFINE_UNQUOTED([MATCH_LIMIT_RECURSIO Line 324  AC_DEFINE_UNQUOTED([MATCH_LIMIT_RECURSIO
324    NO_RECURSE is defined) that is used. The value of    NO_RECURSE is defined) that is used. The value of
325    MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To    MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To
326    have any useful effect, it must be less than the value of    have any useful effect, it must be less than the value of
327    MATCH_LIMIT. There is a runtime method for setting a different    MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT.
328    limit. On systems that support it, "configure" can be used to    There is a runtime method for setting a different limit. On systems
329    override this default default.])    that support it, "configure" can be used to override the default.])
330    
331  AC_DEFINE([MAX_NAME_SIZE], [32], [  AC_DEFINE([MAX_NAME_SIZE], [32], [
332    This limit is parameterized just in case anybody ever wants to    This limit is parameterized just in case anybody ever wants to
# Line 318  AC_DEFINE([MAX_DUPLENGTH], [30000], [ Line 343  AC_DEFINE([MAX_DUPLENGTH], [30000], [
343    change it. Care must be taken if it is increased, because it guards    change it. Care must be taken if it is increased, because it guards
344    against integer overflow caused by enormously large patterns.])    against integer overflow caused by enormously large patterns.])
345    
346  AH_VERBATIM([PCRE_DATA_SCOPE], [  AH_VERBATIM([PCRE_EXP_DEFN], [
347  /* If you are compiling for a system other than a Unix-like system or  /* If you are compiling for a system other than a Unix-like system or
348     Win32, and it needs some magic to be inserted before the definition     Win32, and it needs some magic to be inserted before the definition
349     of a function that is exported by the library, define this macro to     of a function that is exported by the library, define this macro to
# Line 328  AH_VERBATIM([PCRE_DATA_SCOPE], [ Line 353  AH_VERBATIM([PCRE_DATA_SCOPE], [
353     every exported function that is part of the external API. It does     every exported function that is part of the external API. It does
354     not appear on functions that are "external" in the C sense, but     not appear on functions that are "external" in the C sense, but
355     which are internal to the library. */     which are internal to the library. */
356  #undef PCRE_DATA_SCOPE])  #undef PCRE_EXP_DEFN])
357    
358  if test "$enable_ebcdic" = "yes"; then  if test "$enable_ebcdic" = "yes"; then
359    AC_DEFINE_UNQUOTED([EBCDIC], [], [    AC_DEFINE_UNQUOTED([EBCDIC], [], [
# Line 337  if test "$enable_ebcdic" = "yes"; then Line 362  if test "$enable_ebcdic" = "yes"; then
362      "configure", this can be done via --enable-ebcdic.])      "configure", this can be done via --enable-ebcdic.])
363  fi  fi
364    
 # Here is where pcre specific substs are handled  
 # These 3 are only used by RunTest.in.  
 # TODO: remove once RunTest uses pcretest -C instead.  
 AC_SUBST(LINK_SIZE, $with_link_size)  
 AC_SUBST(UTF8, $enable_utf8)  
 AC_SUBST(UCP, $enable_unicode_properties)  
   
365  # Platform specific issues  # Platform specific issues
366  NO_UNDEFINED=  NO_UNDEFINED=
367  EXPORT_ALL_SYMBOLS=  EXPORT_ALL_SYMBOLS=
# Line 376  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) Line 394  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
394  # Produce these files, in addition to config.h.  # Produce these files, in addition to config.h.
395  AC_CONFIG_FILES(  AC_CONFIG_FILES(
396          Makefile          Makefile
         RunGrepTest  
         RunTest  
397          libpcre.pc          libpcre.pc
398          libpcrecpp.pc          libpcrecpp.pc
399          pcre-config          pcre-config
# Line 387  AC_CONFIG_FILES( Line 403  AC_CONFIG_FILES(
403  )  )
404    
405  # Make the generated script files executable.  # Make the generated script files executable.
406  AC_CONFIG_COMMANDS([script-chmod], [chmod a+x RunTest RunGrepTest pcre-config])  AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre-config])
407    
408    # Make sure that pcre_chartables.c is removed in case the method for
409    # creating it was changed by reconfiguration.
410    AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre_chartables.c])
411    
412  AC_OUTPUT  AC_OUTPUT
413    
# Line 415  $PACKAGE-$VERSION configuration summary: Line 435  $PACKAGE-$VERSION configuration summary:
435      Unicode properties ..... : ${enable_unicode_properties}      Unicode properties ..... : ${enable_unicode_properties}
436      Newline char/sequence .. : ${enable_newline}      Newline char/sequence .. : ${enable_newline}
437      EBCDIC coding .......... : ${enable_ebcdic}      EBCDIC coding .......... : ${enable_ebcdic}
438        Rebuild char tables .... : ${enable_rebuild_chartables}
439      Use stack recursion .... : ${enable_stack_for_recursion}      Use stack recursion .... : ${enable_stack_for_recursion}
440      POSIX mem threshold .... : ${with_posix_malloc_threshold}      POSIX mem threshold .... : ${with_posix_malloc_threshold}
441      Internal link size ..... : ${with_link_size}      Internal link size ..... : ${with_link_size}

Legend:
Removed from v.97  
changed lines
  Added in v.155

  ViewVC Help
Powered by ViewVC 1.1.5