File: configure.in

package info (click to toggle)
balsa 0.6.0-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,044 kB
  • ctags: 3,648
  • sloc: ansic: 36,750; sh: 7,458; makefile: 518; sed: 93
file content (194 lines) | stat: -rw-r--r-- 4,771 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
AC_INIT(src/main.c)
AM_CONFIG_HEADER(config.h)

dnl
dnl take care of version
dnl
BALSA_MAJOR=0
BALSA_REVISION=6
BALSA_PATCHLEVEL=0
BALSA_VERSION="$BALSA_MAJOR.$BALSA_REVISION.$BALSA_PATCHLEVEL"
VERSION="$BALSA_MAJOR.$BALSA_REVISION.$BALSA_PATCHLEVEL"

dnl configure libmutt
AC_CONFIG_SUBDIRS(libmutt)

AM_INIT_AUTOMAKE(balsa, [$VERSION])

AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
AC_ISC_POSIX

AM_PATH_GLIB([1.2.0],,AC_MSG_ERROR([You need GLib installed -- GNOME requires this as well.]),gthread)
GNOME_INIT

AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL


dnl this should come after `AC_PROG_CC'
GNOME_X_CHECKS

balsa_save_LDFLAGS="$LDFLAGS"
balsa_save_LIBS="$LIBS"

LDFLAGS="$LDFLAGS `echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`"
LIBS="$LIBS $GTK_LIBS"

AC_CHECK_LIB(PropList, PLGetProplistWithPath, ,
AC_MSG_ERROR([*** libPropList not found.  Please check http://www.balsa.net for information on the required files.]),)

LDFLAGS="$balsa_save_LDFLAGS"
LIBS="$balsa_save_LIBS"

ALL_LINGUAS="da de es et fi fr ga ko no it nl pl ru pt_BR"
AM_GNU_GETTEXT


AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

gnome_cv_use_gnome=yes

AC_DEFINE_UNQUOTED(BALSA_MAJOR, $BALSA_MAJOR)
AC_DEFINE_UNQUOTED(BALSA_REVISION, $BALSA_REVISION)
AC_DEFINE_UNQUOTED(BALSA_PATCHLEVEL, $BALSA_PATCHLEVEL)
AC_DEFINE_UNQUOTED(BALSA_VERSION, "$BALSA_VERSION")

AC_CHECK_LIB(crypt, crypt)

dnl these may be used later.
dnl AC_CHECK_LIB(des, des_encrypt)
dnl AC_CHECK_LIB(krb, krb_sendauth)
dnl AC_CHECK_LIB(acap, acap_OpenConnection)


AM_HDR_SIGACTION
AM_HDR_SIGSET


dnl ORBit support
AC_CHECK_PROG(ORBIT_CONFIG, orbit-config, orbit-config)
if test -n "$ORBIT_CONFIG"; then
	ORBIT_LIBS="`orbit-config --libs client server --use-service=name`"
	ORBIT_CFLAGS="`orbit-config --cflags client server --use-service=name`"
fi
AC_SUBST(ORBIT_CFLAGS)
AC_SUBST(ORBIT_LIBS)
AM_CONDITIONAL(ORBIT_INSTALLED, test -n "$ORBIT_LIBS")

ORB_LIBS="$ORBIT_LIBS"
ORB_CFLAGS="$ORBIT_CFLAGS"

AC_SUBST(ORB_LIBS)
AC_SUBST(ORB_CFLAGS)

dnl PKGW: where to install pixmaps
gnomedatadir=`$GNOME_CONFIG --datadir`
AC_SUBST(gnomedatadir)

dnl Automake @VARIABLE@ exports.
AC_SUBST(BALSA_MAJOR)
AC_SUBST(BALSA_REVISION)
AC_SUBST(BALSA_PATCHLEVEL)
AC_SUBST(BALSA_VERSION)
AC_SUBST(LIBOBJS)
AC_SUBST(LIBESD_LIB)


dnl Enable all
AC_ARG_ENABLE(all, [  --enable-all            Enable incomplete features [default=no]],[
	AC_DEFINE(BALSA_SHOW_ALL)
	use_all=yes
],[
	use_all=no
])

dnl Enable information in the mailbox list
AC_ARG_ENABLE(info, [  --enable-info           Enable mailbox info (broken) [default=no]],[
	AC_DEFINE(BALSA_SHOW_INFO)
	use_info=yes
],[
	use_info=no
])

dnl Use threading
AC_ARG_ENABLE(threads, [  --enable-threads        Use threading for mail retrieval (unstable) [default=no]],[
	use_threads=$enableval
],[
	use_threads=no
])

dnl Allow user-level install. AIEEEEE FIXME FIXME XXXX
AC_ARG_ENABLE(system-install, [  --enable-system-install   Install Balsa icons globally (requires write access to Gnome files)],[
	use_sys_install=$enableval
],[
	use_sys_install=no
])
if test x"$use_sys_install" = xyes ; then
	AC_DEFINE(BALSA_SYSTEM_INSTALL)
	AM_CONDITIONAL(sys_install,true)
else
	AC_DEFINE(BALSA_LOCAL_INSTALL)
	AC_DEFINE_UNQUOTED(BALSA_RESOURCE_PREFIX,"${prefix}")
	AM_CONDITIONAL(sys_install,false)
fi

AC_MSG_CHECKING([whether to use threads])
if test x"$use_threads" = xyes ; then
	AC_MSG_RESULT([yes])
	if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
		THREAD_CFLAGS=`$GLIB_CONFIG --cflags gthread`
		THREAD_LIBS=`$GLIB_CONFIG --libs gthread`
		CFLAGS="$CFLAGS $THREAD_CFLAGS"
		LIBS="$LIBS $THREAD_LIBS"
		AC_DEFINE(BALSA_USE_THREADS,1)
	else
		AC_MSG_ERROR([Balsa requires GThread from GLib to use threading.])
	fi
else
	AC_MSG_RESULT([no])
fi

dnl Fancypants new init
AC_PATH_PROG(GOB,[gob],[false],)
if test x"$GOB" = "xfalse" ; then
	#AC_DEFINE(BALSA_USE_EXPERIMENTAL_INIT)
	#LIBINIT_BALSA_LIB="\$(top_builddir)/libinit_balsa/libinit_balsa.a"
	BALSA_USE_GOB=false
else
	BALSA_USE_GOB=true
	AC_DEFINE(BALSA_HAVE_GOB)
fi
AM_CONDITIONAL(USE_GOB,[test x"$BALSA_USE_GOB" = "xtrue"])

dnl For the docs!
AC_CHECK_PROG(have_db2html, db2html, true, false)
AM_CONDITIONAL(HAVE_DB2HTML, $have_db2html)

dnl Create files.
AC_OUTPUT([
Makefile 
balsa.spec
po/Makefile.in
macros/Makefile
intl/Makefile
sounds/Makefile
images/Makefile
help/Makefile
help/C/Makefile
libbalsa/Makefile
libinit_balsa/Makefile
idl/Makefile
src/Makefile
])

echo "========= Final configuration ==================="
echo "   Installing into prefix: $prefix"
echo "     Using multithreading: $use_threads"
echo "Using incomplete features: $use_all"
echo "Using broken mailbox info: $use_info"
echo "  Install into Gnome dirs: $use_sys_install (requires write access to Gnome directories)"