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
168
|
AC_INIT([monodevelop-database], 2.8.4.1, [monodevelop-list@lists.ximian.com])
AC_PREREQ(2.53)
AM_INIT_AUTOMAKE([1.9 tar-ustar])
AM_MAINTAINER_MODE
ASSEMBLY_VERSION=2.8
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, dmcs)
if test "x$MONO" = "x" ; then
AC_MSG_ERROR([Can't find "mono" in your PATH])
fi
if test "x$MCS" = "x" ; then
AC_MSG_ERROR([Can't find "dmcs" in your PATH])
fi
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
MONO_REQUIRED_VERSION=2.6.1
PKG_CHECK_MODULES(UNMANAGED_DEPENDENCIES_MONO,mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
if test "x$has_mono" = "xfalse"; then
AC_MSG_ERROR([Please install mono version $MONO_REQUIRED_VERSION or later to install MonoDevelop.
Please see http://www.mono-project.org/ to download latest mono sources or packages])
fi
if test "x$has_mono" = "xtrue"; then
if test `uname -s` = "Darwin"; then
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, dmcs, no)
LIB_PREFIX=
LIB_SUFFIX=.dylib
else
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, dmcs, no)
LIB_PREFIX=.so
LIB_SUFFIX=
fi
fi
# Find msgfmt and msgmerge for translations
AC_PATH_PROG(MSGFMT, msgfmt, no)
if test "x$MSGFMT" = "xno"; then
AC_MSG_ERROR([You need to install msgfmt from intltool])
fi
AC_PATH_PROG(MSGMERGE, msgmerge, no)
if test "x$MSGMERGE" = "xno"; then
AC_MSG_ERROR([You need to install msgmerge from intltool])
fi
dnl hard dependencies
MONOADDINS_REQUIRED_VERSION=0.4
MONODEVELOP_REQUIRED_VERSION=2.8.4.1
GTKSHARP_REQUIRED_VERSION=2.12.8
PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= $MONOADDINS_REQUIRED_VERSION)
AC_SUBST(MONO_ADDINS_LIBS)
PKG_CHECK_MODULES(MONO_ADDINS_SETUP, mono-addins-setup >= $MONOADDINS_REQUIRED_VERSION)
AC_SUBST(MONO_ADDINS_SETUP_LIBS)
PKG_CHECK_MODULES(MONO_ADDINS_GUI, mono-addins-gui >= $MONOADDINS_REQUIRED_VERSION)
AC_SUBST(MONO_ADDINS_GUI_LIBS)
PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
AC_SUBST(GLIB_SHARP_LIBS)
PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
AC_SUBST(GTK_SHARP_LIBS)
PKG_CHECK_MODULES(MONODEVELOP, monodevelop >= $MONODEVELOP_REQUIRED_VERSION)
AC_SUBST(MONODEVELOP_LIBS)
PKG_CHECK_MODULES(MONODEVELOP_CORE_ADDINS, monodevelop-core-addins >= $MONODEVELOP_REQUIRED_VERSION)
AC_SUBST(MONODEVELOP_CORE_ADDINS_LIBS)
gtksharp_prefix="`$PKG_CONFIG --variable=prefix gtk-sharp-2.0`"
AC_SUBST(gtksharp_prefix)
dnl *************************************************************
dnl *** The following hunk of script-fu is to detect the ***
dnl *** available MonoDevelop.Database database providers... ***
dnl *************************************************************
test_sqlite=$(gacutil -l | grep "Mono.Data.Sqlite, Version=2")
test_sqlserver=$(gacutil -l | grep "System.Data, Version=2")
test_postgres=$(gacutil -l | grep "Npgsql, Version=2")
test_mysql=$(gacutil -l | grep "MySql.Data")
if test "x$test_sqlite" != "x"; then
## mono 1.2.4 contains some bugs that prevents the sqlite addin from working properly
MONO_REQUIRED_VERSION=1.2.5
PKG_CHECK_MODULES(UNMANAGED_DEPENDENCIES_MONO,mono >= $MONO_REQUIRED_VERSION, has_correct_mono=true, has_correct_mono=false)
if test "x$has_correct_mono" = "xfalse"; then
enable_sqlite="no (requires mono >= 1.2.5)"
else
enable_sqlite="yes"
fi
else
enable_sqlite="no (missing Mono.Data.Sqlite, Version 2)"
fi
if test "x$test_sqlserver" != "x"; then
enable_sqlserver="yes"
else
enable_sqlserver="no (missing System.Data, Version 2)"
fi
if test "x$test_postgres" != "x"; then
enable_postgres="yes"
else
enable_postgres="no (missing Npgsql, Version 2)"
fi
if test "x$test_mysql" != "x"; then
enable_mysql="yes"
else
enable_mysql="no (missing MySql.Data)"
fi
AM_CONDITIONAL(ENABLE_POSTGRES, [test "x$enable_postgres" = "xyes"])
AM_CONDITIONAL(ENABLE_MYSQL, [test "x$enable_mysql" = "xyes"])
AM_CONDITIONAL(ENABLE_SQLITE, [test "x$enable_sqlite" = "xyes"])
AM_CONDITIONAL(ENABLE_SQLSERVER, [test "x$enable_sqlserver" = "xyes"])
CSC_FLAGS="-debug -codepage:utf8"
AC_SUBST(LIB_SUFFIX)
AC_SUBST(LIB_PREFIX)
AC_SUBST(ASSEMBLY_VERSION)
AC_SUBST(CSC_FLAGS)
MD_DIR='$(prefix)/lib/monodevelop'
MD_ASSEMBLY_DIR="$MD_DIR/bin"
MD_ADDIN_DIR="$MD_DIR/AddIns"
AC_SUBST(MD_ASSEMBLY_DIR)
AC_SUBST(MD_ADDIN_DIR)
AC_SUBST(MD_DIR)
AC_OUTPUT([
Makefile
monodevelop-database.pc
monodevelop-database.spec
MonoDevelop.Database.Sql/Makefile
MonoDevelop.Database.Sql.MySql/Makefile
MonoDevelop.Database.Sql.Npgsql/Makefile
MonoDevelop.Database.Sql.Sqlite/Makefile
MonoDevelop.Database.Sql.SqlServer/Makefile
MonoDevelop.Database.Components/Makefile
MonoDevelop.Database.Query/Makefile
MonoDevelop.Database.CodeGenerator/Makefile
MonoDevelop.Database.Designer/Makefile
MonoDevelop.Database.ConnectionManager/Makefile
po/Makefile
])
echo ""
echo "Configuration summary"
echo ""
echo " * Installation prefix = $prefix"
echo " * C# compiler = $CSC"
echo " * Providers:"
echo " * PostgreSQL: $enable_postgres"
echo " * MySQL: $enable_mysql"
echo " * SQLite: $enable_sqlite"
echo " * SQL Server: $enable_sqlserver"
echo ""
|