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

version» Context lines:

pike.git/src/modules/Mysql/configure.in:6:      #   # NOTE:   # Prior to 3.20.0 After 3.20.0   # -------------------------------------------------------------------   # /usr/local/mysql/mach-lib-threads /usr/local/lib/mysql   # /usr/local/mysql/include /usr/local/include/mysql   # libmysql.a libmysqllib.a   # libstrings.a libmystrings.a   # + # MariaDB-Client 1.0.0 + # ------------------------------------------------------------------- + # /usr/local/lib + # /usr/local/mariadbclient/include + # libmariadbclient.a + #         AC_INIT(mysql.c)   AC_CONFIG_HEADER(config.h)      AC_MODULE_INIT()      # ___Mysql.so is wrapped by lib/modules/Mysql.pmod.   MODULE_WRAPPER_PREFIX="___"   
pike.git/src/modules/Mysql/configure.in:29:   OLD_LDFLAGS=$LDFLAGS   OLD_CPPFLAGS=$CPPFLAGS      AC_ARG_WITH(mysql, [ --without-mysql no support for the Mysql database],[],[with_mysql=yes])      if test x$with_mysql = xno; then    :   else    PIKE_FEATURE_NODEP(Mysql)    +  AC_PATH_PROG(MARIADB_CONFIG,${ac_tool_prefix}mariadb_config,no) +  if test "x${MARIADB_CONFIG}" = "xno"; then +     AC_MSG_CHECKING(for Mysql directory prefix)    AC_CACHE_VAL(pike_cv_mysql_lib_dir_prefix, [    pike_cv_mysql_lib_dir_prefix=no    for dir_prefix in $with_mysql \    `echo "${with_site_prefixes}"|sed -e 's/:/ /g'` \    `echo $exec_prefix | sed "s@^NONE@$prefix@g" | sed "s@^NONE@$with_root$ac_default_prefix@g"` \    $with_root/usr/local $with_root/sw/local $with_root/sw \    $with_root/usr/gnu $with_root/opt/gnu $with_root/sw/gnu \    $with_root/usr/freeware $with_root/usr/pkg \    $with_root/opt/csw $with_root/opt/csw/mysql5 $with_root/opt/csw/mysql4 \
pike.git/src/modules/Mysql/configure.in:101:    fi    done    ])    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    fi +  else +  echo "MariaDB found. Attempting to use." +  # MariaDB +  # NB: mariadb_config doens't distinguish between +  # LDFLAGS and LIBS +  MARIADB_LIBS="" +  set ignored `${MARIADB_CONFIG} --libs_r` +  while test "$#" -gt 1; do +  case "$2" in +  -L*) +  echo "Adding `echo $2 | sed -e 's/^-L//'` to the library search path." +  LDFLAGS="${LDFLAGS} $2 `echo $2 | sed -e 's/^-L/-R/'`" +  ;; +  -R*) +  echo "Adding `echo $2 | sed -e 's/^-R//'` to the library runtime search path." +  LDFLAGS="${LDFLAGS} $2" +  ;; +  -lmaria*) +  # We handle the client library itself later. +  ;; +  *) +  # NB: We need to buffer libs to get them in the correct order. +  echo "Adding $2 to LIBS." +  MARIADB_LIBS="${MARIADB_LIBS} $2" +  ;; +  esac +  shift +  done +  echo "Adding `${MARIADB_CONFIG} --include` to CPPFLAGS." +  CPPFLAGS="${CPPFLAGS} `${MARIADB_CONFIG} --include`" +  fi    -  +     # Header file       AC_CHECK_HEADERS(winsock2.h winsock.h mysql.h mysql/mysql.h errmsg.h mysql/errmsg.h,,,[   #if HAVE_WINSOCK2_H   #include <winsock2.h>   #elif HAVE_WINSOCK_H   #include <winsock.h>   #endif    ])   
pike.git/src/modules/Mysql/configure.in:193:    LIBS="-lpthread $LIBS"    echo Warning added -lpthread to \$LIBS\!    ], [    AC_CHECK_LIB(pthreads, pthread_self, [    LIBS="-lpthreads $LIBS"    echo Warning added -lpthreads to \$LIBS\!    ], [])    ])    ])    +  # Needed for libmariadbclient.a 1.0.0. +  AC_SEARCH_LIBS(OPENSSL_config, crypto) +     AC_SEARCH_LIBS(_db_doprnt_, dbug)    AC_SEARCH_LIBS(my_init, mysys)       # mysql 3.23.x libmysqlclient requires zlib...    AC_SEARCH_LIBS(compress, z)    -  +  if test "x${MARIADB_CONFIG}" = "x"; then :; else +  LIBS="${MARIADB_LIBS} ${LIBS}" +  fi +     # Try a couple of mysqlclient libs    # in order of age, newest first.      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"
pike.git/src/modules/Mysql/configure.in:276:    PIKE_FEATURE(Mysql,[yes (lib$1)])    AC_MSG_RESULT(yes)    $2    else    AC_MSG_RESULT(no)    $3    fi   fi   ])    +  if test "x${MARIADB_CONFIG}" = "xno"; then    # libmysql.lib is the name for the libmysql.dll wrapper in the    # windows releases. There's also a mysqlclient.lib which contain the    # static version. We prefer the dynamic one so check libmysql first.    AC_CHECK_SQLLIB(libmysql, [    LIBS="-llibmysql $LIBS"    ], [    AC_CHECK_SQLLIB(mysqlclient, [    LIBS="-lmysqlclient $LIBS"    ], [    AC_CHECK_SQLLIB(mysqllib, [
pike.git/src/modules/Mysql/configure.in:297:    ], [    AC_CHECK_SQLLIB(mysql, [    LIBS="-lmysql $LIBS"    ], [    PIKE_FEATURE_NODEP(Mysql)    pike_cv_mysql="no"    ])    ])    ])    ]) +  else +  AC_CHECK_SQLLIB(mariadbclient, [ +  LIBS="-lmariadbclient $LIBS" +  ], [ +  AC_CHECK_SQLLIB(mariadb, [ +  LIBS="-lmariadb $LIBS" +  ], [ +  PIKE_FEATURE_NODEP(Mysql) +  pike_cv_mysql="no" +  ]) +  ]) +  fi       if test x$pike_cv_mysql = xno; then :; else    # Check version match    AC_CHECK_FUNC(mysql_get_client_version,[    AC_TRY_RUN([#ifdef HAVE_WINSOCK2_H   #include <winsock2.h>   #else   #ifdef HAVE_WINSOCK_H   #include <winsock.h>   #endif