--- libppd-0.10.orig/configure.in
+++ libppd-0.10/configure.in
@@ -6,25 +6,53 @@
 
 # -Wshadow doesn't work with glib
 WARNS=""
-AC_ARG_ENABLE(debug, [  --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O0 -ggdb3",AC_DEFINE(NDEBUG))
+AC_ARG_ENABLE(debug, [  --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O0 -ggdb3")
+dnl AC_DEFINE(NDEBUG,[],[ debug stuff in libraries ]))
 AC_SUBST(WARNS)
 
 dnl Checks for programs.
 AC_PROG_CC
-AC_PROG_CXX
 AM_PROG_LIBTOOL
-AM_PATH_GLIB(1.2.0,[],[
-  AC_MSG_ERROR(You must have glib installed to compile libppd)
-])
 
-dnl Checks for libraries.
+dnl *******+   choose glib type
+
+dnl this was the old system
+dnl AM_PATH_GLIB(1.2.0,[],[
+dnl   AC_MSG_ERROR(You must have glib installed to compile libppd)
+dnl ])
+
+AC_ARG_WITH(glib,          [  --with-glib=1,2      use GLIB1 or 2 ])
+
+if ! test "x$with_glib" = "x1" -o   "x$with_glib" = "x2" ; then
+  AC_ERROR([--with-glib=$with_glib  is wrong; provide argument, use  =1 or =2])
+fi
+
+if test "x$with_glib" = "x2"   ; then
+  pkg_modules="glib-2.0"
+else
+  pkg_modules="glib >= 1.2.0"
+fi
+
+PKG_CHECK_MODULES(GLIB, [$pkg_modules], :  ,
+  [if test  "x$with_gtk" = "x2" ; then
+   AC_ERROR([ glib is not available ])
+   exit 1
+  fi;])
+
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+
+
+
+dnl ****** Checks for libraries.
 dnl AC_CHECK_LIB(efence,malloc)
 
 dnl Checks for header files.
-AC_HEADER_STDC
+dnl AC_HEADER_STDC
 
 dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
+dnl AC_C_CONST
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(strdup)
