$NetBSD: patch-ac,v 1.3 2006/01/02 18:08:35 joerg Exp $

--- configure.orig	2002-10-01 03:34:27.000000000 +0000
+++ configure
@@ -19,6 +19,8 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-libs=DIRS        alternative spelling of --with-libraries"
 ac_help="$ac_help
+  --disable-readline      disable readline support"
+ac_help="$ac_help
   --enable-locale         enable locale support"
 ac_help="$ac_help
   --enable-recode         enable character set recode support"
@@ -53,6 +55,8 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-python           build Python interface module"
 ac_help="$ac_help
+  --with-python-compile   byte-compile modules if Python is enabled"
+ac_help="$ac_help
   --with-java             build JDBC interface and Java tools"
 ac_help="$ac_help
   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]"
@@ -694,6 +698,7 @@ case $host_os in
   darwin*) template=darwin ;;
     dgux*) template=dgux ;;
  freebsd*) template=freebsd ;;
+dragonfly*) template=dragonfly ;;
     hpux*) template=hpux ;;
     irix*) template=irix5 ;;
    linux*) template=linux ;;
@@ -817,6 +822,32 @@ fi
 
 
 #
+# Readline support
+#
+echo $ac_n "checking whether to build with readline support""... $ac_c" 1>&6
+echo "configure:828: checking whether to build with readline support" >&5
+# Check whether --enable-readline was given
+if test x"${enable_readline+set}" = xset; then
+  case $enable_readline in
+    yes)
+      :
+      ;;
+    no)
+      :
+      ;;
+    *)
+      enableval=$enable_readline
+      { echo "configure: error: no argument expected for --enable-readline option" 1>&2; exit 1; }
+      ;;
+  esac # $enable_readline
+else
+  enable_readline=yes
+
+fi
+echo "$ac_t""$enable_readline" 1>&6
+
+
+#
 # Locale (--enable-locale)
 #
 echo $ac_n "checking whether to build with locale support""... $ac_c" 1>&6
@@ -1859,6 +1890,35 @@ fi
 echo "$ac_t""$with_python" 1>&6
 
 
+# If python is enabled (above), then optionally byte-compile the modules.
+echo $ac_n "checking whether to byte-compile Python modules""... $ac_c" 1>&6
+echo "configure:1895: checking whether to byte-compile Python modules" >&5
+if test "$with_python" = yes; then
+  # Check whether --with-python_compile was given
+if test x"${with_python_compile+set}" = xset; then
+  case $with_python_compile in
+    yes)
+      :
+      ;;
+    no)
+      :
+      ;;
+    *)
+      withval=$with_python_compile
+      { echo "configure: error: no argument expected for --with-python_compile option" 1>&2; exit 1; }
+      ;;
+  esac # $with_python_compile
+else
+  with_python_compile=no
+
+fi
+else
+  with_python_compile=no
+fi
+echo "$ac_t""$with_python_compile" 1>&6
+
+
+
 #
 # Optionally build the Java/JDBC tools
 #
@@ -2287,6 +2347,7 @@ fi
 case $host_os in
     freebsd1*|freebsd2*) elf=no;;
     freebsd3*|freebsd4*) elf=yes;;
+    dragonfly*) elf=yes;;
 esac
 
 cat > conftest.$ac_ext <<EOF
@@ -3282,9 +3343,10 @@ fi
 ## Libraries
 ##
 
+if test "$enable_readline" = yes; then
 
 echo $ac_n "checking for readline""... $ac_c" 1>&6
-echo "configure:3288: checking for readline" >&5
+echo "configure:3348: checking for readline" >&5
 
 if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3408,6 +3470,7 @@ EOF
 else :
   
 fi
+fi
 
 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
 then
@@ -9007,6 +9070,7 @@ s%@with_tcl@%$with_tcl%g
 s%@with_tk@%$with_tk%g
 s%@with_perl@%$with_perl%g
 s%@with_python@%$with_python%g
+s%@with_python_compile@%$with_python_compile%g
 s%@ANT@%$ANT%g
 s%@with_java@%$with_java%g
 s%@with_krb4@%$with_krb4%g
