Skip to content

Commit

Permalink
psx: cached variables need _cv_, wrap PROGRAM correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
pwdraper committed Feb 26, 2014
1 parent 8c6cdbc commit b8fe8ad
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions libraries/psx/configure.ac
Expand Up @@ -2,10 +2,10 @@ dnl Process this file with autoconf to produce a configure script
AC_REVISION($Revision$)

dnl Initialisation: package name and version number
AC_INIT(psx, 0.5-6, starlink@jiscmail.ac.uk)
AC_INIT([psx],[0.5-6],[starlink@jiscmail.ac.uk])

dnl Require autoconf-2.50 at least
AC_PREREQ(2.50)
AC_PREREQ([2.69])
dnl Require Starlink automake at least
AM_INIT_AUTOMAKE(1.8.2-starlink)

Expand Down Expand Up @@ -43,22 +43,22 @@ AC_CHECK_FUNCS([getwd getcwd])
dnl On Solaris ctime_r and asctime_r have three arguments (or two if
dnl _POSIX_PTHREAD_SEMANTICS is defined, but let's avoid that). This
dnl test is taken to apply to both functions.
AC_CACHE_CHECK([if ctime_r wants three arguments], psx_ctime_r_three_args,
AC_CACHE_CHECK([if ctime_r wants three arguments], psx_cv_ctime_r_three_args,
[
AC_TRY_COMPILE( [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <time.h>
],[
], [
char buf[27];
time_t clock;
ctime_r( &clock, buf, 26 );
])],[
psx_cv_ctime_r_three_args=yes
],[
psx_ctime_r_three_args=yes
],[
psx_ctime_r_three_args=no
] )
] )
psx_cv_ctime_r_three_args=no
])
])

if test x"$psx_ctime_r_three_args" = xyes ; then
if test x"$psx_cv_ctime_r_three_args" = xyes ; then
AC_DEFINE(HAVE_CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
AC_DEFINE(HAVE_ASCTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
fi
Expand All @@ -67,7 +67,7 @@ dnl MinGW Windows libraries and functions. Checking for the functions,
dnl fails (not enough like UNIX) so must check for the declaration only.
AC_CHECK_DECLS([GetUserName],,,[#include <windows.h>])

AC_PROG_LIBTOOL
LT_INIT

dnl If --with-pic=no is set we should honour that.
AM_CONDITIONAL(NOPIC, test x$pic_mode = xno)
Expand Down

0 comments on commit b8fe8ad

Please sign in to comment.