1 AC_INIT([monodevelop-database], 1.9.2, [monodevelop-list@lists.ximian.com])
3 AM_INIT_AUTOMAKE([1.9 tar-ustar])
6 ASSEMBLY_VERSION=1.9.2.0
8 AC_PATH_PROG(MONO, mono)
9 AC_PATH_PROG(MCS, gmcs)
11 if test "x$MONO" = "x" ; then
12 AC_MSG_ERROR([Can't find "mono" in your PATH])
15 if test "x$MCS" = "x" ; then
16 AC_MSG_ERROR([Can't find "gmcs" in your PATH])
19 AC_SUBST(LD_LIBRARY_PATH)
21 MONO_REQUIRED_VERSION=1.1.10
22 PKG_CHECK_MODULES(UNMANAGED_DEPENDENCIES_MONO,mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
24 if test "x$has_mono" = "xfalse"; then
25 AC_MSG_ERROR([Please install mono version $MONO_REQUIRED_VERSION or later to install MonoDevelop.
26 Please see http://www.mono-project.org/ to download latest mono sources or packages])
29 if test "x$has_mono" = "xtrue"; then
30 if test `uname -s` = "Darwin"; then
31 AC_PATH_PROG(RUNTIME, mono, no)
32 AC_PATH_PROG(CSC, gmcs, no)
36 AC_PATH_PROG(RUNTIME, mono, no)
37 AC_PATH_PROG(CSC, gmcs, no)
43 # Find msgfmt and msgmerge for translations
44 AC_PATH_PROG(MSGFMT, msgfmt, no)
45 if test "x$MSGFMT" = "xno"; then
46 AC_MSG_ERROR([You need to install msgfmt from intltool])
48 AC_PATH_PROG(MSGMERGE, msgmerge, no)
49 if test "x$MSGMERGE" = "xno"; then
50 AC_MSG_ERROR([You need to install msgmerge from intltool])
54 MONOADDINS_REQUIRED_VERSION=0.3
55 MONODEVELOP_REQUIRED_VERSION=1.9.2
56 GTKSHARP_REQUIRED_VERSION=2.8.0
58 PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= $MONOADDINS_REQUIRED_VERSION)
59 AC_SUBST(MONO_ADDINS_LIBS)
60 PKG_CHECK_MODULES(MONO_ADDINS_SETUP, mono-addins-setup >= $MONOADDINS_REQUIRED_VERSION)
61 AC_SUBST(MONO_ADDINS_SETUP_LIBS)
62 PKG_CHECK_MODULES(MONO_ADDINS_GUI, mono-addins-gui >= $MONOADDINS_REQUIRED_VERSION)
63 AC_SUBST(MONO_ADDINS_GUI_LIBS)
64 PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
65 AC_SUBST(GLIB_SHARP_LIBS)
66 PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
67 AC_SUBST(GTK_SHARP_LIBS)
68 PKG_CHECK_MODULES(MONODEVELOP, monodevelop >= $MONODEVELOP_REQUIRED_VERSION)
69 AC_SUBST(MONODEVELOP_LIBS)
71 gtksharp_prefix="`$PKG_CONFIG --variable=prefix gtk-sharp-2.0`"
72 AC_SUBST(gtksharp_prefix)
75 dnl *************************************************************
76 dnl *** The following hunk of script-fu is to detect the ***
77 dnl *** available MonoDevelop.Database database providers... ***
78 dnl *************************************************************
80 test_sqlite=$(gacutil -l | grep "Mono.Data.Sqlite, Version=2")
81 test_sqlserver=$(gacutil -l | grep "System.Data, Version=2")
82 test_postgres=$(gacutil -l | grep "Npgsql, Version=2")
83 test_mysql=$(gacutil -l | grep "MySql.Data")
85 if test "x$test_sqlite" != "x"; then
86 ## mono 1.2.4 contains some bugs that prevents the sqlite addin from working properly
87 MONO_REQUIRED_VERSION=1.2.5
88 PKG_CHECK_MODULES(UNMANAGED_DEPENDENCIES_MONO,mono >= $MONO_REQUIRED_VERSION, has_correct_mono=true, has_correct_mono=false)
90 if test "x$has_correct_mono" = "xfalse"; then
91 enable_sqlite="no (requires mono >= 1.2.5)"
96 enable_sqlite="no (missing Mono.Data.Sqlite, Version 2)"
99 if test "x$test_sqlserver" != "x"; then
100 enable_sqlserver="yes"
102 enable_sqlserver="no (missing System.Data, Version 2)"
105 if test "x$test_postgres" != "x"; then
106 enable_postgres="yes"
108 enable_postgres="no (missing Npgsql, Version 2)"
111 if test "x$test_mysql" != "x"; then
114 enable_mysql="no (missing MySql.Data)"
117 AM_CONDITIONAL(ENABLE_POSTGRES, [test "x$enable_postgres" = "xyes"])
118 AM_CONDITIONAL(ENABLE_MYSQL, [test "x$enable_mysql" = "xyes"])
119 AM_CONDITIONAL(ENABLE_SQLITE, [test "x$enable_sqlite" = "xyes"])
120 AM_CONDITIONAL(ENABLE_SQLSERVER, [test "x$enable_sqlserver" = "xyes"])
122 CSC_FLAGS="-debug -codepage:utf8"
126 AC_SUBST(ASSEMBLY_VERSION)
130 MD_DIR='$(prefix)/lib/monodevelop'
131 MD_ASSEMBLY_DIR="$MD_DIR/bin"
132 MD_ADDIN_DIR="$MD_DIR/AddIns"
134 AC_SUBST(MD_ASSEMBLY_DIR)
135 AC_SUBST(MD_ADDIN_DIR)
140 monodevelop-database.pc
141 MonoDevelop.Database.Sql/Makefile
142 MonoDevelop.Database.Sql.MySql/Makefile
143 MonoDevelop.Database.Sql.Npgsql/Makefile
144 MonoDevelop.Database.Sql.Sqlite/Makefile
145 MonoDevelop.Database.Sql.SqlServer/Makefile
146 MonoDevelop.Database.Components/Makefile
147 MonoDevelop.Database.Query/Makefile
148 MonoDevelop.Database.CodeGenerator/Makefile
149 MonoDevelop.Database.Designer/Makefile
150 MonoDevelop.Database.ConnectionManager/Makefile
155 echo "Configuration summary"
157 echo " * Installation prefix = $prefix"
158 echo " * C# compiler = $CSC"
160 echo " * PostgreSQL: $enable_postgres"
161 echo " * MySQL: $enable_mysql"
162 echo " * SQLite: $enable_sqlite"
163 echo " * SQL Server: $enable_sqlserver"