--- configure.orig	Wed Oct 19 10:36:26 2005
+++ configure	Wed Oct 19 18:13:12 2005
@@ -2916,7 +2916,7 @@
 fi
 
 
-if test "$GXX" = "yes" && expr "$CXXFLAGS" : '.*-O' > /dev/null
+if test "$GXX" = "yes" && expr -- "$CXXFLAGS" : '.*-O' > /dev/null
 then
   CXXFLAGS="$CXXFLAGS -fno-exceptions"
 fi
@@ -9975,13 +9975,6 @@
 	;;
     esac
 
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
     # Update the list of available tags.
     if test -n "$tagname"; then
       echo appending configuration tag \"$tagname\" to $ofile
@@ -19872,6 +19865,10 @@
 
 # This can be used to rebuild libtool when needed
 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+save_CC="$CC"
+CC="$CXX"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+CC="$save_CC"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -23160,7 +23157,7 @@
   CURSES_LIB=-lncurses
 
 cat >>confdefs.h <<\_ACEOF
-#define CURSES_HEADER <ncurses/curses.h>
+#define CURSES_HEADER <ncurses/ncurses.h>
 _ACEOF
 
 else
@@ -23341,7 +23338,7 @@
 
 
 cat >>confdefs.h <<\_ACEOF
-#define CURSES_HEADER <curses.h>
+#define CURSES_HEADER <ncurses/ncurses.h>
 _ACEOF
 
 
