Patchwork [12/20] Add nptl to new feature convencion

login
register
mail settings
Submitter Juan Quintela
Date Aug. 12, 2009, 4:29 p.m.
Message ID <178bb03b94d1f04576d3c5d0bdf9378ea346b947.1250093910.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31213/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 12, 2009, 4:29 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)
Nathan Froyd - Aug. 12, 2009, 5:16 p.m.
On Wed, Aug 12, 2009 at 06:29:49PM +0200, Juan Quintela wrote:
> @@ -660,6 +662,7 @@ echo "  --enable-curl            enable curl connectivity"
>  echo "  --disable-bluez          disable bluez stack connectivity"
>  echo "  --disable-kvm            disable KVM acceleration support"
>  echo "  --disable-nptl           disable usermode NPTL support"
> +echo "  --enable-nptl            disable usermode NPTL support"

This looks like a bad case of cut-and-paste.

-Nathan
Juan Quintela - Aug. 12, 2009, 6:31 p.m.
Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Wed, Aug 12, 2009 at 06:29:49PM +0200, Juan Quintela wrote:
>> @@ -660,6 +662,7 @@ echo "  --enable-curl            enable curl connectivity"
>>  echo "  --disable-bluez          disable bluez stack connectivity"
>>  echo "  --disable-kvm            disable KVM acceleration support"
>>  echo "  --disable-nptl           disable usermode NPTL support"
>> +echo "  --enable-nptl            disable usermode NPTL support"
>
> This looks like a bad case of cut-and-paste.

Well spoted, thanks.

Patch

diff --git a/configure b/configure
index 86cd0ab..0732344 100755
--- a/configure
+++ b/configure
@@ -182,6 +182,7 @@  esac
 brlapi=""
 curl=""
 curses=""
+nptl=""
 pthread=""
 vde=""
 vnc_tls=""
@@ -214,7 +215,6 @@  build_docs="yes"
 uname_release=""
 aio="yes"
 io_thread="no"
-nptl="yes"
 mixemu="no"
 bluez="yes"
 kvm="no"
@@ -527,6 +527,8 @@  for opt do
   ;;
   --disable-nptl) nptl="no"
   ;;
+  --enable-nptl) nptl="yes"
+  ;;
   --enable-mixemu) mixemu="yes"
   ;;
   --disable-pthread) pthread="no"
@@ -660,6 +662,7 @@  echo "  --enable-curl            enable curl connectivity"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
+echo "  --enable-nptl            disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
 echo "  --disable-system         disable all system emulation targets"
 echo "  --enable-linux-user      enable all linux usermode emulation targets"
@@ -835,8 +838,12 @@  case "$cpu" in
   ;;
 esac

-# Check host NPTL support
-cat > $TMPC <<EOF
+
+##########################################
+# NPTL probe
+
+if test "$nptl" != "no" ; then
+  cat > $TMPC <<EOF
 #include <sched.h>
 #include <linux/futex.h>
 void foo()
@@ -847,10 +854,14 @@  void foo()
 }
 EOF

-if compile_object ; then
-  :
-else
-   nptl="no"
+  if compile_object ; then
+    nptl=yes
+  else
+    if test "$nptl" = "yes" ; then
+      feature_not_found "nptl"
+    fi
+    nptl=no
+  fi
 fi

 ##########################################