Skip to content

Commit

Permalink
Make sure the math library is included when building with shared libr…
Browse files Browse the repository at this point in the history
…aries.
  • Loading branch information
michaelrsweet committed Oct 2, 2023
1 parent fc42d96 commit 4569776
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_shared
enable_pam
enable_debug
enable_maintainer
Expand Down Expand Up @@ -1359,6 +1360,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-shared do not install shared library
--enable-libpam use libpam for authentication, default=auto
--enable-debug turn on debugging, default=no
--enable-maintainer turn on maintainer mode, default=no
Expand Down Expand Up @@ -3893,6 +3895,20 @@ fi



# Check whether --enable-shared was given.
if test ${enable_shared+y}
then :
enableval=$enable_shared;
fi

if test x$enable_shared != xno
then :

LIBS="$LIBS -lm"

fi


# Check whether --enable-pam was given.
if test ${enable_pam+y}
then :
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ dnl Check for pkg-config, which is used for some other tests later on...
AC_PATH_TOOL([PKGCONFIG], [pkg-config])


dnl Math library...
AC_ARG_ENABLE([shared], AS_HELP_STRING([--disable-shared], [do not install shared library]))
AS_IF([test x$enable_shared != xno], [
LIBS="$LIBS -lm"
])


dnl PAM support...
AC_ARG_ENABLE([pam], AS_HELP_STRING([--enable-libpam], [use libpam for authentication, default=auto]))

Expand Down

0 comments on commit 4569776

Please sign in to comment.