Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-40900: uuid module build fix on FreeBSD proposal.
Adding a new --with-uuid configure directive.
  • Loading branch information
devnexen committed Jun 8, 2020
commit 4ff23c7a3439edd9c16360f3863a03afaaa506c8
139 changes: 84 additions & 55 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ with_openssl
with_ssl_default_suites
with_builtin_hashlib_hashes
with_experimental_isolated_subinterpreters
with_uuid
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1588,6 +1589,7 @@ Optional Packages:
--with-experimental-isolated-subinterpreters
better isolate subinterpreters, experimental build
mode (default is no)
--with-uuid=DIR override rott of libuuid to DIR

Some influential environment variables:
MACHDEP name for machine-dependent library files
Expand Down Expand Up @@ -9819,114 +9821,141 @@ _ACEOF
fi
# Dynamic linking for HP-UX

uuiddirs="/usr /usr/local /usr/pkg"
if test "${with_uuid+set}" = set; then :
withval=$with_uuid;
case "$withval" in
"" | y | ye | yes | n | no)
as_fn_error $? "Invalid --with-uuid value" "$LINENO" 5
;;
*) uuiddirs="$withval"
;;
esac
fi

# checks for uuid.h location
for ac_header in uuid/uuid.h uuid.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
found=false
for uuiddir in $uuiddirs; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid.h header" >&5
$as_echo_n "checking for uuid.h header... " >&6; }
if test -f "$uuiddir/include/uuid.h"; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
#define HAVE_UUID_H 1
_ACEOF

fi

done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
# FreeBSD and OpenBSD provides support as well
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
$as_echo_n "checking for uuid_create... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <uuid/uuid.h>
#include <uuid.h>
int
main ()
{

#ifndef uuid_generate_time_safe
void *x = uuid_generate_time_safe
#ifndef uuid_create
void *x = uuid_create
#endif

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_c_try_compile "$LINENO"; then :

$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
found=true
break
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
# FreeBSD and OpenBSD provides support as well
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
$as_echo_n "checking for uuid_create... " >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
# stream in big-endian byte-order
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
$as_echo_n "checking for uuid_enc_be... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <uuid.h>
int
main ()
{

#ifndef uuid_create
void *x = uuid_create
#ifndef uuid_enc_be
void *x = uuid_enc_be
#endif

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_c_try_compile "$LINENO"; then :

$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
found=true
break
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
# stream in big-endian byte-order
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
$as_echo_n "checking for uuid_enc_be... " >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid/uuid.h header" >&5
$as_echo_n "checking for uuid/uuid.h header... " >&6; }
if test -f "$uuiddir/include/uuid/uuid.h"; then
cat >>confdefs.h <<_ACEOF
#define HAVE_UUID_UUID_H 1
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <uuid.h>
#include <uuid/uuid.h>
int
main ()
{

#ifndef uuid_enc_be
void *x = uuid_enc_be
#ifndef uuid_generate_time_safe
void *x = uuid_generate_time_safe
#endif

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_c_try_compile "$LINENO"; then :

$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
found=true
break
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
if $found; then
CPPFLAGS="-I$uuiddir/include $CPPFLAGS"
LDFLAGS="-L$uuidir/lib $LDFLAGS"
break
fi
done



# 'Real Time' functions on Solaris
# posix4 on Solaris 2.6
Expand Down