File: configure.in

package info (click to toggle)
mysql-gui-tools 5.0r14%2BopenSUSE-2.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 116,956 kB
  • ctags: 48,715
  • sloc: sql: 341,918; pascal: 276,698; ansic: 91,020; cpp: 90,451; objc: 33,236; sh: 29,481; yacc: 10,756; xml: 10,589; java: 10,079; php: 2,806; python: 2,092; makefile: 1,783; perl: 4
file content (147 lines) | stat: -rw-r--r-- 3,621 bytes parent folder | download
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
AC_INIT(mysql-query-browser, 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_TOOL(PKG_CONFIG, pkg-config)

#
# internal libraries
#
AC_CHECK_FILE(../common/library/base-library/include, 
        [MYSQLA_INCLUDE='-I$(top_srcdir)/../common/library/base-library/include -I$(top_srcdir)/../common/source/linux'],
	        AC_MSG_ERROR([mysql-gui-common source tree must be present in the same directory as this program]))

#AC_CHECK_FILE(../common/source/linux/libqbcommongui.a, [],
#	AC_MSG_ERROR([mysql-gui-common source tree must be compiled and present in the same directory as this program]))


AUX_CFLAGS="$MYSQLA_INCLUDE"
AC_SUBST(AUX_CFLAGS)
AC_SUBST(AUX_LIBS)


# 
# gettext
#
GETTEXT_PACKAGE="mysql-query-browser"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package name])

# list of supported languages
ALL_LINGUAS="pt_BR"
AM_GLIB_GNU_GETTEXT

#
# 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
#
AC_ARG_WITH(gtkhtml,
[  --with-gtkhtml=LIBRARY	specify the version of libgtkhtml to be used (default: libgtkhtml-3.0)],
     gtkhtml=$withval, gtkhtml=libgtkhtml-3.0)


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
			gthread-2.0
			libgnome-2.0
			libxml-2.0 >= 2.6.2
                        $gtkhtml
                        gtkmm-2.4])
AC_SUBST(GNOME_CFLAGS)
AC_SUBST(GNOME_LIBS)

if test x$gtkhtml = xlibgtkhtml-2.0; then
	AC_DEFINE(WITH_GTKHTML2, [], [Define if using libgtkhtml-2.0 instead of 3.x])
fi


#
# panda (pdf output)
#
#PKG_CHECK_MODULES(PDF, [panda >= 0.5.4])
#AC_SUBST(PDF_CFLAGS)
#AC_SUBST(PDF_LIBS)


#
# pcre
#
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_CHECK_PROG(PCRE_CFLAGS,pcre-config,`pcre-config --cflags`)
AC_SUBST(PCRE_CFLAGS)
AC_SUBST(PCRE_LIBS)

# 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)
qbdatadir='$(datadir)/mysql-gui/query-browser'
AC_SUBST(qbdatadir)



AC_CONFIG_FILES([
mysql-query-browser.spec
Makefile
res/Makefile
res/doc/Makefile
po/Makefile.in
res/linux/Makefile
images/Makefile
images/cursors/Makefile
images/png/Makefile
images/png/sidebar/Makefile
images/toolbar/Makefile
library/Makefile
library/source/Makefile
library/tests/Makefile
library/tests/test_query_analyze/Makefile
library/tests/test_query_composition/Makefile
library/tests/test_strip_sql/Makefile
source/Makefile
source/linux/Makefile])

AC_OUTPUT()