1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
AC_INIT(mysql-administrator, 1.2.12)
AC_CONFIG_SRCDIR(source/linux/main.cc)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(source/linux/config.h)
#
# standard stuff
#
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_CHECK_PROG(PKG_CONFIG, pkg-config)
#
# internal libraries
#
AC_CHECK_FILE(../mysql-gui-common/library/base-library, [],
AC_MSG_ERROR([mysql-gui-common source tree must be present in the same directory as this program]))
#AC_CHECK_FILE(../mysql-gui-common/source/linux/libmacommongui.a, [],
# AC_MSG_ERROR([mysql-gui-common source tree must be compiled and present in the same directory as this program]))
#
# Library
#
AC_CHECK_LIB(util, forkpty, UTIL_LIBS="-lutil")
AC_SUBST(UTIL_LIBS)
#
# pcre
#
AC_CHECK_PROG(PCRE_CFLAGS,pcre-config,[yes])
if test "$PCRE_CFLAGS" != yes; then
AC_MSG_ERROR([Could not find pcre-config script. Make sure the pcre libraries are installed])
else
PCRE_CFLAGS=`pcre-config --cflags`
fi
AC_SUBST(PCRE_CFLAGS)
AC_CHECK_PROG(PCRE_LIBS,pcre-config,`pcre-config --libs`)
if test -z "$PCRE_LIBS"; then
AC_MSG_ERROR([Could not find pcre-config script. Make sure the pcre libraries are installed])
fi
AC_SUBST(PCRE_LIBS)
# cant put result directly in check macro because it can return ""
AC_CHECK_PROG(PCRE_CFLAGS,pcre-config,[yes])
if test "$PCRE_CFLAGS" != yes; then
AC_MSG_ERROR([Could not find pcre-config script. Make sure the pcre libraries are installed])
else
PCRE_CFLAGS=`pcre-config --cflags`
fi
AC_SUBST(PCRE_CFLAGS)
#
# gettext
#
GETTEXT_PACKAGE="mysql-administrator"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package name])
AC_ARG_ENABLE(i18n,
[ --disable-i18n do not add support for internationalization (requires GNU gettext)],
enable_i18n=$enableval, enable_i18n=yes)
if test x$enable_i18n = xyes; then
#
# Gettext
#
GETTEXT_PACKAGE="$PACKAGE_NAME"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
dnl Add the languages which your application supports here.
ALL_LINGUAS="ja de pt_BR"
AM_GLIB_GNU_GETTEXT
fi
#
# mysql libraries
#
AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
if test -z "$MYSQL_CFLAGS"; then
AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
fi
AC_SUBST(MYSQL_CFLAGS)
AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs_r`)
if test -z "$MYSQL_LIBS"; then
AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
fi
AC_SUBST(MYSQL_LIBS)
#
# gnome libraries
#
PKG_CHECK_MODULES(GLIB, [glib-2.0 libxml-2.0 >= 2.6.2])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GNOME, [libglade-2.0
libxml-2.0 >= 2.6.2
gtkmm-2.4])
AC_SUBST(GNOME_CFLAGS)
AC_SUBST(GNOME_LIBS)
#
# check other headers
#
AC_CHECK_HEADERS(sys/statfs.h sys/param.h sys/mount.h)
AC_CHECK_FUNCS(strtoll __strtoll)
# path mangling
commondirname="common"
AC_ARG_WITH(commondirname,
[ --with-commondirname sets the common data directory name],
[commondirname="$withval"])
MG_COMMONDIR=$commondirname
AC_SUBST(MG_COMMONDIR)
DATADIRNAME=`echo $datadir|sed -e "s@${prefix}/@@" -e 's@${prefix}/@@'`
AC_SUBST(DATADIRNAME)
mydatadir='$(datadir)/mysql-gui'
AC_SUBST(mydatadir)
madatadir='$(datadir)/mysql-gui/administrator'
AC_SUBST(madatadir)
AC_CONFIG_FILES([
mysql-administrator.spec
Makefile
res/Makefile
res/linux/Makefile
images/Makefile
images/icons/Makefile
images/icons/png/Makefile
images/icons/png/maintree/Makefile
images/icons/png/sections/Makefile
library/Makefile
library/source/Makefile
source/Makefile
source/linux/Makefile
source/util/Makefile
po/Makefile.in
])
AC_OUTPUT()
|