-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.in
102 lines (84 loc) · 2.25 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
102
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
AC_PROG_CXX
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"
AC_SUBST(WIDGET_LIBS)
AC_SUBST(WIDGET_OBJS)
fi
AC_ARG_ENABLE(gtk,
[ --enable-gtk build with the GTK widget set])
if test "$enable_gtk" != "no"; then
AC_CHECK_PROG(PKGCONFIG, pkg-config, yes, no)
if test "X$PKGCONFIG" = X"yes"; then
AC_DEFINE(USE_GTK)
GTK_CFLAGS="`pkg-config --cflags gtk+-2.0`"
WIDGET_LIBS="$WIDGET_LIBS `pkg-config --libs gtk+-2.0`"
WIDGET_OBJS="$WIDGET_OBJS gtk.o"
fi
fi
AC_SUBST(GTK_CFLAGS)
AC_OUTPUT(Makefile)