| 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 | |
|---|---|---|---|
@@ -10159,6 +10159,75 @@ $as_echo "no" >&6; } | |||
| 10159 | 10159 | fi | |
| 10160 | 10160 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
| 10161 | 10161 | ||
| 10162 | + save_LIBS=$LIBS | ||
| 10163 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate_time_safe" >&5 | ||
| 10164 | + $as_echo_n "checking for library containing uuid_generate_time_safe... " >&6; } | ||
| 10165 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10166 | + $as_echo_n "(cached) " >&6 | ||
| 10167 | + else | ||
| 10168 | + ac_func_search_save_LIBS=$LIBS | ||
| 10169 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 10170 | + /* end confdefs.h. */ | ||
| 10171 | + | ||
| 10172 | + /* Override any GCC internal prototype to avoid an error. | ||
| 10173 | + Use char because int might match the return type of a GCC | ||
| 10174 | + builtin and then its argument prototype would still apply. */ | ||
| 10175 | + #ifdef __cplusplus | ||
| 10176 | + extern "C" | ||
| 10177 | + #endif | ||
| 10178 | + char uuid_generate_time_safe (); | ||
| 10179 | + int | ||
| 10180 | + main () | ||
| 10181 | + { | ||
| 10182 | + return uuid_generate_time_safe (); | ||
| 10183 | + ; | ||
| 10184 | + return 0; | ||
| 10185 | + } | ||
| 10186 | + _ACEOF | ||
| 10187 | + for ac_lib in '' uuid; do | ||
| 10188 | + if test -z "$ac_lib"; then | ||
| 10189 | + ac_res="none required" | ||
| 10190 | + else | ||
| 10191 | + ac_res=-l$ac_lib | ||
| 10192 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 10193 | + fi | ||
| 10194 | + if ac_fn_c_try_link "$LINENO"; then : | ||
| 10195 | + ac_cv_search_uuid_generate_time_safe=$ac_res | ||
| 10196 | + fi | ||
| 10197 | + rm -f core conftest.err conftest.$ac_objext \ | ||
| 10198 | + conftest$ac_exeext | ||
| 10199 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10200 | + break | ||
| 10201 | + fi | ||
| 10202 | + done | ||
| 10203 | + if ${ac_cv_search_uuid_generate_time_safe+:} false; then : | ||
| 10204 | + | ||
| 10205 | + else | ||
| 10206 | + ac_cv_search_uuid_generate_time_safe=no | ||
| 10207 | + fi | ||
| 10208 | + rm conftest.$ac_ext | ||
| 10209 | + LIBS=$ac_func_search_save_LIBS | ||
| 10210 | + fi | ||
| 10211 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate_time_safe" >&5 | ||
| 10212 | + $as_echo "$ac_cv_search_uuid_generate_time_safe" >&6; } | ||
| 10213 | + ac_res=$ac_cv_search_uuid_generate_time_safe | ||
| 10214 | + if test "$ac_res" != no; then : | ||
| 10215 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 10216 | + | ||
| 10217 | + | ||
| 10218 | + $as_echo "#define HAVE_LIBUUID 1" >>confdefs.h | ||
| 10219 | + , | ||
| 10220 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
| 10221 | + $as_echo "yes" >&6; } | ||
| 10222 | + | ||
| 10223 | + else | ||
| 10224 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 10225 | + $as_echo "no" >&6; } | ||
| 10226 | + | ||
| 10227 | + fi | ||
| 10228 | + | ||
| 10229 | + LIBS=$save_LIBS | ||
| 10230 | + | ||
| 10162 | 10231 | # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) | |
| 10163 | 10232 | # FreeBSD and OpenBSD provides support as well | |
| 10164 | 10233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2945,8 +2945,13 @@ void *x = uuid_generate_time_safe | |||
| 2945 | 2945 | [AC_MSG_RESULT(no)] | |
| 2946 | 2946 | ) | |
| 2947 | 2947 | ||
| 2948 | + # check for libuuid from util-linux | ||
| 2949 | + save_LIBS=$LIBS | ||
| 2950 | + AC_CHECK_LIB([uuid], [uuid_generate_time]) | ||
| 2951 | + LIBS=$save_LIBS | ||
| 2952 | + | ||
| 2948 | 2953 | # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) | |
| 2949 | - # FreeBSD and OpenBSD provides support as well | ||
| 2954 | + # FreeBSD and OpenBSD provides support in libc as well. | ||
| 2950 | 2955 | AC_MSG_CHECKING(for uuid_create) | |
| 2951 | 2956 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <uuid.h>]], [[ | |
| 2952 | 2957 | #ifndef uuid_create | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -604,6 +604,9 @@ | |||
| 604 | 604 | /* Define to 1 if you have the <libutil.h> header file. */ | |
| 605 | 605 | #undef HAVE_LIBUTIL_H | |
| 606 | 606 | ||
| 607 | + /* Define you have libuuid. */ | ||
| 608 | + #undef HAVE_LIBUUID | ||
| 609 | + | ||
| 607 | 610 | /* Define if you have the 'link' function. */ | |
| 608 | 611 | #undef HAVE_LINK | |
| 609 | 612 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1842,15 +1842,15 @@ def detect_multiprocessing(self): | |||
| 1842 | 1842 | ||
| 1843 | 1843 | def detect_uuid(self): | |
| 1844 | 1844 | # Build the _uuid module if possible | |
| 1845 | - uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) | ||
| 1846 | - if uuid_incs is not None: | ||
| 1847 | - if self.compiler.find_library_file(self.lib_dirs, 'uuid'): | ||
| 1848 | - uuid_libs = ['uuid'] | ||
| 1845 | + uuid_h = sysconfig.get_config_var("HAVE_UUID_H") | ||
| 1846 | + uuid_uuid_h = sysconfig.get_config_var("HAVE_UUID_UUID_H") | ||
| 1847 | + if uuid_h or uuid_uuid_h: | ||
| 1848 | + if sysconfig.get_config_var("HAVE_LIBUUID"): | ||
| 1849 | + uuid_libs = ["uuid"] | ||
| 1849 | 1850 | else: | |
| 1850 | 1851 | uuid_libs = [] | |
| 1851 | 1852 | self.add(Extension('_uuid', ['_uuidmodule.c'], | |
| 1852 | - libraries=uuid_libs, | ||
| 1853 | - include_dirs=uuid_incs)) | ||
| 1853 | + libraries=uuid_libs)) | ||
| 1854 | 1854 | else: | |
| 1855 | 1855 | self.missing.append('_uuid') | |
| 1856 | 1856 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments