1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(src/xalf.c) |
---|
3 | |
---|
4 | AM_INIT_AUTOMAKE(xalf, 0.12) |
---|
5 | |
---|
6 | dnl Specify a header configuration file |
---|
7 | AM_CONFIG_HEADER(config.h) |
---|
8 | |
---|
9 | dnl Checks for programs. |
---|
10 | AC_PROG_CC |
---|
11 | |
---|
12 | dnl Initialize libtool |
---|
13 | dnl AM_DISABLE_STATIC |
---|
14 | AM_PROG_LIBTOOL |
---|
15 | |
---|
16 | AM_SANITY_CHECK |
---|
17 | |
---|
18 | AC_PROG_INSTALL |
---|
19 | AC_PROG_LN_S |
---|
20 | AC_PROG_MAKE_SET |
---|
21 | |
---|
22 | dnl Checks for libraries. |
---|
23 | AM_PATH_GTK(1.2.0) |
---|
24 | AC_PATH_XTRA |
---|
25 | |
---|
26 | AC_CHECK_FUNCS([unsetenv]) |
---|
27 | |
---|
28 | dnl Check for getopt_long, substitute the distributed versions if not |
---|
29 | AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"]) |
---|
30 | AC_SUBST(LIBOBJS) |
---|
31 | |
---|
32 | dnl Check if ld-linux is available, eg. LD_PRELOAD can handle multiple libraries. |
---|
33 | dnl A cleaner solution would be nice. |
---|
34 | AC_CHECK_FILE(/lib/ld-linux.so.1, [AC_DEFINE(MULTI_PRELOAD)]) |
---|
35 | AC_CHECK_FILE(/lib/ld-linux.so.2, [AC_DEFINE(MULTI_PRELOAD)]) |
---|
36 | |
---|
37 | dnl GNOME capplet |
---|
38 | AC_ARG_ENABLE(capplet, [ --enable-capplet build the GNOME capplet [default=yes]],[enable_capplet="$enableval"],[enable_capplet=yes]) |
---|
39 | if test "$enable_capplet" = "yes"; then |
---|
40 | AC_MSG_CHECKING([for GNOME control center config]) |
---|
41 | GNOME_CC_CFLAGS="`gnome-config --cflags capplet`" |
---|
42 | GNOME_CC_LIBS="`gnome-config --libs capplet`" |
---|
43 | if test $? -ne 0; then |
---|
44 | AC_MSG_RESULT([no]) |
---|
45 | AC_MSG_WARN([Can't run "gnome-config capplet", not building capplet]) |
---|
46 | enable_capplet=no |
---|
47 | else |
---|
48 | AC_MSG_RESULT([yes]) |
---|
49 | AC_SUBST(GNOME_CC_CFLAGS) |
---|
50 | AC_SUBST(GNOME_CC_LIBS) |
---|
51 | fi |
---|
52 | fi |
---|
53 | AM_CONDITIONAL(COMPILE_CAPPLET, test x$enable_capplet = xyes) |
---|
54 | |
---|
55 | case "$host" in |
---|
56 | *-sgi-irix6*) |
---|
57 | need_ldinit=yes |
---|
58 | dnl If we are building N32 binaries, use the _RLDN32_LIST variable. |
---|
59 | /usr/sbin/getabi add "$CFLAGS" > /dev/null 2>&1 |
---|
60 | case $? in |
---|
61 | 3) |
---|
62 | AC_DEFINE(RLD_LIST, "_RLDN32_LIST") |
---|
63 | ;; |
---|
64 | *) |
---|
65 | AC_DEFINE(RLD_LIST, "_RLD_LIST") |
---|
66 | ;; |
---|
67 | esac |
---|
68 | ;; |
---|
69 | *) |
---|
70 | need_ldinit=no |
---|
71 | ;; |
---|
72 | esac |
---|
73 | AM_CONDITIONAL(NEED_LD_INIT_OPTION, test x$need_ldinit = xyes) |
---|
74 | |
---|
75 | AC_DEFINE(DEFAULT_TIMEOUT, 240) |
---|
76 | |
---|
77 | AC_OUTPUT( |
---|
78 | Makefile |
---|
79 | extras/Makefile |
---|
80 | lib/Makefile |
---|
81 | src/Makefile |
---|
82 | capplet/Makefile |
---|
83 | ) |
---|
84 | |
---|