| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + ``setup.py`` now uses values from configure script to build the ``_uuid`` | ||
| 2 | + extension module. Configure now detects util-linux's ``libuuid``, too. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10120,6 +10120,75 @@ $as_echo "no" >&6; } | |||
| 10120 | 10120 | fi | |
| 10121 | 10121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
| 10122 | 10122 | ||
| 10123 | + save_LIBS=$LIBS | ||
| 10124 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate_time_safe" >&5 | ||
| 10125 | + $as_echo_n "checking for library containing uuid_generate_time_safe... " >&6; } | ||
| 10126 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10127 | + $as_echo_n "(cached) " >&6 | ||
| 10128 | + else | ||
| 10129 | + ac_func_search_save_LIBS=$LIBS | ||
| 10130 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 10131 | + /* end confdefs.h. */ | ||
| 10132 | + | ||
| 10133 | + /* Override any GCC internal prototype to avoid an error. | ||
| 10134 | + Use char because int might match the return type of a GCC | ||
| 10135 | + builtin and then its argument prototype would still apply. */ | ||
| 10136 | + #ifdef __cplusplus | ||
| 10137 | + extern "C" | ||
| 10138 | + #endif | ||
| 10139 | + char uuid_generate_time_safe (); | ||
| 10140 | + int | ||
| 10141 | + main () | ||
| 10142 | + { | ||
| 10143 | + return uuid_generate_time_safe (); | ||
| 10144 | + ; | ||
| 10145 | + return 0; | ||
| 10146 | + } | ||
| 10147 | + _ACEOF | ||
| 10148 | + for ac_lib in '' uuid; do | ||
| 10149 | + if test -z "$ac_lib"; then | ||
| 10150 | + ac_res="none required" | ||
| 10151 | + else | ||
| 10152 | + ac_res=-l$ac_lib | ||
| 10153 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 10154 | + fi | ||
| 10155 | + if ac_fn_c_try_link "$LINENO"; then : | ||
| 10156 | + ac_cv_search_uuid_generate_time_safe=$ac_res | ||
| 10157 | + fi | ||
| 10158 | + rm -f core conftest.err conftest.$ac_objext \ | ||
| 10159 | + conftest$ac_exeext | ||
| 10160 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10161 | + break | ||
| 10162 | + fi | ||
| 10163 | + done | ||
| 10164 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10165 | + | ||
| 10166 | + else | ||
| 10167 | + ac_cv_search_uuid_generate_time_safe=no | ||
| 10168 | + fi | ||
| 10169 | + rm conftest.$ac_ext | ||
| 10170 | + LIBS=$ac_func_search_save_LIBS | ||
| 10171 | + fi | ||
| 10172 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate_time_safe" >&5 | ||
| 10173 | + $as_echo "$ac_cv_search_uuid_generate_time_safe" >&6; } | ||
| 10174 | + ac_res=$ac_cv_search_uuid_generate_time_safe | ||
| 10175 | + if test "$ac_res" != no; then : | ||
| 10176 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 10177 | + | ||
| 10178 | + | ||
| 10179 | + $as_echo "#define HAVE_LIBUUID 1" >>confdefs.h | ||
| 10180 | + , | ||
| 10181 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
| 10182 | + $as_echo "yes" >&6; } | ||
| 10183 | + | ||
| 10184 | + else | ||
| 10185 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 10186 | + $as_echo "no" >&6; } | ||
| 10187 | + | ||
| 10188 | + fi | ||
| 10189 | + | ||
| 10190 | + LIBS=$save_LIBS | ||
| 10191 | + | ||
| 10123 | 10192 | # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) | |
| 10124 | 10193 | # FreeBSD and OpenBSD provides support as well | |
| 10125 | 10194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2911,8 +2911,13 @@ void *x = uuid_generate_time_safe | |||
| 2911 | 2911 | [AC_MSG_RESULT(no)] | |
| 2912 | 2912 | ) | |
| 2913 | 2913 | ||
| 2914 | + # check for libuuid from util-linux | ||
| 2915 | + save_LIBS=$LIBS | ||
| 2916 | + AC_CHECK_LIB([uuid], [uuid_generate_time]) | ||
| 2917 | + LIBS=$save_LIBS | ||
| 2918 | + | ||
| 2914 | 2919 | # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) | |
| 2915 | - # FreeBSD and OpenBSD provides support as well | ||
| 2920 | + # FreeBSD and OpenBSD provides support in libc as well. | ||
| 2916 | 2921 | AC_MSG_CHECKING(for uuid_create) | |
| 2917 | 2922 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <uuid.h>]], [[ | |
| 2918 | 2923 | #ifndef uuid_create | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -628,6 +628,9 @@ | |||
| 628 | 628 | /* Define to 1 if you have the <libutil.h> header file. */ | |
| 629 | 629 | #undef HAVE_LIBUTIL_H | |
| 630 | 630 | ||
| 631 | + /* Define you have libuuid. */ | ||
| 632 | + #undef HAVE_LIBUUID | ||
| 633 | + | ||
| 631 | 634 | /* Define if you have the 'link' function. */ | |
| 632 | 635 | #undef HAVE_LINK | |
| 633 | 636 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1863,15 +1863,15 @@ def detect_multiprocessing(self): | |||
| 1863 | 1863 | ||
| 1864 | 1864 | def detect_uuid(self): | |
| 1865 | 1865 | # Build the _uuid module if possible | |
| 1866 | - uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) | ||
| 1867 | - if uuid_incs is not None: | ||
| 1868 | - if self.compiler.find_library_file(self.lib_dirs, 'uuid'): | ||
| 1869 | - uuid_libs = ['uuid'] | ||
| 1866 | + uuid_h = sysconfig.get_config_var("HAVE_UUID_H") | ||
| 1867 | + uuid_uuid_h = sysconfig.get_config_var("HAVE_UUID_UUID_H") | ||
| 1868 | + if uuid_h or uuid_uuid_h: | ||
| 1869 | + if sysconfig.get_config_var("HAVE_LIBUUID"): | ||
| 1870 | + uuid_libs = ["uuid"] | ||
| 1870 | 1871 | else: | |
| 1871 | 1872 | uuid_libs = [] | |
| 1872 | 1873 | self.add(Extension('_uuid', ['_uuidmodule.c'], | |
| 1873 | - libraries=uuid_libs, | ||
| 1874 | - include_dirs=uuid_incs)) | ||
| 1874 | + libraries=uuid_libs)) | ||
| 1875 | 1875 | else: | |
| 1876 | 1876 | self.missing.append('_uuid') | |
| 1877 | 1877 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments