Skip to content

Commit

Permalink
Add --disable-libuuid to autoconf (#3100)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimying committed Oct 19, 2022
1 parent 6f2ea3a commit 0b0488f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
21 changes: 19 additions & 2 deletions aconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_libuuid
enable_floating_point
enable_kqueue
enable_epoll
Expand Down Expand Up @@ -1522,6 +1523,7 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-libuuid Exclude libuuid(default: autodetect)
--disable-floating-point
Disable floating point where possible
--enable-kqueue Use kqueue ioqueue on macos/BSD (experimental)
Expand Down Expand Up @@ -5250,7 +5252,18 @@ then :

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5

# Check whether --enable-libuuid was given.
if test ${enable_libuuid+y}
then :
enableval=$enable_libuuid; if test "$enable_libuuid" = "no"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libuuid disabled... yes" >&5
printf "%s\n" "Checking if libuuid disabled... yes" >&6; }
ac_has_uuid_lib=0
fi
else $as_nop

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
printf %s "checking for uuid_generate in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate+y}
then :
Expand Down Expand Up @@ -5293,7 +5306,7 @@ then :

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
printf %s "checking for uuid_generate in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate+y}
then :
Expand Down Expand Up @@ -5333,6 +5346,10 @@ then :
ac_has_uuid_lib=1
fi


fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
printf %s "checking for library containing gethostbyname... " >&6; }
if test ${ac_cv_search_gethostbyname+y}
Expand Down
18 changes: 16 additions & 2 deletions aconfigure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,22 @@ AC_CHECK_LIB(winmm,puts)
AC_CHECK_LIB(socket,puts)
AC_CHECK_LIB(rt,puts)
AC_CHECK_LIB(m,sin)
AC_CHECK_LIB(uuid,uuid_generate)
AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])

dnl
dnl libuuid
dnl
AC_ARG_ENABLE(libuuid,
AS_HELP_STRING([--disable-libuuid],
[Exclude libuuid(default: autodetect)]),
[if test "$enable_libuuid" = "no"; then
AC_MSG_RESULT([Checking if libuuid disabled... yes])
ac_has_uuid_lib=0
fi],
[
AC_CHECK_LIB(uuid,uuid_generate)
AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])
])

AC_SEARCH_LIBS(gethostbyname,nsl)

AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu])
Expand Down

0 comments on commit 0b0488f

Please sign in to comment.