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

version» Context lines:

pike.git/src/modules/Mysql/configure.in:1:   # - # $Id: configure.in,v 1.4 1998/07/02 15:08:26 grubba Exp $ + # $Id: configure.in,v 1.5 1998/09/01 17:01:04 hubbe 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:64:       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="-I$pike_cv_mysql_include_dir ${CPPFLAGS}"    fi       # Header file    -  AC_CHECK_HEADERS(mysql.h mysql/mysql.h) +  AC_CHECK_HEADERS(winsock.h mysql.h mysql/mysql.h)       # Mysql libs       pike_cv_mysql="unknown"       AC_CHECK_LIB(mystrings, bchange, [    LIBS="-lmystrings $LIBS"    MYSQL_LIBS="-lmystrings ${MYSQL_LIBS}"    pike_cv_mysql="post3.20"    ], [
pike.git/src/modules/Mysql/configure.in:139:    ], [])       AC_CHECK_LIB(mysys, my_init, [    LIBS="-lmysys $LIBS"    MYSQL_LIBS="-lmysys ${MYSQL_LIBS}"    ], [])       # Try a couple of mysqlclient libs    # in order of age, newest first.    -  AC_CHECK_LIB(mysqlclient, mysql_connect, [ + define([AC_CHECK_SQLLIB], + [ + 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 + #include <winsock.h> + #endif +  + #ifdef HAVE_MYSQL_H + #include <mysql.h> + #else + #ifdef HAVE_MYSQL_MYSQL_H + #include <mysql/mysql.h> + #endif + #endif + ],[ +  mysql_connect(0,0,0,0); + ],ac_cv_pike_lib_$1_mysql_connect=yes,ac_cv_pike_lib_$1_mysql_connect=no) + LIBS="$ac_save_LIBS" + ]) +  + if test "x$ac_cv_pike_lib_$1_mysql_connect" = xyes ; then +  AC_MSG_RESULT(yes) +  $2 + else +  AC_MSG_RESULT(no) +  $3 + fi + ]) +  +  AC_CHECK_SQLLIB(mysqlclient, [    LIBS="-lmysqlclient $LIBS"    MYSQL_LIBS="-lmysqlclient ${MYSQL_LIBS}"    ], [ -  AC_CHECK_LIB(mysqllib, mysql_connect, [ +  AC_CHECK_SQLLIB(mysqllib, [    LIBS="-lmysqllib $LIBS"    MYSQL_LIBS="-lmysqllib ${MYSQL_LIBS}"    ], [ -  AC_CHECK_LIB(mysql, mysql_connect, [ +  AC_CHECK_SQLLIB(mysql, [    LIBS="-lmysql $LIBS"    MYSQL_LIBS="-lmysql ${MYSQL_LIBS}"    ], [ pike_cv_mysql="no" ])    ])    ])       if test x$pike_cv_mysql = xno; then    # Restore variables, so we don't link with unnessesary libs       LIBS=$OLD_LIBS