pike.git / src / modules / Mysql / configure.in

version» Context lines:

pike.git/src/modules/Mysql/configure.in:1:   # - # $Id: configure.in,v 1.42 2005/02/16 16:53:43 grubba Exp $ + # $Id: configure.in,v 1.43 2006/08/14 14:07:23 grubba Exp $   #   # Configure script for the mysql-module   #   # Henrik Grubbström   #      #   # NOTE:   # Prior to 3.20.0 After 3.20.0   # -------------------------------------------------------------------
pike.git/src/modules/Mysql/configure.in:88:       AC_MSG_RESULT($pike_cv_mysql_include_dir)       if test x$pike_cv_mysql_include_dir = xno; then :; else    echo Adding $pike_cv_mysql_include_dir to the include search path.    CPPFLAGS="${CPPFLAGS} -I$pike_cv_mysql_include_dir"    fi       # Header file    -  AC_CHECK_HEADERS(winsock.h mysql.h mysql/mysql.h errmsg.h mysql/errmsg.h) +  AC_CHECK_HEADERS(winsock.h winsock2.h mysql.h mysql/mysql.h errmsg.h mysql/errmsg.h)    -  +  if test x$ac_cv_header_mysql_h$ac_cv_header_mysql_mysql_h = xnono; then +  # Required headerfile missing. +  PIKE_FEATURE_NODEP(Mysql) +  pike_cv_mysql="no" +  fi +     # Defines within headerfile   define([AC_CHECK_MYSQL_OPTIONS],   [   AC_MSG_CHECKING(for $1)   AC_TRY_COMPILE([   #ifdef HAVE_MYSQL_H   #include <mysql.h>   #else   #ifdef HAVE_MYSQL_MYSQL_H   #include <mysql/mysql.h>
pike.git/src/modules/Mysql/configure.in:112:   ], [   int tmp;   tmp = $1;   ], [   AC_MSG_RESULT(yes)   AC_DEFINE(HAVE_$1)   ], [   AC_MSG_RESULT(no)   ])])    +  +  AC_CHECK_MYSQL_OPTIONS(MYSQL_READ_DEFAULT_FILE) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_OPT_CONNECT_TIMEOUT) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_OPT_COMPRESS) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_OPT_NAMED_PIPE) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_INIT_COMMAND) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_READ_DEFAULT_GROUP) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_SET_CHARSET_DIR) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_SET_CHARSET_NAME) +  AC_CHECK_MYSQL_OPTIONS(MYSQL_OPT_LOCAL_INFILE)    AC_CHECK_MYSQL_OPTIONS(SHUTDOWN_DEFAULT) -  +  AC_CHECK_MYSQL_OPTIONS(FIELD_TYPE_GEOMETRY)          # Mysql libs       pike_cv_mysql="unknown"          AC_CHECK_LIB(mysqlclient, bchange, [    LIBS="-lmysqlclient $LIBS"    MYSQL_LIBS="-lmysqlclient"
pike.git/src/modules/Mysql/configure.in:210:      define([AC_CHECK_SQLLIB],   [   AC_MSG_CHECKING(for mysql_real_connect in $1)   AC_CACHE_VAL(ac_cv_pike_lib_$1_mysql_real_connect,   [    ac_save_LIBS="$LIBS"   LIBS="-l$1 $LIBS"    AC_TRY_LINK(   [ - #ifdef HAVE_WINSOCK_H + #ifdef HAVE_WINSOCK2_H + #include <winsock2.h> + #elif defined(HAVE_WINSOCK_H)   #include <winsock.h>   #endif      #ifdef HAVE_MYSQL_H   #include <mysql.h>   #else   #ifdef HAVE_MYSQL_MYSQL_H   #include <mysql/mysql.h>   #endif   #endif
pike.git/src/modules/Mysql/configure.in:242:   else    AC_MSG_RESULT(no)       AC_MSG_CHECKING(for mysql_connect in $1)    AC_CACHE_VAL(ac_cv_pike_lib_$1_mysql_connect,    [    ac_save_LIBS="$LIBS"    LIBS="-l$1 $LIBS"    AC_TRY_LINK(   [ - #ifdef HAVE_WINSOCK_H + #ifdef HAVE_WINSOCK2_H + #include <winsock2.h> + #elif defined(HAVE_WINSOCK_H)   #include <winsock.h>   #endif      #ifdef HAVE_MYSQL_H   #include <mysql.h>   #else   #ifdef HAVE_MYSQL_MYSQL_H   #include <mysql/mysql.h>   #endif   #endif
pike.git/src/modules/Mysql/configure.in:307:    AC_DEFINE(HAVE_MYSQL)       # Note: mysql_port and mysql_unix_port aren't functions, but that shouldn't matter    define([PIKE_CHECK_MYSQL_FUNC], [    changequote(<<, >>)dnl    define(<<AC_CV_NAME>>, translit(pike_cv_mysql_$1, [ *], [_p]))dnl    changequote([, ])dnl    AC_MSG_CHECKING(for $1)    AC_CACHE_VAL(AC_CV_NAME, [    AC_TRY_LINK([ - #ifdef HAVE_WINSOCK_H + #ifdef HAVE_WINSOCK2_H + #include <winsock2.h> + #elif defined(HAVE_WINSOCK_H)   #include <winsock.h>   #endif      #ifdef HAVE_MYSQL_H   #include <mysql.h>   #else   #ifdef HAVE_MYSQL_MYSQL_H   #include <mysql/mysql.h>   #else   #error Need mysql.h headerfile!
pike.git/src/modules/Mysql/configure.in:333:    ])    if test "$AC_CV_NAME" = "yes"; then    AC_DEFINE(translit(HAVE_$1,[a-z],[A-Z]))    fi    AC_MSG_RESULT($AC_CV_NAME)    ])       PIKE_CHECK_MYSQL_FUNC(mysql_real_query)    PIKE_CHECK_MYSQL_FUNC(mysql_fetch_lengths)    PIKE_CHECK_MYSQL_FUNC(mysql_options) +  PIKE_CHECK_MYSQL_FUNC(mysql_set_character_set)       # Note: The following two are variables:    PIKE_CHECK_MYSQL_FUNC(mysql_port)    PIKE_CHECK_MYSQL_FUNC(mysql_unix_port)       if test "$pike_cv_mysql_mysql_fetch_lengths" = "yes"; then    #    # In 3.20.6b mysql_fetch_lengths() returns an uint *.    # In 3.20.22 it returns an unsigned int *.    # In 3.22.23 it returns an unsigned long *.    #    AC_MSG_CHECKING([if mysql_fetch_lengths() returns an uint or an ulong])    AC_CACHE_VAL(pike_cv_mysql_fetch_lengths_ret_type, [    for ret_type in "unsigned long long" "unsigned long" "unsigned int" "long long" "long" "int"; do    AC_TRY_COMPILE([ - #ifdef HAVE_WINSOCK_H + #ifdef HAVE_WINSOCK2_H + #include <winsock2.h> + #elif defined(HAVE_WINSOCK_H)   #include <winsock.h>   #endif      #ifdef HAVE_MYSQL_H   #include <mysql.h>   #else   #ifdef HAVE_MYSQL_MYSQL_H   #include <mysql/mysql.h>   #else   #error Need mysql.h headerfile!
pike.git/src/modules/Mysql/configure.in:384:    AC_MSG_RESULT(Unknown -- Defaulting to unsigned long)    AC_DEFINE(FETCH_LENGTHS_TYPE, unsigned long)    else    AC_MSG_RESULT($pike_cv_mysql_fetch_lengths_ret_type)    AC_DEFINE_UNQUOTED(FETCH_LENGTHS_TYPE,    $pike_cv_mysql_fetch_lengths_ret_type)    fi    else :; fi       if test x"$pike_cv_sys_os" = xWindows_NT ; then -  MYSQL_LIBS="-lshell32 -lkernel32 -lws2_32 -ladvapi32 ${MYSQL_LIBS}" +  MYSQL_LIBS="-lshell32 -lkernel32 -lws2_32 -ladvapi32 -luser32 ${MYSQL_LIBS}"    fi    AC_CHECK_FUNCS(ldiv open sopen close read fileno puts fgets)       fi   fi      AC_SUBST(MYSQL_LIBS)      AC_OUTPUT(Makefile,echo FOO >stamp-h )