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 15 16dnl Checks for header files. 17AC_PATH_XTRA 18AC_HEADER_STDC 19AC_CHECK_HEADERS(unistd.h) 20 21dnl Checks for typedefs, structures, and compiler characteristics. 22AC_C_CONST 23 24AC_ARG_ENABLE(motif, 25 [ --enable-motif build with the Motif widget set]) 26 27if test "$enable_motif" != "no"; then 28 saved_cflags="$CFLAGS" 29 saved_libs="$LIBS" 30 CFLAGS="$CFLAGS $X_CFLAGS" 31 LIBS="$LIBS $X_LIBS $X_PRE_LIBS" 32 AC_CHECK_LIB(Xm, XmGetPixmap, motif=yes, , -lXt -lX11) 33 34 if test "X$motif" = X"yes"; then 35 AC_DEFINE(USE_MOTIF) 36 WIDGET_LIBS="$WIDGET_LIBS -lXm" 37 if test "X$libxp" = X"yes"; then 38 WIDGET_LIBS="$WIDGET_LIBS -lXp -lXext" 39 fi 40 WIDGET_OBJS="$WIDGET_OBJS x11-motif.o" 41 fi 42 43 CFLAGS=$saved_cflags 44 LIBS=$saved_libs 45fi 46 47AC_ARG_ENABLE(athena, 48 [ --enable-athena build with the Athena widget set]) 49 50if test "$enable_athena" != "no"; then 51 saved_cflags="$CFLAGS" 52 saved_libs="$LIBS" 53 CFLAGS="$CFLAGS $X_CFLAGS" 54 LIBS="$LIBS $X_LIBS $X_PRE_LIBS" 55 AC_CHECK_LIB(Xaw3d, XawInitializeWidgetSet, 56 [athena=yes athena3d=yes], , 57 -lXmu -lXt -lX11) 58 59 if test "X$athena" != X"yes"; then 60 AC_CHECK_LIB(Xaw, XawInitializeWidgetSet, athena=yes, , 61 -lXmu -lXt -lX11) 62 fi 63 64 if test "X$athena" = X"yes"; then 65 AC_DEFINE(USE_ATHENA) 66 if test "X$athena3d" = X"yes"; then 67 xawlib=-lXaw3d 68 else 69 xawlib=-lXaw 70 fi 71 WIDGET_LIBS="$WIDGET_LIBS $xawlib -lXmu" 72 WIDGET_OBJS="$WIDGET_OBJS x11-athena.o" 73 fi 74 75 CFLAGS=$saved_cflags 76 LIBS=$saved_libs 77fi 78 79if test "X$motif" = X"yes" -o "X$athena" = X"yes"; then 80 WIDGET_LIBS="$WIDGET_LIBS -lXt -lXpm -lX11" 81 WIDGET_OBJS="$WIDGET_OBJS x11.o" 82fi 83 84AC_ARG_ENABLE(gtk, 85 [ --enable-gtk build with the GTK widget set]) 86 87if test "$enable_gtk" != "no"; then 88 PKG_CHECK_MODULES([GTK], [gtk+-2.0]) 89 90 if test $pkg_failed = no; then 91 AC_DEFINE(USE_GTK) 92 WIDGET_LIBS="$WIDGET_LIBS $GTK_LIBS" 93 WIDGET_OBJS="$WIDGET_OBJS gtk.o" 94 AC_SUBST(GTK_CFLAGS) 95 fi 96fi 97 98AC_SUBST(WIDGET_LIBS) 99AC_SUBST(WIDGET_OBJS) 100 101AC_OUTPUT(Makefile) 102