File: configure.in

package info (click to toggle)
rcalc 0.5.0-1.3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,660 kB
  • ctags: 591
  • sloc: ansic: 5,978; xml: 1,012; sh: 957; makefile: 202
file content (125 lines) | stat: -rw-r--r-- 3,040 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(rcalc, 0.5.0)
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

AC_PROG_RANLIB
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_INTLTOOL
AM_PROG_CC_STDC
AC_HEADER_STDC

dnl GNOME_COMPILE_WARNINGS

AC_TYPE_SIGNAL

if test "${prefix}" = "NONE"; then
   prefix=/usr
fi

dnl CFLAGS="$CFLAGS -Wall"
dnl AC_SUBST(CFLAGS)

dnl
dnl READLINE_HOOK (script-if-readline-found, failflag)
dnl
dnl If failflag is "failure", script aborts due to lack of GNU readline
dnl 
dnl Check for availability of the GNU readline library

AC_DEFUN([READLINE_HOOK],[
	TERMCAP_LIB="-ltermcap"
	AC_CHECK_LIB(readline,readline, [READLINE_LIB="-lreadline"],
		AC_MSG_ERROR(Readline library not found),
		$TERMCAP_LIB )
	READLINE_LIBS="$TERMCAP_LIB $READLINE_LIB"
	AC_SUBST(READLINE_LIBS)
])

AC_DEFUN([READLINE_CHECK], [
	READLINE_HOOK([],failure)
])

AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2

AC_ARG_ENABLE(term-ui,
[  --enable-term-ui       Also build the old (rcalc < 0.4.0) user interface ([default=no])],
, enable_term_ui=no)
AM_CONDITIONAL(ENABLE_TERM, test x$enable_term_ui != xno)

AC_ARG_ENABLE(applet,
[  --enable-applet        Build the rcalc GNOME applet ([default=no])],
, enable_applet=no)
AM_CONDITIONAL(ENABLE_APPLET, test x$enable_applet != xno)


if test x$enable_term_ui = xyes; then
  READLINE_CHECK
  PKG_CHECK_MODULES(LIBZVT, libzvt-2.0)
  AC_SUBST(LIBZVT_CFLAGS)
  AC_SUBST(LIBZVT_LIBS)
fi

if test x$enable_applet = xyes; then
  PKG_CHECK_MODULES(GNOME_APPLETS, libpanelapplet-2.0)
  AC_SUBST(GNOME_APPLETS_CFLAGS)
  AC_SUBST(GNOME_APPLETS_LIBS)

  PKG_CHECK_MODULES(LIBGLADE, libglade-2.0)
  AC_SUBST(LIBGLADE_CFLAGS)
  AC_SUBST(LIBGLADE_LIBS)
fi

pkg_modules="libgnomeui-2.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)


GETTEXT_PACKAGE=rcalc
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])

dnl Add the languages which your application supports here.
ALL_LINGUAS="en_GB de fr es it af"
AM_GLIB_GNU_GETTEXT

# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps", [Pixmap directory])

#defined the below to enable help to work for applets 

AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share", [Data Directory])
AC_DEFINE_UNQUOTED(SYSCONFDIR, "${prefix}/etc", [System Config Directory])
AC_DEFINE_UNQUOTED(LIBDIR, "${prefix}/lib", [Library Directory])
AC_DEFINE_UNQUOTED(PREFIX, "$prefix", [Prefix Directory])

if test x$enable_term_ui = xyes; then
  echo "Building both old (rcalc < 0.4.0) and new UI"
fi

if test x$enable_applet = xyes; then
  echo "Building GNOME rcalc applet"
fi

AC_OUTPUT([
Makefile
help/Makefile
help/C/Makefile
src/Makefile
src/ui_list/Makefile
src/ui_term/Makefile
src/engine/Makefile
src/applet/Makefile
po/Makefile.in
])