<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40739 >

The Eclipse Autotools plugin assumes that an autogen.sh script doesn't
run the configure script, so it always runs the configure script itself
after running autogen.sh. With Freeciv this leads to a duplicated
configure run plus it doesn't work with a separate build directory,
because autogen.sh doesn't get told about the separate build directory
and so the second run of the configure script in the separate build
directory fails, because Freeciv was already configured outside the build
directory by the first configure run.

To solve this problem, the attached patch adds a "--no-configure-run"
option to the autogen.sh script that can be used by the Autotools plugin
and makes autogen.sh quit before running configure.

Index: autogen.sh
===================================================================
--- autogen.sh	(revision 15240)
+++ autogen.sh	(working copy)
@@ -19,6 +19,7 @@
 FC_USE_NLS=yes
 FC_USE_NEWAUTOCONF=yes
 FC_HELP=no
+FC_RUN_CONFIGURE=yes
 
 # Leave out NLS checks
 for NAME in $@ ; do
@@ -29,6 +30,9 @@
     echo "! nls checks disabled"
     FC_USE_NLS=no
   fi
+  if [ "x$NAME" = "x--no-configure-run" ]; then 
+    FC_RUN_CONFIGURE=no
+  fi
   if [ "x$NAME" = "x--disable-autoconf2.52" ]; then 
     echo "! forcing old autoconf configuration"
     FC_USE_NEWAUTOCONF=no
@@ -212,6 +216,13 @@
 echo "+ removing config.cache ... "
 rm -f config.cache
 
+# exit if we did --no-configure-run
+if [ "$FC_RUN_CONFIGURE" = "no" ]; then
+  echo
+  echo "Now type 'configure' to configure $package."
+  exit 0
+fi
+
 echo "+ running configure ... "
 echo
 if [ -z "$FC_NEWARGLINE" ]; then
Index: autogen.sh
===================================================================
--- autogen.sh	(revision 15545)
+++ autogen.sh	(working copy)
@@ -19,6 +19,7 @@
 FC_USE_NLS=yes
 FC_USE_NEWAUTOCONF=yes
 FC_HELP=no
+FC_RUN_CONFIGURE=yes
 
 # Leave out NLS checks
 for NAME in $@ ; do
@@ -29,6 +30,9 @@
     echo "! nls checks disabled"
     FC_USE_NLS=no
   fi
+  if [ "x$NAME" = "x--no-configure-run" ]; then 
+    FC_RUN_CONFIGURE=no
+  fi
   FC_NEWARGLINE="$FC_NEWARGLINE $NAME"
 done
 
@@ -289,6 +293,13 @@
 echo "+ removing config.cache ... "
 rm -f config.cache
 
+# exit if we did --no-configure-run
+if [ "$FC_RUN_CONFIGURE" = "no" ]; then
+  echo
+  echo "Now type 'configure' to configure $package."
+  exit 0
+fi
+ 
 echo "+ running configure ... "
 echo
 if [ -z "$FC_NEWARGLINE" ]; then
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to