File: configure.in

package info (click to toggle)
mozilla-bonobo 0.4.2.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,452 kB
  • ctags: 147
  • sloc: sh: 8,602; ansic: 1,195; makefile: 52
file content (107 lines) | stat: -rw-r--r-- 3,443 bytes parent folder | download | duplicates (2)
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
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(mozilla-bonobo, 0.4.2.1)
AM_CONFIG_HEADER(config.h)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_LIBTOOL
AC_PATH_XTRA

AC_ARG_WITH(mozilla-include-dir,
	  --with-mozilla-include-dir where to find mozilla include files,
	MOZILLA_INCLUDE_DIR=$withval;echo -e "Mozilla include file directory overrided to $MOZILLA_INCLUDE_DIR";
	moz_include_forced=yes,
	moz_include_forced=no,
)

AC_CHECK_PROG(has_pkg_config, pkg-config, yes, no,,)
if test $has_pkg_config != yes; then
   echo "You need to install pkg-config.";
   exit 1;
fi

dnl Checks for programs.
if test $moz_include_forced != yes; then

	echo -n "Checking if mozilla is in pkg-config..."
	if pkg-config --exists mozilla-plugin mozilla-nspr; then
		echo yes;
		mozilla_in_pkgconfig=yes;
	else
		echo no;
		mozilla_in_pkgconfig=no;
	fi

	if test $mozilla_in_pkgconfig != yes; then
		AC_CHECK_PROG(has_mozilla_config, mozilla-config, yes, no,,)
		if test $has_mozilla_config != yes; then
		   echo "The mozilla include file directory could not be found. It was neither found"
		   echo "in pkg-config, nor was a mozilla-config script found. Please install a Mozilla"
		   echo "development package. If your distribution's Mozilla development package does"
		   echo "neither have pkg-config integration nor a mozilla-config script, please indicate"
		   echo "the directory where Mozilla include files are located manually using the"
		   echo "--with-mozilla-include-dir option.";
		   exit 1;
		fi
	fi
fi

PLUGIN_LDFLAGS=-shared
AC_SUBST(PLUGIN_LDFLAGS)

echo -n "Checking for GNOME ldflags... "
VIEWER_LDFLAGS=$(pkg-config --libs libgnomeui-2.0 libgnome-2.0 libbonoboui-2.0 pango glib-2.0 gconf-2.0 libgnomecanvas-2.0 libart-2.0 gtk+-2.0 gtk+-x11-2.0 gdk-2.0 libbonobo-2.0 gnome-vfs-2.0 bonobo-activation-2.0 libgnomeprint-2.2)
if test $? != 0; then
	exit 1;
fi
echo $VIEWER_LDFLAGS
AC_SUBST(VIEWER_LDFLAGS)

echo -n "Checking for GNOME cflags... "
VIEWER_CFLAGS=$(pkg-config --cflags libgnomeui-2.0 libgnome-2.0 libbonoboui-2.0 pango glib-2.0 gconf-2.0 libgnomecanvas-2.0 libart-2.0 gtk+-2.0 gtk+-x11-2.0 gdk-2.0 libbonobo-2.0 gnome-vfs-2.0 bonobo-activation-2.0 libgnomeprint-2.2)
if test $? != 0; then
	exit 1;
fi
echo $VIEWER_CFLAGS
AC_SUBST(VIEWER_CFLAGS)

echo -n "Checking for mozilla cflags... "
if test $moz_include_forced != yes; then
	if test $mozilla_in_pkgconfig != yes; then
		PLUGIN_CFLAGS=$(mozilla-config --cflags java plugin)
	else
		PLUGIN_CFLAGS=$(pkg-config --cflags mozilla-plugin mozilla-nspr)
	fi
else
	PLUGIN_CFLAGS="-I$MOZILLA_INCLUDE_DIR/java -I$MOZILLA_INCLUDE_DIR/plugin -I$MOZILLA_INCLUDE_DIR/nspr"
fi
echo $PLUGIN_CFLAGS
AC_SUBST(PLUGIN_CFLAGS)

AC_ARG_WITH(plugin-install-dir,
	  --with-plugin-install-dir directory to install the plugin into,
	PLUGIN_INSTALL_DIR=$withval;echo -e "Plugin will be installed into $PLUGIN_INSTALL_DIR",
	echo -e "\nPlease provide an installation directory for the plugin (using --with-plugin-install-dir=...)"; exit 1,
)

AC_SUBST(PLUGIN_INSTALL_DIR)

AC_ARG_ENABLE(debug,
	  --enable-debug            enable debugging support,
	AC_DEFINE(DEBUG,, Define if debug output should be enabled),
)

AC_ARG_ENABLE(c89-checks,
	  --enable-c89-checks       enable C89 compiler compatibility checking,
	PLUGIN_CFLAGS="-pedantic -Wall -std=c89 $PLUGIN_CFLAGS";
	VIEWER_CFLAGS="-pedantic -Wall -std=c89 $VIEWER_CFLAGS",
)

AM_GCONF_SOURCE_2

AC_OUTPUT([
Makefile
src/Makefile
])