pike.git / src / modules / _Image_XFace / configure.in

version» Context lines:

pike.git/src/modules/_Image_XFace/configure.in:1:   AC_INIT(image_xface.c)   AC_CONFIG_HEADER(config.h) - AC_ARG_WITH(gmp, [ --with(out)-gmp Support bignums],[],[with_gmp=yes]) +       AC_MODULE_INIT()    - ############################################################################# - # Copied from ../../configure.in + dnl GMP is required and tested for in Gmp module. We just want LIBS + dnl updated here. + AC_CHECK_LIB(gmp, main)    - AC_MSG_CHECKING(how to concatenate two symbols) - AC_CACHE_VAL(pike_cv_cpp_symbol_concat, [ -  AC_TRY_COMPILE([ - int AABB=0; - #define CONCAT(X,Y) X##Y -  ], [ -  return CONCAT(AA,BB); -  ], pike_cv_cpp_symbol_concat=ANSI, [ -  AC_TRY_COMPILE([ - int AABB=0; - #define CONCAT(X,Y) X/**/Y -  ], [ -  return CONCAT(AA,BB); -  ], pike_cv_cpp_symbol_concat=KR, [ -  pike_cv_cpp_symbol_concat=Unknown -  ]) -  ]) - ]) - AC_MSG_RESULT($pike_cv_cpp_symbol_concat) - case "$pike_cv_cpp_symbol_concat" in -  "ANSI") -  AC_DEFINE(HAVE_ANSI_CONCAT) -  ;; -  "KR") -  AC_DEFINE(HAVE_KR_CONCAT) -  ;; - esac -  - ############################################################################# -  - define([AC_CHECK_GMP], - [ -  done=no -  ORIG_CHECK_HEADERS($2,[ -  -  # This test is needed since the __MPN macro -  # is broken on many versions of gmp, since -  # many ANSI compilers only define __STDC__ -  # in strict ansi mode. Some of the affected -  # compilers also don't allow redefining -  # __STDC__. -  AC_MSG_CHECKING(prefix for __MPN in $2) -  define(PIKE_PREFIX_NAME,[pike_cv_$1___MPN_prefix]) -  AC_CACHE_VAL(PIKE_PREFIX_NAME, [ -  AC_EGREP_CPP([__gmpn_.*PiKe], [ - #include <$2> - __MPN(PiKe) -  ], [ -  PIKE_PREFIX_NAME="__gmpn_" -  ], [ -  AC_EGREP_CPP([__mpn_.*PiKe], [ - #include <$2> - __MPN(PiKe) -  ], [ -  PIKE_PREFIX_NAME="__mpn_" -  ], [ -  PIKE_PREFIX_NAME="no" -  ]) -  ]) -  ]) -  if test "x$PIKE_PREFIX_NAME" = "xno"; then -  AC_MSG_RESULT(warning -- prefix not found) -  else -  AC_MSG_RESULT($PIKE_PREFIX_NAME) -  AC_DEFINE_UNQUOTED(PIKE_MPN_PREFIX, $PIKE_PREFIX_NAME) -  fi -  - dnl - dnl Autoconf 2.52 seems to barf on this undefine for - dnl some unknown reason. This file should work just - dnl as well without it. - dnl - dnl undefine(PIKE_PREFIX_NAME) -  -  AC_MSG_CHECKING(working <$2>) -  AC_CACHE_VAL(pike_cv_working_$1,[ -  OLDLIBS="${LIBS-}" -  LIBS="${LIBS-} -l$1" -  AC_TRY_RUN([ - #include <stdio.h> -  - /* Kludge for some compilers only defining __STDC__ in strict mode. */ - #if !defined(__STDC__) && defined(HAVE_ANSI_CONCAT) && defined(PIKE_MPN_PREFIX) - #define PIKE_LOW_MPN_CONCAT(x,y) x##y - #define PIKE_MPN_CONCAT(x,y) PIKE_LOW_MPN_CONCAT(x,y) - #define __MPN(x) PIKE_MPN_CONCAT(PIKE_MPN_PREFIX,x) - #endif /* !__STDC__ && HAVE_ANSI_CONCAT && PIKE_MPN_PREFIX */ -  - #include <$2> - int main(int argc, char **argv) - { -  mpz_t tmp,tmp2; -  char buffer[1000]; -  mpz_init(tmp); -  mpz_init(tmp2); -  mpz_set_ui(tmp ,1000000000); -  mpz_set_ui(tmp2,1000000000); -  mpz_mul(tmp,tmp,tmp2); -  mpz_mul(tmp,tmp,tmp2); -  mpz_mul(tmp,tmp,tmp2); -  fprintf(stderr,"FNORD: %d\n",mpz_sizeinbase(tmp,10)); -  exit( mpz_sizeinbase(tmp,10) != 9*4+1 ); - } -  -  ],pike_cv_working_$1=yes,pike_cv_working_$1=no, -  AC_TRY_LINK([ - #include <stdio.h> -  - /* Kludge for some compilers only defining __STDC__ in strict mode. */ - #if !defined(__STDC__) && defined(HAVE_ANSI_CONCAT) && defined(PIKE_MPN_PREFIX) - #define PIKE_LOW_MPN_CONCAT(x,y) x##y - #define PIKE_MPN_CONCAT(x,y) PIKE_LOW_MPN_CONCAT(x,y) - #define __MPN(x) PIKE_MPN_CONCAT(PIKE_MPN_PREFIX,x) - #endif /* !__STDC__ && HAVE_ANSI_CONCAT && PIKE_MPN_PREFIX */ -  - #include <$2> -  -  ],[ -  mpz_t tmp,tmp2; -  char buffer[1000]; -  mpz_init(tmp); -  mpz_init(tmp2); -  mpz_set_ui(tmp ,1000000000); -  mpz_set_ui(tmp2,1000000000); -  mpz_mul(tmp,tmp,tmp2); -  mpz_mul(tmp,tmp,tmp2); -  mpz_mul(tmp,tmp,tmp2); -  fprintf(stderr,"FNORD: %d\n",mpz_sizeinbase(tmp,10)); -  exit( mpz_sizeinbase(tmp,10) != 9*4+1 ); -  ],pike_cv_working_$1=yes,pike_cv_working_$1=no) -  ) -  ]) -  LIBS="$OLDLIBS" -  if test "x$pike_cv_working_$1" = xyes; then -  AC_MSG_RESULT(yes) -  AC_DEFINE(translit(HAVE_LIB$1,[a-z],[A-Z])) -  LIBS="${LIBS-} -l$1" -  done=yes -  PIKE_FEATURE_OK(Image.XFace) -  else -  AC_MSG_RESULT(no) -  fi -  ]) -  -  if test "x$done" = "xno"; then -  $3 -  : -  fi - ]) -  - PIKE_FEATURE_WITHOUT(Image.XFace) -  - if test x$with_gmp = xyes ; then -  PIKE_FEATURE_NODEP(Image.XFace) -  AC_CHECK_GMP(gmp2,gmp2/gmp.h,[AC_CHECK_GMP(gmp,gmp.h,[])]) - fi -  +    AC_OUTPUT(Makefile,echo FOO >stamp-h ) -  +