File: configure.in

package info (click to toggle)
gecko-sharp2 0.11-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 952 kB
  • ctags: 58
  • sloc: xml: 4,309; sh: 3,069; cs: 306; makefile: 127
file content (160 lines) | stat: -rw-r--r-- 3,635 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
148
149
150
151
152
153
154
155
156
157
158
159
160
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(gecko-sharp-2.0, 0.11)
AM_MAINTAINER_MODE

API_VERSION=2.0.0.0
AC_SUBST(API_VERSION)

MONO_REQUIRED_VERSION=1.0

AC_MSG_CHECKING([whether we're compiling from CVS])
if test -f "$srcdir/.cvs_version" ; then
	from_cvs=yes
else
if test -f "$srcdir/.svn" ; then
	from_cvs=yes
else
	from_cvs=no
fi
fi

AC_MSG_RESULT($from_cvs)

AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, mcs)
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 "mcs" in your PATH])
fi
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)

dnl Find pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
        AC_MSG_ERROR([You need to install pkg-config])
fi

dnl Find GTK
BUILD_GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
BUILD_GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
AC_SUBST(BUILD_GTK_CFLAGS)
AC_SUBST(BUILD_GTK_LIBS)



GTK_REQUIRED_VERSION=2.0.0
MONO_REQUIRED_VERSION=0.95

PKG_CHECK_MODULES(BASE_DEPENDENCIES, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION) 
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)

if test "x$has_mono" = "xtrue"; then
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, mcs, no)
if test `uname -s` = "Darwin"; then
	LIB_PREFIX=
	LIB_SUFFIX=.dylib
else
	LIB_PREFIX=.so
	LIB_SUFFIX=
fi
else
AC_PATH_PROG(CSC, csc.exe, no)
if test x$CSC = "xno"; then
	AC_MSG_ERROR([You need to install either mono or .Net])
else
RUNTIME=
LIB_PREFIX=
LIB_SUFFIX=.dylib
fi
fi

AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)


AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
AC_SUBST(BASE_DEPENDENCIES_LIBS)

dnl Find Gtk#
PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= 1.9.0)
AC_SUBST(GTK_SHARP_CFLAGS)
AC_SUBST(GTK_SHARP_LIBS)

dnl Find Gtk#
PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 1.9.0)

dnl Find Mozilla
dnl AC_ARG_WITH(mozilla-headers,
dnl        [  --with-mozilla-headers  Specify location of MOZILLA headers],
dnl        [MOZ_CFLAGS="-I$withval"],
dnl        [MOZ_CFLAGS="-I/usr/include/mozilla"])
                                                                                
dnl AC_ARG_WITH(mozilla-libs,
dnl        [  --with-mozilla-libs     Specify location of MOZILLA libs],
dnl        [MOZ_LIBS="-L$withval"],
dnl        [MOZ_LIBS="-L/usr/lib/mozilla"])

dnl AC_SUBST(MOZ_LIBS)
dnl AC_SUBST(MOZ_CFLAGS)

dnl Find monodoc
MONODOC_REQUIRED_VERSION=1.0
AC_SUBST(MONODOC_REQUIRED_VERSION)
PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)

if test "x$enable_monodoc" = "xyes"; then
        AC_PATH_PROG(MONODOC, monodoc, no)
        if test x$MONODOC = xno; then
           enable_monodoc=no
        fi
else
        MONODOC=
fi

AC_SUBST(MONODOC)
AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes")


AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
        AC_MSG_ERROR([No gacutil tool found])
fi

GACUTIL_FLAGS='/package gecko-sharp-2.0 /gacdir $(DESTDIR)$(prefix)/lib'
AC_SUBST(GACUTIL_FLAGS)

winbuild=no
case "$host" in
       *-*-mingw*|*-*-cygwin*)
               winbuild=yes
               ;;
esac
AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)

AC_SUBST(GACUTIL)

AC_OUTPUT([
Makefile
gtkmozembed/gecko-sharp.dll.config
gtkmozembed/Makefile
gtkmozembed/AssemblyInfo.cs
doc/Makefile
sample/Makefile
sources/Makefile
gecko-sharp-2.0.pc
])

echo "---"
echo "Configuration summary"
echo ""
echo "   * Installation prefix: $prefix"
echo "   * compiler: $CSC"
echo "   * Documentation: $enable_monodoc ($MONODOC)"
echo ""
echo "---"