You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

102 lines
2.2 KiB

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