aboutsummaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-14 14:19:42 +0000
committerRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-14 14:19:42 +0000
commit35ab4e22797545b4ed3f5430fb18d9ca002bf373 (patch)
treea9e0f7e7dfaf93c851fd4779000b7dcc66d3a80f /tools/configure
parent5ca9053cee7d508fcabaf9a591c26930c0957aaa (diff)
downloadxen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.tar.gz
xen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.tar.bz2
xen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.zip
autoconf: check for uuid.h or uuid/uuid.h with -luuid
Check for uuid/uuid.h and if found check for -luuid usability (Linux case), if not, check for uuid (NetBSD). One of this tests has to succeed to be able to build Xen tools. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure104
1 files changed, 48 insertions, 56 deletions
diff --git a/tools/configure b/tools/configure
index 50426f10aa..0678d0437d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -6270,25 +6270,64 @@ if test x"${XGETTEXT}" == x"no"
then
as_fn_error $? "Unable to find xgettext, please install xgettext" "$LINENO" 5
fi
-if test "x$host_os" == "xlinux-gnu"
-then
- ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
+
+ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_clear in -luuid" >&5
+$as_echo_n "checking for uuid_clear in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_clear+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_clear ();
+int
+main ()
+{
+return uuid_clear ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_uuid_uuid_clear=yes
else
- as_fn_error $? "cannot find uuid headers" "$LINENO" 5
+ ac_cv_lib_uuid_uuid_clear=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_clear" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_clear" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_clear" = x""yes; then :
+ libuuid="y"
fi
-else
- ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
-if test "x$ac_cv_header_uuid_h" = x""yes; then :
+fi
-else
- as_fn_error $? "cannot find uuid headers" "$LINENO" 5
+
+ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
+if test "x$ac_cv_header_uuid_h" = x""yes; then :
+ libuuid="y"
fi
+if test "$libuuid" != "y"; then :
+
+ as_fn_error $? "cannot find a valid uuid library" "$LINENO" 5
+
fi
@@ -6915,53 +6954,6 @@ _ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_clear in -luuid" >&5
-$as_echo_n "checking for uuid_clear in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_clear+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_clear ();
-int
-main ()
-{
-return uuid_clear ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_uuid_uuid_clear=yes
-else
- ac_cv_lib_uuid_uuid_clear=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_clear" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_clear" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_clear" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
-
- LIBS="-luuid $LIBS"
-
-else
- as_fn_error $? "Could not find libuuid" "$LINENO" 5
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_alloc in -lyajl" >&5
$as_echo_n "checking for yajl_alloc in -lyajl... " >&6; }
if test "${ac_cv_lib_yajl_yajl_alloc+set}" = set; then :