All pastes #173103 Raw Edit

Someone

public text v1 · immutable
·published 2006-09-16 16:04 UTC
rendered paste body
AC_INIT([myprog], [2.0], [vvp@dgs.ru])

AM_INIT_AUTOMAKE
dnl ([0.1 myprog])

dnl AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES(Makefile)

##CC=i386-mingw32msvc-gcc

AC_PROG_CC
AC_PROG_CPP

echo "Is this a cross compilation: $cross_compiling"

dnl Checking for mysql and it's version version.
mysql_real=0
AC_CHECK_HEADERS(mysql.h)
AC_CHECK_LIB(mysqlclient, mysql_real_connect, mysql_real=1 , mysql_real=0)
dnl if we have no mysql_real... functions, let's check for mysql... functions.
dnl if they does not exist, let's assume we are failed to find mysql library.
if test "$mysql_real" -eq "0"
then
    AC_CHECK_LIB(mysqlclient, mysql_connect, , AC_ERROR([You should have libmysqlclient installed!]))
fi;
AC_DEFINE_UNQUOTED([MYSQL_REAL], $mysql_real, [Whether we have mysql_real... functions])

dnl Checking for necessary functions
AC_CHECK_FUNCS([asprintf sprintf getenv])

AC_OUTPUT(config.h)