From: Scott Cantor Date: Wed, 3 Dec 2008 19:23:56 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/SSPCPP-69 X-Git-Tag: 2.2.0~133 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=569ae706addd657186a8987bcd32ecd83f6e8bfd;p=shibboleth%2Fcpp-sp.git https://issues.shibboleth.net/jira/browse/SSPCPP-69 --- diff --git a/configure.ac b/configure.ac index 5651a99..b3e9cff 100644 --- a/configure.ac +++ b/configure.ac @@ -85,36 +85,6 @@ else CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi -# Thank you Solaris, really. -AC_MSG_CHECKING(for ctime_r) - if test -z "$ac_cv_ctime_args"; then - AC_TRY_COMPILE( - [#include ], - [ - time_t clock; - char buf[26]; - ctime_r(&clock, buf); - ], ac_cv_ctime_args=2) - - AC_TRY_COMPILE( - [#include ], - [ - time_t clock; - char buf[26]; - ctime_r(&clock, buf, 26); - ], ac_cv_ctime_args=3) - fi - if test -z "$ac_cv_ctime_args"; then - AC_MSG_RESULT(no) - else - if test "$ac_cv_ctime_args" = 2; then - AC_DEFINE(HAVE_CTIME_R_2,1,[Define if ctime_r is present with 2 parameters.]) - elif test "$ac_cv_ctime_args" = 3; then - AC_DEFINE(HAVE_CTIME_R_3,1,[Define if ctime_r is present with 3 parameters.]) - fi - AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments]) - fi - # OpenSSL settings AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]), @@ -146,6 +116,36 @@ AC_LANG(C++) AC_CXX_REQUIRE_STL AC_CXX_NAMESPACES +# Thank you Solaris, really. +AC_MSG_CHECKING(for ctime_r) + if test -z "$ac_cv_ctime_args"; then + AC_TRY_COMPILE( + [#include ], + [ + time_t clock; + char buf[26]; + ctime_r(&clock, buf); + ], ac_cv_ctime_args=2) + + AC_TRY_COMPILE( + [#include ], + [ + time_t clock; + char buf[26]; + ctime_r(&clock, buf, 26); + ], ac_cv_ctime_args=3) + fi + if test -z "$ac_cv_ctime_args"; then + AC_MSG_RESULT(no) + else + if test "$ac_cv_ctime_args" = 2; then + AC_DEFINE(HAVE_CTIME_R_2,1,[Define if ctime_r is present with 2 parameters.]) + elif test "$ac_cv_ctime_args" = 3; then + AC_DEFINE(HAVE_CTIME_R_3,1,[Define if ctime_r is present with 3 parameters.]) + fi + AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments]) + fi + # log4shib settings (favor this version over the log4cpp code) AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config) AC_ARG_WITH(log4shib,