Add uuid in configure file 10/306710/2 accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x tizen accepted/tizen/unified/20240227.120122 accepted/tizen/unified/toolchain/20240311.070002 accepted/tizen/unified/x/20240228.011948
authorANZ1217 <chihun.jeong@samsung.com>
Mon, 26 Feb 2024 12:16:23 +0000 (21:16 +0900)
committerANZ1217 <chihun.jeong@samsung.com>
Mon, 26 Feb 2024 12:51:32 +0000 (21:51 +0900)
Fix bug EFL cannot be built due to absence of UUID library
This commit should be maintained after the next library upgrade.
Please recommit this content after library update.

Change-Id: I60297cbe33b0ceb6863eb56abddd040939289c1f

configure
configure.ac

index 7d3a599..8dcdb1f 100755 (executable)
--- a/configure
+++ b/configure
@@ -704,6 +704,8 @@ PKG_EXPAT_CFLAGS
 HAVE_XMLPARSE_H
 EXPAT_LIBS
 EXPAT_CFLAGS
+UUID_LIBS
+UUID_CFLAGS
 FREETYPE_PCF_LONG_FAMILY_NAMES_FALSE
 FREETYPE_PCF_LONG_FAMILY_NAMES_TRUE
 FREETYPE_LIBS
@@ -942,6 +944,8 @@ CPP
 CC_FOR_BUILD
 FREETYPE_CFLAGS
 FREETYPE_LIBS
+UUID_CFLAGS
+UUID_LIBS
 EXPAT_CFLAGS
 EXPAT_LIBS
 LIBXML2_CFLAGS
@@ -1674,6 +1678,8 @@ Some influential environment variables:
               C compiler flags for FREETYPE, overriding pkg-config
   FREETYPE_LIBS
               linker flags for FREETYPE, overriding pkg-config
+  UUID_CFLAGS C compiler flags for UUID, overriding pkg-config
+  UUID_LIBS   linker flags for UUID, overriding pkg-config
   EXPAT_CFLAGS
               C compiler flags for EXPAT, overriding pkg-config
   EXPAT_LIBS  linker flags for EXPAT, overriding pkg-config
@@ -18902,6 +18908,122 @@ LIBS="$fontconfig_save_libs"
 CFLAGS="$fontconfig_save_cflags"
 
 #
+# Check for uuid
+#
+if test "$os_win32" != "yes"; then
+       use_pkgconfig_for_uuid=yes
+       if test -n "${UUID_LIBS}"; then
+               save_UUID_LIBS=$UUID_LIBS
+       fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5
+$as_echo_n "checking for UUID... " >&6; }
+
+if test -n "$UUID_CFLAGS"; then
+    pkg_cv_UUID_CFLAGS="$UUID_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "uuid") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$UUID_LIBS"; then
+    pkg_cv_UUID_LIBS="$UUID_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "uuid") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid" 2>&1`
+        else
+               UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$UUID_PKG_ERRORS" >&5
+
+       use_pkgconfig_for_uuid=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       use_pkgconfig_for_uuid=no
+else
+       UUID_CFLAGS=$pkg_cv_UUID_CFLAGS
+       UUID_LIBS=$pkg_cv_UUID_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       use_pkgconfig_for_uuid=yes
+fi
+       if test "x$use_pkgconfig_for_uuid" = "xno"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking where uuid functions comes from" >&5
+$as_echo_n "checking where uuid functions comes from... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <uuid/uuid.h>
+int
+main ()
+{
+uuid_t a; uuid_generate(a);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: builtin" >&5
+$as_echo "builtin" >&6; }
+                        UUID_CFLAGS=""
+                        UUID_LIBS=""
+
+else
+  as_fn_error $? "
+*** uuid is required. install util-linux.
+                       " "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       else
+               if test -z "${save_UUID_LIBS+x}" && test "x${UUID_LIBS}" != "x"; then
+                       PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY uuid"
+               fi
+       fi
+else
+       UUID_CFLAGS=""
+       UUID_LIBS=""
+fi
+
+#
 # Check expat configuration
 #
 
index f9a2c36..c5e7e69 100644 (file)
@@ -339,6 +339,39 @@ LIBS="$fontconfig_save_libs"
 CFLAGS="$fontconfig_save_cflags"
 
 #
+# Check for uuid
+#
+if test "$os_win32" != "yes"; then
+       use_pkgconfig_for_uuid=yes
+       if test -n "${UUID_LIBS}"; then
+               save_UUID_LIBS=$UUID_LIBS
+       fi
+       PKG_CHECK_MODULES([UUID], [uuid],
+                         [use_pkgconfig_for_uuid=yes],
+                         [use_pkgconfig_for_uuid=no])
+       if test "x$use_pkgconfig_for_uuid" = "xno"; then
+               AC_MSG_CHECKING([where uuid functions comes from])
+               AC_TRY_LINK([#include <uuid/uuid.h>],
+                       [uuid_t a; uuid_generate(a);],
+                       [AC_MSG_RESULT([builtin])
+                        UUID_CFLAGS=""
+                        UUID_LIBS=""
+                       ],[AC_MSG_ERROR([
+*** uuid is required. install util-linux.
+                       ])])
+       else
+               if test -z "${save_UUID_LIBS+x}" && test "x${UUID_LIBS}" != "x"; then
+                       PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY uuid"
+               fi
+       fi
+else
+       UUID_CFLAGS=""
+       UUID_LIBS=""
+fi
+AC_SUBST(UUID_CFLAGS)
+AC_SUBST(UUID_LIBS)
+
+#
 # Check expat configuration
 #
 AC_ARG_WITH(expat,