1dnl Process this file with autoconf to produce a configure script. 2AC_INIT(Bucket.h) 3 4AC_CONFIG_HEADER(config.h) 5 6dnl Checks for programs. 7AC_PROG_YACC 8AC_PROG_CC 9AC_PROG_CPP 10AC_PROG_LEX 11AC_PROG_INSTALL 12AC_PROG_LN_S 13AC_PROG_MAKE_SET 14AC_PROG_RANLIB 15AC_PROG_CXX 16 17dnl Checks for header files. 18AC_PATH_XTRA 19AC_HEADER_STDC 20AC_CHECK_HEADERS(unistd.h) 21 22dnl Checks for typedefs, structures, and compiler characteristics. 23AC_C_CONST 24 25AC_ARG_ENABLE(motif, 26 [ --enable-motif build with the Motif widget set]) 27 28if test "$enable_motif" != "no"; then 29 saved_cflags="$CFLAGS" 30 saved_libs="$LIBS" 31 CFLAGS="$CFLAGS $X_CFLAGS" 32 LIBS="$LIBS $X_LIBS $X_PRE_LIBS" 33 AC_CHECK_LIB(Xm, XmGetPixmap, motif=yes, , -lXt -lX11) 34 35 if test "X$motif" = X"yes"; then 36 AC_DEFINE(USE_MOTIF) 37 WIDGET_LIBS="$WIDGET_LIBS -lXm" 38 if test "X$libxp" = X"yes"; then 39 WIDGET_LIBS="$WIDGET_LIBS -lXp -lXext" 40 fi 41 WIDGET_OBJS="$WIDGET_OBJS x11-motif.o" 42 fi 43 44 CFLAGS=$saved_cflags 45 LIBS=$saved_libs 46fi 47 48AC_ARG_ENABLE(athena, 49 [ --enable-athena build with the Athena widget set]) 50 51if test "$enable_athena" != "no"; then 52 saved_cflags="$CFLAGS" 53 saved_libs="$LIBS" 54 CFLAGS="$CFLAGS $X_CFLAGS" 55 LIBS="$LIBS $X_LIBS $X_PRE_LIBS" 56 AC_CHECK_LIB(Xaw3d, XawInitializeWidgetSet, 57 [athena=yes athena3d=yes], , 58 -lXmu -lXt -lX11) 59 60 if test "X$athena" != X"yes"; then 61 AC_CHECK_LIB(Xaw, XawInitializeWidgetSet, athena=yes, , 62 -lXmu -lXt -lX11) 63 fi 64 65 if test "X$athena" = X"yes"; then 66 AC_DEFINE(USE_ATHENA) 67 if test "X$athena3d" = X"yes"; then 68 xawlib=-lXaw3d 69 else 70 xawlib=-lXaw 71 fi 72 WIDGET_LIBS="$WIDGET_LIBS $xawlib -lXmu" 73 WIDGET_OBJS="$WIDGET_OBJS x11-athena.o" 74 fi 75 76 CFLAGS=$saved_cflags 77 LIBS=$saved_libs 78fi 79 80if test "X$motif" = X"yes" -o "X$athena" = X"yes"; then 81 WIDGET_LIBS="$WIDGET_LIBS -lXt -lXpm -lX11" 82 WIDGET_OBJS="$WIDGET_OBJS x11.o" 83 AC_SUBST(WIDGET_LIBS) 84 AC_SUBST(WIDGET_OBJS) 85fi 86 87AC_ARG_ENABLE(gtk, 88 [ --enable-gtk build with the GTK widget set]) 89 90if test "$enable_gtk" != "no"; then 91 AC_CHECK_PROG(GTKCONFIG, gtk-config, yes, no) 92 93 if test "X$GTKCONFIG" = X"yes"; then 94 AC_DEFINE(USE_GTK) 95 GTK_CFLAGS="`gtk-config --cflags`" 96 WIDGET_LIBS="$WIDGET_LIBS `gtk-config --libs`" 97 WIDGET_OBJS="$WIDGET_OBJS gtk.o" 98 fi 99fi 100AC_SUBST(GTK_CFLAGS) 101 102AC_OUTPUT(Makefile) 103