|
|
| version 1.66, 2025/01/10 19:38:34 | version 1.73, 2025/11/30 19:00:26 |
|---|---|
| Line 1 | Line 1 |
| dnl Autoconf initialization | dnl Autoconf initialization |
| AC_PREREQ(2.59) | AC_PREREQ(2.59) |
| AC_INIT(parser, 3.5.1) | AC_INIT(parser, 3.5.2b) |
| AC_CONFIG_SRCDIR(README) | AC_CONFIG_SRCDIR(README) |
| AC_CONFIG_MACRO_DIRS(src/lib/ltdl/m4) | |
| dnl Automake Initialization | dnl Automake Initialization |
| Line 45 AC_PROG_CXX | Line 46 AC_PROG_CXX |
| AC_PROG_CC | AC_PROG_CC |
| dnl most tests should be compiled with C compiler [especially qsort test] | dnl most tests should be compiled with C compiler [especially qsort test] |
| AC_LANG_C | AC_LANG([C]) |
| dnl Dll extension | dnl Dll extension |
| Line 161 if test -z "$GC_OK"; then | Line 162 if test -z "$GC_OK"; then |
| AC_MSG_CHECKING(for libgc) | AC_MSG_CHECKING(for libgc) |
| SAVE_LIBS=$LIBS | SAVE_LIBS=$LIBS |
| LIBS="$LIBS $GC_LIBS" | LIBS="$LIBS $GC_LIBS" |
| AC_TRY_LINK([ extern int GC_dont_gc; ],[ GC_dont_gc=0; ], | PA_TRY_LINK([ extern int GC_dont_gc; ],[ GC_dont_gc=0; ], |
| AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| , | , |
| AC_MSG_RESULT(no) | AC_MSG_RESULT(no) |
| Line 209 if test -z "$PCRE_OK"; then | Line 210 if test -z "$PCRE_OK"; then |
| AC_MSG_CHECKING(for pcre2) | AC_MSG_CHECKING(for pcre2) |
| SAVE_LIBS=$LIBS | SAVE_LIBS=$LIBS |
| LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES -lpcre2-8" | LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES -lpcre2-8" |
| AC_TRY_LINK([ #define PCRE2_CODE_UNIT_WIDTH 8 | PA_TRY_LINK([ #define PCRE2_CODE_UNIT_WIDTH 8 |
| #include <pcre2.h> ],[ void *v=pcre2_general_context_create(0,0,0); ], | #include <pcre2.h> ],[ void *v=pcre2_general_context_create(0,0,0); ], |
| AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| PCRE_LIBS="$PCRE_LIBS -lpcre2-8" | PCRE_LIBS="$PCRE_LIBS -lpcre2-8" |
| Line 226 if test -z "$PCRE_OK"; then | Line 227 if test -z "$PCRE_OK"; then |
| PCRE_LIBS="$PCRE_LIBS -lpcre" | PCRE_LIBS="$PCRE_LIBS -lpcre" |
| SAVE_LIBS=$LIBS | SAVE_LIBS=$LIBS |
| LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES" | LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES" |
| AC_TRY_LINK([ #include <pcre.h> ],[ const char *v=pcre_version(); ], | PA_TRY_LINK([ #include <pcre.h> ],[ const char *v=pcre_version(); ], |
| AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| , | , |
| AC_MSG_RESULT(no) | AC_MSG_RESULT(no) |
| Line 269 AC_ARG_WITH(xml,[ --with-xml=DIR | Line 270 AC_ARG_WITH(xml,[ --with-xml=DIR |
| AC_MSG_CHECKING(for xml) | AC_MSG_CHECKING(for xml) |
| SAVE_LIBS=$LIBS | SAVE_LIBS=$LIBS |
| LIBS="$LIBS $XML_LIBS $XML_INCLUDES" | LIBS="$LIBS $XML_LIBS $XML_INCLUDES" |
| AC_TRY_LINK([ #include <libxslt/xslt.h> ],[ const char *v=xsltEngineVersion; ], | PA_TRY_LINK([ #include <libxslt/xslt.h> ],[ const char *v=xsltEngineVersion; ], |
| AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| , | , |
| AC_MSG_RESULT(no) | AC_MSG_RESULT(no) |
| Line 324 AC_ARG_WITH(mailreceive,[ --with-mailre | Line 325 AC_ARG_WITH(mailreceive,[ --with-mailre |
| AC_MSG_CHECKING(for mime) | AC_MSG_CHECKING(for mime) |
| SAVE_LIBS=$LIBS | SAVE_LIBS=$LIBS |
| LIBS="$LIBS $MIME_LIBS $MIME_INCLUDES" | LIBS="$LIBS $MIME_LIBS $MIME_INCLUDES" |
| AC_TRY_LINK([ #include <gmime/gmime.h> ],[ guint v=gmime_major_version; ], | PA_TRY_LINK([ #include <gmime/gmime.h> ],[ guint v=gmime_major_version; ], |
| AC_MSG_RESULT(yes) | AC_MSG_RESULT(yes) |
| , | , |
| AC_MSG_RESULT(no) | AC_MSG_RESULT(no) |
| Line 343 AC_SUBST(MIME_INCLUDES) | Line 344 AC_SUBST(MIME_INCLUDES) |
| AC_SUBST(MIME_LIBS) | AC_SUBST(MIME_LIBS) |
| dnl RabbitMQ library argument | |
| AC_ARG_WITH(amqp,[ --with-amqp=DIR DIR is the directory where | |
| RabbitMQ C library (librabbitmq) is installed],[ | |
| AMQP=$withval | |
| if test -z "$AMQP" -o "$AMQP" = "yes"; then | |
| AMQP_INCLUDES="" | |
| AMQP_LIBS="-lrabbitmq" | |
| AC_MSG_WARN([--with-amqp value was not specified, hoping linker would find it]) | |
| else | |
| AMQP_INCLUDES="-I$AMQP/include" | |
| if test -f $AMQP/lib/librabbitmq.la; then | |
| AMQP_LIBS="$AMQP/lib/librabbitmq.la" | |
| else | |
| AMQP_LIBS="-L$AMQP/lib -lrabbitmq" | |
| fi | |
| fi | |
| AC_MSG_CHECKING(for librabbitmq) | |
| SAVE_LIBS=$LIBS | |
| LIBS="$LIBS $AMQP_LIBS $AMQP_INCLUDES" | |
| PA_TRY_LINK([ #include <amqp.h> ],[ amqp_connection_state_t c = 0; ], | |
| AC_MSG_RESULT(yes) | |
| , | |
| AC_MSG_RESULT(no) | |
| if test -z "$AMQP"; then | |
| AC_MSG_ERROR(please specify path to librabbitmq: --with-amqp=DIR) | |
| else | |
| AC_MSG_ERROR($AMQP does not seem to be valid librabbitmq installation directory) | |
| fi | |
| ) | |
| LIBS=$SAVE_LIBS | |
| AC_DEFINE(WITH_AMQP,,has amqp) | |
| ]) | |
| AC_SUBST(AMQP_INCLUDES) | |
| AC_SUBST(AMQP_LIBS) | |
| dnl Sendmail argument | dnl Sendmail argument |
| AC_ARG_WITH(sendmail,[ \"--with-sendmail=COMMAND\" forces this command to send mail. | AC_ARG_WITH(sendmail,[ \"--with-sendmail=COMMAND\" forces this command to send mail. |
| example: \"--with-sendmail=/usr/sbin/sendmail -t\" | example: \"--with-sendmail=/usr/sbin/sendmail -t\" |
| Line 401 AC_TYPE_UINT8_T | Line 440 AC_TYPE_UINT8_T |
| AC_TYPE_UINT16_T | AC_TYPE_UINT16_T |
| AC_TYPE_UINT32_T | AC_TYPE_UINT32_T |
| AC_TYPE_UINT64_T | AC_TYPE_UINT64_T |
| AC_TYPE_INT64_T | |
| AC_STRUCT_DIRENT_D_TYPE | AC_STRUCT_DIRENT_D_TYPE |
| AC_SYS_LARGEFILE | AC_SYS_LARGEFILE |
| dnl Checks for C header files | dnl Checks for C header files |
| AC_HEADER_STDC | |
| AC_HEADER_TIME | |
| AC_CHECK_HEADERS(stdio.h sys/types.h sys/stat.h stdlib.h stddef.h memory.h string.h strings.h inttypes.h stdint.h unistd.h) | AC_CHECK_HEADERS(stdio.h sys/types.h sys/stat.h stdlib.h stddef.h memory.h string.h strings.h inttypes.h stdint.h unistd.h) |
| AC_CHECK_HEADERS(assert.h limits.h ctype.h math.h process.h stdarg.h setjmp.h signal.h pthread.h) | AC_CHECK_HEADERS(time.h sys/time.h assert.h limits.h ctype.h math.h process.h stdarg.h setjmp.h signal.h pthread.h) |
| AC_CHECK_HEADERS(errno.h dirent.h fcntl.h io.h sys/file.h sys/locking.h sys/select.h sys/resource.h sys/wait.h) | AC_CHECK_HEADERS(errno.h dirent.h fcntl.h io.h sys/file.h sys/locking.h sys/select.h sys/resource.h sys/wait.h) |
| AC_CHECK_HEADERS(sys/socket.h netinet/in.h arpa/inet.h netdb.h) | AC_CHECK_HEADERS(sys/socket.h netinet/in.h arpa/inet.h netdb.h) |
| Line 467 dnl For build-in date implementation we | Line 504 dnl For build-in date implementation we |
| AC_LANG_PUSH(C++) | AC_LANG_PUSH(C++) |
| AC_MSG_CHECKING(for timezone variable) | AC_MSG_CHECKING(for timezone variable) |
| AC_TRY_COMPILE([#include <time.h>], [int test=timezone;], AC_DEFINE(HAVE_TIMEZONE) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) | PA_TRY_COMPILE([#include <time.h>], [int test=timezone;], AC_DEFINE(HAVE_TIMEZONE) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) |
| AC_LANG_POP | AC_LANG_POP |
| AC_MSG_CHECKING(for tm_gmtoff in struct tm) | AC_MSG_CHECKING(for tm_gmtoff in struct tm) |
| AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) | PA_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) |
| AC_MSG_CHECKING(for tm_tzadj in struct tm) | AC_MSG_CHECKING(for tm_tzadj in struct tm) |
| AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj=0;], AC_DEFINE(HAVE_TM_TZADJ) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) | PA_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj=0;], AC_DEFINE(HAVE_TM_TZADJ) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) |
| AC_MSG_CHECKING(for gettid) | AC_MSG_CHECKING(for gettid) |
| AC_TRY_COMPILE([ | PA_TRY_COMPILE([ |
| #include <sys/types.h> | #include <sys/types.h> |
| #include <sys/syscall.h> | #include <sys/syscall.h> |
| ], [uint tid=syscall(__NR_gettid);], AC_DEFINE(HAVE_GETTID) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) | ], [uint tid=syscall(__NR_gettid);], AC_DEFINE(HAVE_GETTID) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) |
| AC_MSG_CHECKING(for TLS) | AC_MSG_CHECKING(for TLS) |
| AC_TRY_COMPILE([__thread int i=0;], [], AC_DEFINE(HAVE_TLS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) | PA_TRY_COMPILE([__thread int i=0;], [], AC_DEFINE(HAVE_TLS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) |
| AC_MSG_CHECKING(for 0..9999 year date range support) | AC_MSG_CHECKING(for 0..9999 year date range support) |
| AC_TRY_RUN([ | AC_RUN_IFELSE([AC_LANG_SOURCE([ |
| #include <string.h> | #include <string.h> |
| #include <time.h> | #include <time.h> |
| Line 501 int main() { | Line 538 int main() { |
| tmH.tm_mday=31; | tmH.tm_mday=31; |
| return mktime(&tmL)==-1 || mktime(&tmH)==-1; | return mktime(&tmL)==-1 || mktime(&tmH)==-1; |
| } | } |
| ], AC_DEFINE(PA_DATE64) AC_MSG_RESULT(yes), AC_MSG_RESULT(no), AC_MSG_RESULT(no)) | ])], AC_DEFINE(PA_DATE64) AC_MSG_RESULT(yes), AC_MSG_RESULT(no), AC_MSG_RESULT(no)) |
| dnl Output header and makefiles | dnl Output header and makefiles |
| AH_TEMPLATE([HAVE_TIMEZONE],[Define if you have timezone external variable in <time.h>]) | AH_TEMPLATE([HAVE_TIMEZONE],[Define if you have timezone external variable in <time.h>]) |
| Line 511 AH_TEMPLATE([HAVE_GETTID],[Define if you | Line 548 AH_TEMPLATE([HAVE_GETTID],[Define if you |
| AH_TEMPLATE([HAVE_TLS],[Define if you have Thread-Local Storage]) | AH_TEMPLATE([HAVE_TLS],[Define if you have Thread-Local Storage]) |
| AH_TEMPLATE([PA_DATE64],[Define if you have 0..9999 year date range support]) | AH_TEMPLATE([PA_DATE64],[Define if you have 0..9999 year date range support]) |
| AM_CONFIG_HEADER(src/include/pa_config_auto.h) | AC_CONFIG_HEADERS(src/include/pa_config_auto.h) |
| AC_OUTPUT( | AC_CONFIG_FILES([ |
| Makefile | Makefile |
| src/Makefile | src/Makefile |
| src/types/Makefile | src/types/Makefile |
| src/classes/Makefile | src/classes/Makefile |
| src/include/Makefile | src/include/Makefile |
| src/main/Makefile | src/main/Makefile |
| src/sql/Makefile | src/sql/Makefile |
| src/lib/Makefile | src/lib/Makefile |
| src/lib/gd/Makefile | src/lib/gd/Makefile |
| src/lib/smtp/Makefile | src/lib/smtp/Makefile |
| src/lib/gc/Makefile | src/lib/gc/Makefile |
| src/lib/gc/include/Makefile | src/lib/gc/include/Makefile |
| src/lib/pcre/Makefile | src/lib/pcre/Makefile |
| src/lib/cord/Makefile | src/lib/cord/Makefile |
| src/lib/cord/include/Makefile | src/lib/cord/include/Makefile |
| src/lib/cord/include/private/Makefile | src/lib/cord/include/private/Makefile |
| Line 543 AC_OUTPUT( | Line 580 AC_OUTPUT( |
| src/targets/isapi/Makefile | src/targets/isapi/Makefile |
| etc/Makefile | etc/Makefile |
| etc/parser3.charsets/Makefile | etc/parser3.charsets/Makefile |
| etc/auto.p) | etc/auto.p]) |
| AC_OUTPUT |