-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.in
101 lines (82 loc) · 2.17 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Bucket.h)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_YACC
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Checks for header files.
AC_PATH_XTRA
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_ARG_ENABLE(motif,
[ --enable-motif build with the Motif widget set])
if test "$enable_motif" != "no"; then
saved_cflags="$CFLAGS"
saved_libs="$LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
LIBS="$LIBS $X_LIBS $X_PRE_LIBS"
AC_CHECK_LIB(Xm, XmGetPixmap, motif=yes, , -lXt -lX11)
if test "X$motif" = X"yes"; then
AC_DEFINE(USE_MOTIF)
WIDGET_LIBS="$WIDGET_LIBS -lXm"
if test "X$libxp" = X"yes"; then
WIDGET_LIBS="$WIDGET_LIBS -lXp -lXext"
fi
WIDGET_OBJS="$WIDGET_OBJS x11-motif.o"
fi
CFLAGS=$saved_cflags
LIBS=$saved_libs
fi
AC_ARG_ENABLE(athena,
[ --enable-athena build with the Athena widget set])
if test "$enable_athena" != "no"; then
saved_cflags="$CFLAGS"
saved_libs="$LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
LIBS="$LIBS $X_LIBS $X_PRE_LIBS"
AC_CHECK_LIB(Xaw3d, XawInitializeWidgetSet,
[athena=yes athena3d=yes], ,
-lXmu -lXt -lX11)
if test "X$athena" != X"yes"; then
AC_CHECK_LIB(Xaw, XawInitializeWidgetSet, athena=yes, ,
-lXmu -lXt -lX11)
fi
if test "X$athena" = X"yes"; then
AC_DEFINE(USE_ATHENA)
if test "X$athena3d" = X"yes"; then
xawlib=-lXaw3d
else
xawlib=-lXaw
fi
WIDGET_LIBS="$WIDGET_LIBS $xawlib -lXmu"
WIDGET_OBJS="$WIDGET_OBJS x11-athena.o"
fi
CFLAGS=$saved_cflags
LIBS=$saved_libs
fi
if test "X$motif" = X"yes" -o "X$athena" = X"yes"; then
WIDGET_LIBS="$WIDGET_LIBS -lXt -lXpm -lX11"
WIDGET_OBJS="$WIDGET_OBJS x11.o"
fi
AC_ARG_ENABLE(gtk,
[ --enable-gtk build with the GTK widget set])
if test "$enable_gtk" != "no"; then
PKG_CHECK_MODULES([GTK], [gtk+-2.0])
if test $pkg_failed = no; then
AC_DEFINE(USE_GTK)
WIDGET_LIBS="$WIDGET_LIBS $GTK_LIBS"
WIDGET_OBJS="$WIDGET_OBJS gtk.o"
AC_SUBST(GTK_CFLAGS)
fi
fi
AC_SUBST(WIDGET_LIBS)
AC_SUBST(WIDGET_OBJS)
AC_OUTPUT(Makefile)