gf2x-1.2/0000755000327606072450000000000013126452067007251 500000000000000gf2x-1.2/config/0000755000327606072450000000000013126452065010514 500000000000000gf2x-1.2/config/acinclude.m40000644000327606072450000005411613125140251012622 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2012, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. AC_DEFUN([WORDSIZE_CODE],[AC_LANG_SOURCE([ /* We check wraparound rather than zero, because that's the only thing the norm guarantees (C99) -- UINT_MAX isn't committed to being a power of two */ #include int main() { unsigned long x = 1UL; unsigned long y; FILE * f = fopen("conftest.out","w"); int i = 1; for( ; ; i++) { y = x << 1; if (y < x) { break; } x = y; } fprintf(f,"%d\n",i); fclose(f); return 0; } ])]) AC_DEFUN([RUNTIME_ULONG_BITS],[ if test x$gf2x_cv_ulongbits = x ; then AC_CACHE_CHECK([the number of bits in an unsigned long], [gf2x_cv_ulongbits],[ AC_RUN_IFELSE([WORDSIZE_CODE()],[ # see bug #15631 and autoconf manual about tr. # detected=`cat conftest.out | tr -d -c 0-9` detected=`cat conftest.out` if test x$detected = x ; then AC_MSG_ERROR([test program failed]) else gf2x_cv_ulongbits=$detected fi ],[ AC_MSG_FAILURE([cannot compile/run test program]) ],[ AC_MSG_NOTICE([check skipped because of cross-compiling]) gf2x_cv_ulongbits=dontknow ]) ]) fi ]) AC_DEFUN([VERIFY_WORDSIZE],[ RUNTIME_ULONG_BITS() AC_MSG_CHECKING([$2]) case x$gf2x_cv_ulongbits in xdontknow) AC_MSG_NOTICE([cannot tell (cross-compiling)]);; x$1) AC_MSG_RESULT([yes]);; *) AC_MSG_ERROR([no, $gf2x_cv_ulongbits-bit. Please provide appropriate \$CC variable]);; esac ]) # pepper this check with more sse-2 only statements, or we might be # fooled by some early athlon64 cpus supporting extended 3dnow, which # includes a subset of sse-2, but do not support the full sse-2 insn set. AC_DEFUN([SSE2_EXAMPLE],[AC_LANG_SOURCE([ #include #include #include int main(int argc, char * argv[[]]) { volatile int a0 = 17; volatile int a1 = 42; __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3); __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc); __m128i x = _mm_setr_epi32(a1, 0, a0, 0); __m128d g = _mm_set_pd((double) a1, (double) a0); x = _mm_srl_epi64(x, _mm_setr_epi32(2,0,0,0)); foo = _mm_mullo_epi16(foo, bar); foo = _mm_slli_epi64(foo, 1); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_epi64(foo, 1); foo = _mm_mullo_epi16(foo, bar); foo = _mm_shuffle_epi32(foo, 78); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_si128(foo, 1); foo = _mm_xor_si128(foo, x); return _mm_extract_epi16(foo, 0) & (argc - 1); } ])]) AC_DEFUN([SSE3_EXAMPLE],[AC_LANG_SOURCE([ /* This source file is our test case for sse-3 support. */ #include #include #include int main() { volatile double a0 = 12.34; volatile double a1 = 56.78; __m128d x = _mm_setr_pd(a0, 34.12); __m128d y = _mm_setr_pd(78.56, a1); double a[[2]], b[[2]] = { 78.56 + 56.78, 12.34 + 34.12 }; y = _mm_hadd_pd(y, x); memcpy(a, &y, 16); return (a[[0]] != b[[0]] || a[[1]] != b[[1]]); } ])]) AC_DEFUN([SSSE3_EXAMPLE],[AC_LANG_SOURCE([ /* This source file is our test case for ssse3 support. */ #include #include #include int main() { volatile uint32_t a0 = 0x03020100; volatile uint32_t a1 = 0x1F1E1D1C; __m128i x = _mm_setr_epi32(a0, 0x07060504, 0x0B0A0908, 0x0F0E0D0C); __m128i y = _mm_setr_epi32(0x13121110, 0x17161514, 0x1B1A1918, a1); uint64_t a[[2]], b[[2]] = { 0x0C0B0A0908070605, 0x14131211100F0E0D }; y = _mm_alignr_epi8(y, x, 0x5); memcpy (a, &y, 16); return(a[[0]] != b[[0]] || a[[1]] != b[[1]]); } ])]) AC_DEFUN([SSE41_EXAMPLE],[AC_LANG_SOURCE([ #include #include #include int main() { /* the following test is for emulated 32-bit on physical 64-bit */ if (sizeof(unsigned long) != 8) abort (); volatile int a0 = 17; volatile int a1 = 42; __m128i x = _mm_setr_epi32(a1, 0, a0, 0); // x = 0 0x2a 0 0x11 __m128i y = _mm_setr_epi32(42, 0, 17, 0); // y = 0 0x2a 0 0x11 __m128i ma = _mm_max_epi32(x, y); __m128i mi = _mm_min_epi32(x, y); __m128i z = _mm_xor_si128(mi, ma); int ok0 = _mm_testz_si128(z, z); __m128i c = _mm_cmpeq_epi64(x, y); int ok1 = _mm_extract_epi32(c, 0) && _mm_extract_epi32(c, 1); return (ok0 && ok1) ? EXIT_SUCCESS : EXIT_FAILURE; } ])]) AC_DEFUN([PCLMUL_EXAMPLE],[AC_LANG_SOURCE([ #include #include #include int main() { assert(sizeof(unsigned long) == 8); /* assume 64-bit */ #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) volatile int a0 = 17; volatile int a1 = 42; __m128i a = _gf2x_mm_set1_epi64(a0); __m128i b = _gf2x_mm_set1_epi64(a1); union { __m128i s; unsigned long x[[2]]; } proxy; proxy.s = _mm_clmulepi64_si128(a, b, 0); return proxy.x[[0]] - 650; } ])]) # Check whether we need some flag such as -msse2 in order to enable sse-2 # support AC_DEFUN([CHECK_SSE2_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC can compile and run sse-2 code], [gf2x_cv_cc_supports_sse2],[ gf2x_cv_cc_supports_sse2=no if test "x${enable_sse2}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse2" AC_RUN_IFELSE([SSE2_EXAMPLE()],[ gf2x_cv_cc_supports_sse2=yes ],[ CFLAGS="$ac_save_CFLAGS" AC_RUN_IFELSE([SSE2_EXAMPLE()],[ gf2x_cv_cc_supports_sse2="yes, but without -msse2" ],[ gf2x_cv_cc_supports_sse2=no ]) ],[ echo $ECHO_N "cross-compiling, " if test "x${enable_sse2}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse2=yes else gf2x_cv_cc_supports_sse2=no fi ]) fi ]) ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse2" = "yes" ;then # Tweaking CFLAGS is often not enough. AC_CACHE_CHECK([whether -msse2 is also understood by the preprocessor], [gf2x_cv_cpp_understands_msse2_flag],[ CPPFLAGS="$ac_save_CPPFLAGS -msse2" AC_PREPROC_IFELSE([SSE2_EXAMPLE()],[ gf2x_cv_cpp_understands_msse2_flag=yes ],[ CPPFLAGS="$ac_save_CPPFLAGS" AC_PREPROC_IFELSE([SSE2_EXAMPLE()],[ gf2x_cv_cpp_understands_msse2_flag=no ],[ AC_MSG_ERROR([Sorry, the preprocessor can't parse sse-2!]) ]) ]) ]) fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse2" = "yes" ;then CFLAGS="$CFLAGS -msse2" fi if test "$gf2x_cv_cpp_understands_msse2_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse2" fi if test "$gf2x_cv_cc_supports_sse2" != "no" ;then AC_DEFINE([GF2X_HAVE_SSE2_SUPPORT],[1],[Define if sse-2 code as present in the source tree is supported by the compiler]) fi ])# CHECK_SSE2_SUPPORT AC_DEFUN([CHECK_SSE3_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC can compile and run sse-3 code], [gf2x_cv_cc_supports_sse3],[ gf2x_cv_cc_supports_sse3=no if test "x${gf2x_cv_cc_supports_sse2}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_sse3}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse3" AC_RUN_IFELSE([SSE3_EXAMPLE()],[ gf2x_cv_cc_supports_sse3=yes ],[ CFLAGS="$ac_save_CFLAGS" AC_RUN_IFELSE([SSE3_EXAMPLE()],[ gf2x_cv_cc_supports_sse3="yes, but without -msse3" ],[ gf2x_cv_cc_supports_sse3=no ]) ],[ echo $ECHO_N "cross-compiling, " if test "x${enable_sse3}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse3=yes else gf2x_cv_cc_supports_sse3=no fi ]) fi ]) ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse3" = "yes" ;then # Tweaking CFLAGS is often not enough. AC_CACHE_CHECK([whether -msse3 is also understood by the preprocessor], [gf2x_cv_cpp_understands_msse3_flag],[ CPPFLAGS="$ac_save_CPPFLAGS -msse3" AC_PREPROC_IFELSE([SSE3_EXAMPLE()],[ gf2x_cv_cpp_understands_msse3_flag=yes ],[ CPPFLAGS="$ac_save_CPPFLAGS" AC_PREPROC_IFELSE([SSE3_EXAMPLE()],[ gf2x_cv_cpp_understands_msse3_flag=no ],[ AC_MSG_ERROR([Sorry, the preprocessor can't parse sse-3!]) ]) ]) ]) fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse3" = "yes" ;then CFLAGS="$CFLAGS -msse3" fi if test "$gf2x_cv_cpp_understands_msse3_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse3" fi if test "$gf2x_cv_cc_supports_sse3" != "no" ;then AC_DEFINE([GF2X_HAVE_SSE3_SUPPORT],[1],[Define if sse-3 code as present in the source tree is supported by the compiler]) fi ])# CHECK_SSE3_SUPPORT AC_DEFUN([CHECK_SSSE3_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC can compile and run ssse3 code], [gf2x_cv_cc_supports_ssse3],[ gf2x_cv_cc_supports_ssse3=no if test "x${gf2x_cv_cc_supports_sse3}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_ssse3}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -mssse3" AC_RUN_IFELSE([SSSE3_EXAMPLE()],[ gf2x_cv_cc_supports_ssse3=yes ],[ CFLAGS="$ac_save_CFLAGS" AC_RUN_IFELSE([SSSE3_EXAMPLE()],[ gf2x_cv_cc_supports_ssse3="yes, but without -mssse3" ],[ gf2x_cv_cc_supports_ssse3=no ]) ],[ echo $ECHO_N "cross-compiling, " if test "x${enable_ssse3}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_ssse3=yes else gf2x_cv_cc_supports_ssse3=no fi ]) fi ]) ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_ssse3" = "yes" ;then # Tweaking CFLAGS is often not enough. AC_CACHE_CHECK([whether -mssse3 is also understood by the preprocessor], [gf2x_cv_cpp_understands_mssse3_flag],[ CPPFLAGS="$ac_save_CPPFLAGS -mssse3" AC_PREPROC_IFELSE([SSSE3_EXAMPLE()],[ gf2x_cv_cpp_understands_mssse3_flag=yes ],[ CPPFLAGS="$ac_save_CPPFLAGS" AC_PREPROC_IFELSE([SSSE3_EXAMPLE()],[ gf2x_cv_cpp_understands_mssse3_flag=no ],[ AC_MSG_ERROR([Sorry, the preprocessor can't parse ssse3!]) ]) ]) ]) fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_ssse3" = "yes" ;then CFLAGS="$CFLAGS -mssse3" fi if test "$gf2x_cv_cpp_understands_mssse3_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -mssse3" fi if test "$gf2x_cv_cc_supports_ssse3" != "no" ;then AC_DEFINE([GF2X_HAVE_SSSE3_SUPPORT],[1],[Define if ssse3 code as present in the source tree is supported by the compiler]) fi ])# CHECK_SSSE3_SUPPORT AC_DEFUN([CHECK_SSE41_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC can compile and run sse-4.1 code], [gf2x_cv_cc_supports_sse41],[ gf2x_cv_cc_supports_sse41=no if test "x${gf2x_cv_cc_supports_ssse3}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_sse41}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse4.1" AC_RUN_IFELSE([SSE41_EXAMPLE()],[ gf2x_cv_cc_supports_sse41=yes ],[ CFLAGS="$ac_save_CFLAGS" AC_RUN_IFELSE([SSE41_EXAMPLE()],[ gf2x_cv_cc_supports_sse41="yes, but without -msse4.1" ],[ gf2x_cv_cc_supports_sse41=no ]) ],[ echo $ECHO_N "cross-compiling, " if test "x${enable_sse41}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse41=yes else gf2x_cv_cc_supports_sse41=no fi ]) fi ]) ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse41" = "yes" ;then # Tweaking CFLAGS is often not enough. AC_CACHE_CHECK([whether -msse4.1 is also understood by the preprocessor], [gf2x_cv_cpp_understands_msse41_flag],[ CPPFLAGS="$ac_save_CPPFLAGS -msse4.1" AC_PREPROC_IFELSE([SSE41_EXAMPLE()],[ gf2x_cv_cpp_understands_msse41_flag=yes ],[ CPPFLAGS="$ac_save_CPPFLAGS" AC_PREPROC_IFELSE([SSE41_EXAMPLE()],[ gf2x_cv_cpp_understands_msse41_flag=no ],[ AC_MSG_ERROR([Sorry, the preprocessor can't parse sse-4.1!]) ]) ]) ]) fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse41" = "yes" ;then CFLAGS="$CFLAGS -msse4.1" fi if test "$gf2x_cv_cpp_understands_msse41_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse4.1" fi if test "$gf2x_cv_cc_supports_sse41" != "no" ;then AC_DEFINE([GF2X_HAVE_SSE41_SUPPORT],[1],[Define if sse-4.1 code as present in the source tree is supported by the compiler]) fi ])# CHECK_SSE41_SUPPORT AC_DEFUN([CHECK_PCLMUL_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC can compile pclmulqdq and if it is supported by the hardware], [gf2x_cv_cc_supports_pclmul],[ gf2x_cv_cc_supports_pclmul=no if test "x${gf2x_cv_cc_supports_sse41}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_pclmul}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -mpclmul" AC_RUN_IFELSE([PCLMUL_EXAMPLE()],[ gf2x_cv_cc_supports_pclmul=yes ],[ CFLAGS="$ac_save_CFLAGS" AC_RUN_IFELSE([PCLMUL_EXAMPLE()],[ gf2x_cv_cc_supports_pclmul="yes, but without -mpclmul" ],[ gf2x_cv_cc_supports_pclmul=no ]) ],[ echo $ECHO_N "cross-compiling, " if test "x${enable_pclmul}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_pclmul=yes else gf2x_cv_cc_supports_pclmul=no fi ]) fi ]) ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_pclmul" = "yes" ;then # Tweaking CFLAGS is often not enough. AC_CACHE_CHECK([whether -mpclmul is also understood by the preprocessor], [gf2x_cv_cpp_understands_mpclmul_flag],[ CPPFLAGS="$ac_save_CPPFLAGS -mpclmul" AC_PREPROC_IFELSE([PCLMUL_EXAMPLE()],[ gf2x_cv_cpp_understands_mpclmul_flag=yes ],[ CPPFLAGS="$ac_save_CPPFLAGS" AC_PREPROC_IFELSE([PCLMUL_EXAMPLE()],[ gf2x_cv_cpp_understands_mpclmul_flag=no ],[ AC_MSG_ERROR([Sorry, the preprocessor can't parse pclmul!]) ]) ]) ]) fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_pclmul" = "yes" ;then CFLAGS="$CFLAGS -mpclmul" fi if test "$gf2x_cv_cpp_understands_mpclmul_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -mpclmul" fi if test "$gf2x_cv_cc_supports_pclmul" != "no" ;then AC_DEFINE([GF2X_HAVE_PCLMUL_SUPPORT],[1],[Define if pclmul code as present in the source tree is supported by the compiler]) fi ])# CHECK_PCLMUL_SUPPORT AC_DEFUN([HELLO_WORLD_EXAMPLE],[AC_LANG_SOURCE([ #include int main() { printf("hello\n"); return 0; } ])]) AC_DEFUN([CHECK_MARCH_NATIVE_SUPPORT],[ ac_save_CFLAGS=$CFLAGS special_double_setting="yes, via -march=x86-64 -march=native" AC_CACHE_CHECK([whether $CC understands -march=native], [gf2x_cv_cc_supports_march_native],[ gf2x_cv_cc_supports_march_native=no CFLAGS="$ac_save_CFLAGS -march=native" AC_COMPILE_IFELSE( [HELLO_WORLD_EXAMPLE()], [ gf2x_cv_cc_supports_march_native=yes ], [ CFLAGS="$ac_save_CFLAGS -march=x86-64 -march=native" AC_COMPILE_IFELSE( [HELLO_WORLD_EXAMPLE()], [ gf2x_cv_cc_supports_march_native="$special_double_setting" ], [AC_MSG_RESULT(no)]) ] ) CFLAGS=$ac_save_CFLAGS ]) if test "$gf2x_cv_cc_supports_march_native" = "$special_double_setting" ;then CFLAGS="$CFLAGS -march=x86-64 -march=native" elif test "$gf2x_cv_cc_supports_march_native" = "yes" ;then CFLAGS="$CFLAGS -march=native" fi ])# CHECK_MARCH_NATIVE_SUPPORT AC_DEFUN([CHECK_MTUNE_NATIVE_SUPPORT],[ ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK([whether $CC understands -mtune=native], [gf2x_cv_cc_supports_mtune_native],[ gf2x_cv_cc_supports_mtune_native=no CFLAGS="$ac_save_CFLAGS -mtune=native" AC_COMPILE_IFELSE( [HELLO_WORLD_EXAMPLE()], [ gf2x_cv_cc_supports_mtune_native=yes ]) CFLAGS=$ac_save_CFLAGS ]) if test "$gf2x_cv_cc_supports_mtune_native" = "yes" ;then CFLAGS="$CFLAGS -mtune=native" fi ])# CHECK_MTUNE_NATIVE_SUPPORT # It is necessary to make all tests. We do encounter in the wild binutils # (openbsd binutils 2.15, namely) which are buggy with ssse3, and that # isn't extremely quickly spotted by the later checks... AC_DEFUN([AC_COMPILE_WARNINGS], [ AC_MSG_CHECKING([warning verbosity option]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CXX]) AC_ARG_WITH([compile-warnings], AS_HELP_STRING([--without-compile-warnings], [Disable warning verbosity]), [ac_compile_warnings_on="$withval"], [ac_compile_warnings_on=""]) if test x"$ac_compile_warnings_on" = xno then ac_compile_warnings_msg=no else if test -n "$CXX" then if test "$GXX" = "yes" then ac_compile_warnings_opt='-Wall -W' fi CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_opt for C++" fi if test -n "$CC" then if test "$GCC" = "yes" then ac_compile_warnings_opt='-Wall -W' fi CFLAGS="$CFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C" fi fi AC_MSG_RESULT([$ac_compile_warnings_msg]) unset ac_compile_warnings_msg unset ac_compile_warnings_opt ]) dnl -- taken from gmp-4.2.1, LGPL v2.1+ -- dnl -- renamed GMP_ to GF2X_ -- dnl dnl dnl dnl GF2X_PROG_CC_FOR_BUILD dnl --------------------- dnl Establish CC_FOR_BUILD, a C compiler for the build system. dnl dnl If CC_FOR_BUILD is set then it's expected to work, likewise the old dnl style HOST_CC, otherwise some likely candidates are tried, the same as dnl configfsf.guess. AC_DEFUN([GF2X_PROG_CC_FOR_BUILD], [AC_REQUIRE([AC_PROG_CC]) if test -n "$CC_FOR_BUILD"; then GF2X_PROG_CC_FOR_BUILD_WORKS($CC_FOR_BUILD,, [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) elif test -n "$HOST_CC"; then GF2X_PROG_CC_FOR_BUILD_WORKS($HOST_CC, [CC_FOR_BUILD=$HOST_CC], [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) else for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do GF2X_PROG_CC_FOR_BUILD_WORKS($i, [CC_FOR_BUILD=$i break]) done if test -z "$CC_FOR_BUILD"; then AC_MSG_ERROR([Cannot find a build system compiler]) fi fi AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) AC_SUBST(CC_FOR_BUILD) ]) dnl GF2X_PROG_CC_FOR_BUILD_WORKS(cc/cflags[,[action-if-good][,action-if-bad]]) dnl ------------------------------------------------------------------------- dnl See if the given cc/cflags works on the build system. dnl dnl It seems easiest to just use the default compiler output, rather than dnl figuring out the .exe or whatever at this stage. AC_DEFUN([GF2X_PROG_CC_FOR_BUILD_WORKS], [AC_MSG_CHECKING([build system compiler $1]) # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <&AC_FD_CC 2>&1; then cc_for_build_works=yes fi fi rm -f conftest* a.out b.out a.exe a_out.exe AC_MSG_RESULT($cc_for_build_works) if test "$cc_for_build_works" = yes; then ifelse([$2],,:,[$2]) else ifelse([$3],,:,[$3]) fi ]) dnl GF2X_PROG_EXEEXT_FOR_BUILD dnl ------------------------- dnl Determine EXEEXT_FOR_BUILD, the build system executable suffix. dnl dnl The idea is to find what "-o conftest$foo" will make it possible to run dnl the program with ./conftest. On Unix-like systems this is of course dnl nothing, for DOS it's ".exe", or for a strange RISC OS foreign file dnl system cross compile it can be ",ff8" apparently. Not sure if the dnl latter actually applies to a build-system executable, maybe it doesn't, dnl but it won't hurt to try. AC_DEFUN([GF2X_PROG_EXEEXT_FOR_BUILD], [AC_REQUIRE([GF2X_PROG_CC_FOR_BUILD]) AC_CACHE_CHECK([for build system executable suffix], gf2x_cv_prog_exeext_for_build, [cat >conftest.c <&AC_FD_CC; then gf2x_cv_prog_exeext_for_build=$i break fi fi done rm -f conftest* if test "${gf2x_cv_prog_exeext_for_build+set}" != set; then AC_MSG_ERROR([Cannot determine executable suffix]) fi ]) AC_SUBST(EXEEXT_FOR_BUILD,$gf2x_cv_prog_exeext_for_build) ]) gf2x-1.2/config/libtool.m40000644000327606072450000112617113126452046012352 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS gf2x-1.2/config/ltoptions.m40000644000327606072450000003426213126452046012737 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) gf2x-1.2/config/ltsugar.m40000644000327606072450000001044013126452046012355 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) gf2x-1.2/config/ltversion.m40000644000327606072450000000127313126452046012725 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) gf2x-1.2/config/lt~obsolete.m40000644000327606072450000001377413126452046013263 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) gf2x-1.2/config/compile0000755000327606072450000001624513126452055012021 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gf2x-1.2/config/config.guess0000755000327606072450000005503112725540356012765 00000000000000#! /bin/sh # # GMP config.guess wrapper. # Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. # # This file is part of the GNU MP Library. # # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or (at # your option) any later version. # # The GNU MP Library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public # License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # Usage: config.guess # # Print the host system CPU-VENDOR-OS. # # configfsf.guess is run and its guess then sharpened up to take advantage # of the finer grained CPU types that GMP knows. # Expect to find configfsf.guess in the same directory as this config.guess configfsf_guess="`echo \"$0\" | sed 's/config.guess$/configfsf.guess/'`" if test "$configfsf_guess" = "$0"; then echo "Cannot derive configfsf.guess from $0" 1>&2 exit 1 fi if test -f "$configfsf_guess"; then : else echo "$configfsf_guess not found" 1>&2 exit 1 fi # Setup a $SHELL with which to run configfsf.guess, using the same # $CONFIG_SHELL or /bin/sh as autoconf does when running config.guess SHELL=${CONFIG_SHELL-/bin/sh} # Identify ourselves on --version, --help or errors if test $# != 0; then echo "(GNU MP wrapped config.guess)" $SHELL $configfsf_guess "$@" exit 1 fi guess_full=`$SHELL $configfsf_guess` if test $? != 0; then exit 1 fi guess_cpu=`echo "$guess_full" | sed 's/-.*$//'` guess_rest=`echo "$guess_full" | sed 's/^[^-]*//'` exact_cpu= # ------------------------------------------------------------------------- # The following should look at the current guess and probe the system to # establish a better guess in exact_cpu. Leave exact_cpu empty if probes # can't be done, or don't work. # # When a number of probes are done, test -z "$exact_cpu" can be used instead # of putting each probe under an "else" of the preceeding. That can stop # the code getting horribly nested and marching off the right side of the # screen. # Note that when a compile-and-link is done in one step we need to remove .o # files, since lame C compilers generate these even when not asked. # dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.core $dummy ${dummy}1.s ${dummy}2.c ; exit 1' 1 2 15 # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then CC_FOR_BUILD="$HOST_CC" else if test x"$CC" != x; then CC_FOR_BUILD="$CC" else echo 'dummy(){}' >$dummy.c for c in cc gcc c89 c99; do ($c $dummy.c -c) >/dev/null 2>&1 if test $? = 0; then CC_FOR_BUILD="$c"; break fi done rm -f $dummy.c $dummy.o if test x"$CC_FOR_BUILD" = x; then CC_FOR_BUILD=no_compiler_found fi fi fi fi case "$guess_full" in alpha-*-*) # configfsf.guess detects exact alpha cpu types for OSF and GNU/Linux, but # not for *BSD and other systems. We try to get an exact type for any # plain "alpha" it leaves. # # configfsf.guess used to have a block of code not unlike this, but these # days does its thing with Linux kernel /proc/cpuinfo or OSF psrinfo. # cat <$dummy.s .data Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d91 # implver \$17 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,Lformat not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) exact_cpu=alpha ;; 1-0) exact_cpu=alphaev5 ;; 1-1) exact_cpu=alphaev56 ;; 1-101) exact_cpu=alphapca56 ;; 2-303) exact_cpu=alphaev6 ;; 2-307) exact_cpu=alphaev67 ;; 2-1307) exact_cpu=alphaev68 ;; esac fi rm -f $dummy.s $dummy.o $dummy ;; ia64*-*-*) # CPUID[3] bits 24 to 31 is the processor family. itanium2 is documented # as 0x1f, plain itanium has been seen returning 0x07 on two systems, but # haven't found any documentation on it as such. # # Defining both getcpuid and _getcpuid lets us ignore whether the system # expects underscores or not. # # "unsigned long long" is always 64 bits, in fact on hpux in ilp32 mode # (which is the default there), it's the only 64-bit type. # cat >${dummy}a.s <${dummy}b.c < unsigned long long getcpuid (); int main () { if (getcpuid(0LL) == 0x49656E69756E6547LL && getcpuid(1LL) == 0x6C65746ELL) { /* "GenuineIntel" */ switch ((getcpuid(3LL) >> 24) & 0xFF) { case 0x07: puts ("itanium"); break; case 0x1F: puts ("itanium2"); break; } } return 0; } EOF if $CC_FOR_BUILD ${dummy}a.s ${dummy}b.c -o $dummy >/dev/null 2>&1; then exact_cpu=`./$dummy` fi rm -f ${dummy}a.s ${dummy}a.o ${dummy}b.c ${dummy}b.o $dummy $dummy.core core ;; mips-*-irix[6789]*) # IRIX 6 and up always has a 64-bit mips cpu exact_cpu=mips64 ;; m68k-*-*) # NetBSD (and presumably other *BSD) "sysctl hw.model" gives for example # hw.model = Apple Macintosh Quadra 610 (68040) exact_cpu=`(sysctl hw.model) 2>/dev/null | sed -n 's/^.*\(680[012346]0\).*$/m\1/p'` if test -z "$exact_cpu"; then # Linux kernel 2.2 gives for example "CPU: 68020" (tabs in between). exact_cpu=`sed -n 's/^CPU:.*\(680[012346]0\).*$/m\1/p' /proc/cpuinfo 2>/dev/null` fi if test -z "$exact_cpu"; then # Try: movel #0,%d0; rts # This is to check the compiler and our asm code works etc, before # assuming failures below indicate cpu characteristics. # .byte is used to avoid problems with assembler syntax variations. # For testing, provoke failures by adding "illegal" possibly as # ".byte 0x4A, 0xFC" cat >$dummy.s </dev/null 2>&1; then # $SHELL -c is used to execute ./$dummy below, since (./$dummy) # 2>/dev/null still prints the SIGILL message on some shells. # # Try: movel #0,%d0 # rtd #0 cat >$dummy.s </dev/null 2>&1; then $SHELL -c ./$dummy >/dev/null 2>&1 if test $? != 0; then exact_cpu=m68000 # because rtd didn't work fi fi # if test -z "$exact_cpu"; then # Try: trapf # movel #0,%d0 # rts # Another possibility for identifying 68000 and 68010 is the # different value stored by "movem a0,(a0)+" cat >$dummy.s </dev/null 2>&1; then $SHELL -c ./$dummy >/dev/null 2>&1 if test $? != 0; then exact_cpu=m68010 # because trapf didn't work fi fi fi if test -z "$exact_cpu"; then # Try: bfffo %d1{0:31},%d0 # movel #0,%d0 # rts cat >$dummy.s </dev/null 2>&1; then $SHELL -c ./$dummy >/dev/null 2>&1 if test $? != 0; then exact_cpu=m68360 # cpu32, because bfffo didn't work fi fi fi if test -z "$exact_cpu"; then # FIXME: Now we know 68020 or up, but how to detect 030, 040 and 060? exact_cpu=m68020 fi fi rm -f $dummy.s $dummy.o $dummy $dummy.core core fi if test -z "$exact_cpu"; then case "$guess_full" in *-*-next* | *-*-openstep*) # NeXTs are 68020 or better exact_cpu=m68020 ;; esac fi ;; rs6000-*-* | powerpc*-*-*) # Enhancement: On MacOS the "machine" command prints for instance # "ppc750". Interestingly on powerpc970-apple-darwin6.8.5 it prints # "ppc970" where there's no actual #define for 970 from NXGetLocalArchInfo # (as noted below). But the man page says the command is still "under # development", so it doesn't seem wise to use it just yet, not while # there's an alternative. # # Try to read the PVR. mfpvr is a protected instruction, NetBSD, MacOS # and AIX don't allow it in user mode, but the Linux kernel does. # # Using explicit bytes for mfpvr avoids worrying about assembler syntax # and underscores. "char"s are used instead of "int"s to avoid worrying # whether sizeof(int)==4 or if it's the right endianness. # # Note this is no good on AIX, since a C function there is the address of # a function descriptor, not actual code. But this doesn't matter since # AIX doesn't allow mfpvr anyway. # cat >$dummy.c <<\EOF #include struct { int n; /* force 4-byte alignment */ char a[8]; } getpvr = { 0, { 0x7c, 0x7f, 0x42, 0xa6, /* mfpvr r3 */ 0x4e, 0x80, 0x00, 0x20, /* blr */ } }; int main () { unsigned (*fun)(); unsigned pvr; /* a separate "fun" variable is necessary for gcc 2.95.2 on MacOS, it gets a compiler error on a combined cast and call */ fun = (unsigned (*)()) getpvr.a; pvr = (*fun) (); switch (pvr >> 16) { case 0x0001: puts ("powerpc601"); break; case 0x0003: puts ("powerpc603"); break; case 0x0004: puts ("powerpc604"); break; case 0x0006: puts ("powerpc603e"); break; case 0x0007: puts ("powerpc603e"); break; /* 603ev */ case 0x0008: puts ("powerpc750"); break; case 0x0009: puts ("powerpc604e"); break; case 0x000a: puts ("powerpc604e"); break; /* 604ev5 */ case 0x000c: puts ("powerpc7400"); break; case 0x0041: puts ("powerpc630"); break; case 0x0050: puts ("powerpc860"); break; case 0x8000: puts ("powerpc7450"); break; case 0x8001: puts ("powerpc7455"); break; case 0x8002: puts ("powerpc7457"); break; case 0x800c: puts ("powerpc7410"); break; } return 0; } EOF if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then # This style construct is needed on AIX 4.3 to suppress the SIGILL error # from (*fun)(). Using $SHELL -c ./$dummy 2>/dev/null doesn't work. { x=`./$dummy`; } 2>/dev/null if test -n "$x"; then exact_cpu=$x fi fi rm -f $dummy.c $dummy.o $dummy $dummy.core # Grep the linux kernel /proc/cpuinfo pseudo-file. # Anything unrecognised is ignored, since of course we mustn't spit out # a cpu type config.sub doesn't know. if test -z "$exact_cpu" && test -f /proc/cpuinfo; then x=`grep "^cpu[ ]" /proc/cpuinfo | head -n 1` x=`echo $x | sed -n 's/^cpu[ ]*:[ ]*\([A-Za-z0-9]*\).*/\1/p'` x=`echo $x | sed 's/PPC//'` case $x in 601) exact_cpu="power" ;; 603ev) exact_cpu="powerpc603e" ;; 604ev5) exact_cpu="powerpc604e" ;; 603 | 603e | 604 | 604e | 750 | 821 | 860 | 970) exact_cpu="powerpc$x" ;; POWER[4-9]) exact_cpu=`echo $x | sed "s;POWER;power;"` ;; esac fi if test -z "$exact_cpu"; then # On AIX, try looking at _system_configuration. This is present in # version 4 at least. cat >$dummy.c < #include int main () { switch (_system_configuration.implementation) { /* Old versions of AIX don't have all these constants, use ifdef for safety. */ #ifdef POWER_RS2 case POWER_RS2: puts ("power2"); break; #endif #ifdef POWER_601 case POWER_601: puts ("power"); break; #endif #ifdef POWER_603 case POWER_603: puts ("powerpc603"); break; #endif #ifdef POWER_604 case POWER_604: puts ("powerpc604"); break; #endif #ifdef POWER_620 case POWER_620: puts ("powerpc620"); break; #endif #ifdef POWER_630 case POWER_630: puts ("powerpc630"); break; #endif /* Dunno what this is, leave it out for now. case POWER_A35: puts ("powerpca35"); break; */ /* This is waiting for a bit more info. case POWER_RS64II: puts ("powerpcrs64ii"); break; */ default: if (_system_configuration.architecture == POWER_RS) puts ("power"); else if (_system_configuration.width == 64) puts ("powerpc64"); } return 0; } EOF if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then x=`./$dummy` if test -n "$x"; then exact_cpu=$x fi fi rm -f $dummy.c $dummy.o $dummy fi if test -z "$exact_cpu"; then # On MacOS X (or any Mach-O presumably), NXGetLocalArchInfo cpusubtype # can tell us the exact cpu. cat >$dummy.c < #include int main (void) { const NXArchInfo *a = NXGetLocalArchInfo(); if (a->cputype == CPU_TYPE_POWERPC) { switch (a->cpusubtype) { /* The following known to Darwin 1.3. */ case CPU_SUBTYPE_POWERPC_601: puts ("powerpc601"); break; case CPU_SUBTYPE_POWERPC_602: puts ("powerpc602"); break; case CPU_SUBTYPE_POWERPC_603: puts ("powerpc603"); break; case CPU_SUBTYPE_POWERPC_603e: puts ("powerpc603e"); break; case CPU_SUBTYPE_POWERPC_603ev: puts ("powerpc603e"); break; case CPU_SUBTYPE_POWERPC_604: puts ("powerpc604"); break; case CPU_SUBTYPE_POWERPC_604e: puts ("powerpc604e"); break; case CPU_SUBTYPE_POWERPC_620: puts ("powerpc620"); break; case CPU_SUBTYPE_POWERPC_750: puts ("powerpc750"); break; case CPU_SUBTYPE_POWERPC_7400: puts ("powerpc7400"); break; case CPU_SUBTYPE_POWERPC_7450: puts ("powerpc7450"); break; /* Darwin 6.8.5 doesn't define a constant for 970, but gives 100 */ case 100: puts ("powerpc970"); break; } } return 0; } EOF if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then x=`./$dummy` if test -n "$x"; then exact_cpu=$x fi fi rm -f $dummy.c $dummy.o $dummy fi ;; sparc-*-* | sparc64-*-*) # If we can recognise an actual v7 then $exact_cpu is set to "sparc" so as # to short-circuit subsequent tests. # Grep the linux kernel /proc/cpuinfo pseudo-file. # A typical line is "cpu\t\t: TI UltraSparc II (BlackBird)" # See arch/sparc/kernel/cpu.c and arch/sparc64/kernel/cpu.c. # if test -f /proc/cpuinfo; then if grep 'cpu.*Cypress' /proc/cpuinfo >/dev/null; then exact_cpu="sparc" # ie. v7 elif grep 'cpu.*Power-UP' /proc/cpuinfo >/dev/null; then exact_cpu="sparc" # ie. v7 elif grep 'cpu.*HyperSparc' /proc/cpuinfo >/dev/null; then exact_cpu="sparcv8" elif grep 'cpu.*SuperSparc' /proc/cpuinfo >/dev/null; then exact_cpu="supersparc" elif grep 'cpu.*MicroSparc' /proc/cpuinfo >/dev/null; then exact_cpu="microsparc" elif grep 'cpu.*MB86904' /proc/cpuinfo >/dev/null; then # actually MicroSPARC-II exact_cpu=microsparc elif grep 'cpu.*UltraSparc T1' /proc/cpuinfo >/dev/null; then # this grep pattern has not been tested against any Linux exact_cpu="ultrasparct1" elif grep 'cpu.*UltraSparc III' /proc/cpuinfo >/dev/null; then exact_cpu="ultrasparc3" elif grep 'cpu.*UltraSparc IIi' /proc/cpuinfo >/dev/null; then exact_cpu="ultrasparc2i" elif grep 'cpu.*UltraSparc II' /proc/cpuinfo >/dev/null; then exact_cpu="ultrasparc2" elif grep 'cpu.*UltraSparc' /proc/cpuinfo >/dev/null; then exact_cpu="ultrasparc" fi fi # Grep the output from sysinfo on SunOS. # sysinfo has been seen living in /bin or in /usr/kvm # cpu0 is a "SuperSPARC Model 41 SPARCmodule" CPU # cpu0 is a "75 MHz TI,TMS390Z55" CPU # if test -z "$exact_cpu"; then for i in sysinfo /usr/kvm/sysinfo; do if $SHELL -c $i 2>/dev/null >conftest.dat; then if grep 'cpu0 is a "SuperSPARC' conftest.dat >/dev/null; then exact_cpu=supersparc break elif grep 'cpu0 is a .*TMS390Z5.' conftest.dat >/dev/null; then # TMS390Z50 and TMS390Z55 exact_cpu=supersparc break fi fi done rm -f conftest.dat fi # Grep the output from prtconf on Solaris. # Use an explicit /usr/sbin, since that directory might not be in a normal # user's path. # # SUNW,UltraSPARC (driver not attached) # SUNW,UltraSPARC-II (driver not attached) # SUNW,UltraSPARC-IIi (driver not attached) # SUNW,UltraSPARC-III+ (driver not attached) # Ross,RT625 (driver not attached) # TI,TMS390Z50 (driver not attached) # # /usr/sbin/sysdef prints similar information, but includes all loadable # cpu modules, not just the real cpu. # # We first try a plain prtconf, since that is known to work on older systems. # But for newer T1 systems, that doesn't produce any useful output, we need # "prtconf -vp" there. # for prtconfopt in "" "-vp"; do if test -z "$exact_cpu"; then if $SHELL -c "/usr/sbin/prtconf $prtconfopt" 2>/dev/null >conftest.dat; then if grep 'SUNW,UltraSPARC-T1' conftest.dat >/dev/null; then exact_cpu=ultrasparct1 elif grep 'SUNW,UltraSPARC-III' conftest.dat >/dev/null; then exact_cpu=ultrasparc3 elif grep 'SUNW,UltraSPARC-IIi' conftest.dat >/dev/null; then exact_cpu=ultrasparc2i elif grep 'SUNW,UltraSPARC-II' conftest.dat >/dev/null; then exact_cpu=ultrasparc2 elif grep 'SUNW,UltraSPARC' conftest.dat >/dev/null; then exact_cpu=ultrasparc elif grep 'Ross,RT62.' conftest.dat >/dev/null; then # RT620, RT625, RT626 hypersparcs (v8). exact_cpu=sparcv8 elif grep 'TI,TMS390Z5.' conftest.dat >/dev/null; then # TMS390Z50 and TMS390Z55 exact_cpu=supersparc elif grep 'TI,TMS390S10' conftest.dat >/dev/null; then exact_cpu=microsparc elif grep 'FMI,MB86904' conftest.dat >/dev/null; then # actually MicroSPARC-II exact_cpu=microsparc fi fi rm -f conftest.dat fi done # Grep the output from sysctl hw.model on sparc or sparc64 *BSD. # Use an explicit /sbin, since that directory might not be in a normal # user's path. Example outputs, # # hw.model: Sun Microsystems UltraSparc-IIi # if test -z "$exact_cpu"; then if $SHELL -c "/sbin/sysctl hw.model" 2>/dev/null >conftest.dat; then if grep 'UltraSparc-T1' conftest.dat >/dev/null; then # this grep pattern has not been tested against any BSD exact_cpu=ultrasparct1 elif grep 'UltraSparc-III' conftest.dat >/dev/null; then exact_cpu=ultrasparc3 elif grep 'UltraSparc-IIi' conftest.dat >/dev/null; then exact_cpu=ultrasparc2i elif grep 'UltraSparc-II' conftest.dat >/dev/null; then exact_cpu=ultrasparc2 elif grep 'UltraSparc' conftest.dat >/dev/null; then exact_cpu=ultrasparc elif grep 'TMS390Z5.' conftest.dat >/dev/null; then # TMS390Z50 and TMS390Z55 exact_cpu=supersparc elif grep 'TMS390S10' conftest.dat >/dev/null; then exact_cpu=microsparc elif grep 'MB86904' conftest.dat >/dev/null; then # actually MicroSPARC-II exact_cpu=microsparc elif grep 'MB86907' conftest.dat >/dev/null; then exact_cpu=turbosparc fi fi rm -f conftest.dat fi # sun4m and sun4d are v8s of some sort, sun4u is a v9 of some sort # if test -z "$exact_cpu"; then case `uname -m` in sun4[md]) exact_cpu=sparcv8 ;; sun4u) exact_cpu=sparcv9 ;; esac fi ;; i?86-*-*) cat <${dummy}1.s .globl cpuid .globl _cpuid cpuid: _cpuid: pushl %esi pushl %ebx movl 16(%esp),%eax .byte 0x0f .byte 0xa2 movl 12(%esp),%esi movl %ebx,(%esi) movl %edx,4(%esi) movl %ecx,8(%esi) popl %ebx popl %esi ret EOF cat <${dummy}2.c main () { char vendor_string[13]; char dummy_string[12]; long fms; int family, model, stepping; char *modelstr; cpuid (vendor_string, 0); vendor_string[12] = 0; fms = cpuid (dummy_string, 1); family = (fms >> 8) & 15; model = (fms >> 4) & 15; stepping = fms & 15; modelstr = "i486"; if (strcmp (vendor_string, "GenuineIntel") == 0) { switch (family) { case 5: if (model <= 2) modelstr = "pentium"; else if (model >= 4) modelstr = "pentiummmx"; break; case 6: if (model == 1) modelstr = "pentiumpro"; else if (model <= 6) modelstr = "pentium2"; else modelstr = "pentium3"; break; case 15: modelstr = "pentium4"; break; } } else if (strcmp (vendor_string, "AuthenticAMD") == 0) { switch (family) { case 5: if (model <= 3) modelstr = "k5"; else if (model <= 7) modelstr = "k6"; else if (model <= 8) modelstr = "k62"; else if (model <= 9) modelstr = "k63"; break; case 6: modelstr = "athlon"; break; case 15: /* We might want to return opteron, athlon64, or the CPU core name hammer here instead of the architecture name x86_64. */ modelstr = "x86_64"; break; } } else if (strcmp (vendor_string, "CyrixInstead") == 0) { /* Should recognize Cyrix' processors too. */ } else if (strcmp (vendor_string, "CentaurHauls") == 0) { switch (family) { case 6: if (model < 9) modelstr = "viac3"; else modelstr = "viac32"; break; } } printf ("%s\n", modelstr); return 0; } EOF if ($CC_FOR_BUILD ${dummy}1.s ${dummy}2.c -o $dummy) >/dev/null 2>&1; then # On 80386 and early 80486 cpuid is not available and will result in a # SIGILL message, hence 2>/dev/null. # # On i386-unknown-freebsd4.9, "/bin/sh -c ./dummy" seems to send an # "Illegal instruction (core dumped)" message to stdout, so we test $? # to check if the program run was successful. # x=`$SHELL -c ./$dummy 2>/dev/null` if test $? = 0 && test -n "$x"; then exact_cpu=$x fi fi # We need to remove some .o files here since lame C compilers # generate these even when not asked. rm -f ${dummy}1.s ${dummy}1.o ${dummy}2.c ${dummy}2.o $dummy ;; esac # ------------------------------------------------------------------------- # Use an exact cpu, if possible if test -n "$exact_cpu"; then echo "$exact_cpu$guess_rest" else echo "$guess_full" fi exit 0 # Local variables: # fill-column: 76 # End: gf2x-1.2/config/config.sub0000755000327606072450000001003712725540356012425 00000000000000#! /bin/sh # # GMP config.sub wrapper. # Copyright 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. # # This file is part of the GNU MP Library. # # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or (at # your option) any later version. # # The GNU MP Library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public # License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # Usage: config.sub CPU-VENDOR-OS # config.sub ALIAS # # Validate and canonicalize the given configuration name, with special # handling for GMP extra CPU names. # # When the CPU isn't special the whole name is simply passed straight # through to configfsf.sub. # # When the CPU is a GMP extra, configfsf.sub is run on a similar CPU that it # will recognise. For example "athlon-pc-freebsd3.5" is validated using # "i386-pc-freebsd3.5". # # Any canonicalizations made by configfsf.sub are preserved. For example # given "athlon-linux", configfsf.sub is called with "i386-linux" and will # give back "i386-pc-linux-gnu". "athlon" is then reinstated, so we print # "athlon-pc-linux-gnu". # Expect to find configfsf.sub in the same directory as this config.sub configfsf_sub="`echo \"$0\" | sed 's/config.sub$/configfsf.sub/'`" if test "$configfsf_sub" = "$0"; then echo "Cannot derive configfsf.sub from $0" 1>&2 exit 1 fi if test -f "$configfsf_sub"; then : else echo "$configfsf_sub not found" 1>&2 exit 1 fi # Always run configfsf.sub with $SHELL, like autoconf does for config.sub SHELL=${CONFIG_SHELL-/bin/sh} # Identify ourselves on --version, --help, etc case "$1" in "" | -*) echo "(GNU MP wrapped config.sub)" 1>&2 $SHELL $configfsf_sub "$@" exit ;; esac given_full="$1" given_cpu=`echo "$given_full" | sed 's/-.*$//'` given_rest=`echo "$given_full" | sed 's/^[^-]*//'` # Aliases for GMP extras case "$given_cpu" in # configfsf.sub turns p5 into i586, instead use our exact cpu type p5 | p54) given_cpu=pentium ;; p55) given_cpu=pentiummmx ;; # configfsf.sub turns p6, pentiumii and pentiumiii into i686, instead use # our exact cpu types p6) given_cpu=pentiumpro ;; pentiumii) given_cpu=pentium2 ;; pentiumiii) given_cpu=pentium3 ;; esac given_full="$given_cpu$given_rest" # GMP extras and what to use for the config.sub test case "$given_cpu" in itanium | itanium2) test_cpu=ia64 ;; pentium | pentiummmx | pentiumpro | pentium[234] | k[56] | k6[23] | athlon | viac3*) test_cpu=i386 ;; power[2-9] | power2sc) test_cpu=power ;; powerpc401 | powerpc403 | powerpc405 | \ powerpc505 | \ powerpc601 | powerpc602 | \ powerpc603 | powerpc603e | \ powerpc604 | powerpc604e | \ powerpc620 | powerpc630 | powerpc970 | \ powerpc740 | powerpc7400 | powerpc7450 | powerpc750 | \ powerpc801 | powerpc821 | powerpc823 | powerpc860 | \ powerpc64) test_cpu=powerpc ;; sparcv8 | supersparc | microsparc | \ ultrasparc | ultrasparc2 | ultrasparc2i | ultrasparc3 | ultrasparct1) test_cpu=sparc ;; sh2) test_cpu=sh ;; *) # Don't need or want to change the given name, just run configfsf.sub $SHELL $configfsf_sub "$given_full" if test $? = 0; then exit 0 else echo "(GNU MP wrapped config.sub, testing \"$given_full\")" exit 1 fi esac test_full="$test_cpu$given_rest" canonical_full=`$SHELL $configfsf_sub "$test_full"` if test $? = 0; then : else echo "(GNU MP wrapped config.sub, testing \"$given_full\" as \"$test_full\")" exit 1 fi canonical_rest=`echo "$canonical_full" | sed 's/^[^-]*//'` echo "$given_cpu$canonical_rest" exit 0 # Local variables: # fill-column: 76 # End: gf2x-1.2/config/depcomp0000755000327606072450000005601713126452055012021 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2016-01-11.22; # UTC # Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gf2x-1.2/config/install-sh0000755000327606072450000003546313126452055012452 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gf2x-1.2/config/ltmain.sh0000644000327606072450000117147413126452050012265 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-2" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.6-2 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: gf2x-1.2/config/missing0000755000327606072450000001533013126452055012034 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gf2x-1.2/config/configfsf.sub0000755000327606072450000010636712725540356013140 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gf2x-1.2/config/configfsf.guess0000755000327606072450000012463712725540356013475 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gf2x-1.2/config/test-driver0000755000327606072450000001104013126452055012625 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gf2x-1.2/fft/0000755000327606072450000000000013126452066010027 500000000000000gf2x-1.2/fft/gf2x-fft.h0000644000327606072450000000313712725540356011553 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_FFT_H_ #define GF2X_FFT_H_ #include "gf2x-fake-fft.h" #include "gf2x-cantor-fft.h" #include "gf2x-ternary-fft.h" #ifdef __cplusplus #include "fft_adapter.hpp" DEFINE_FFT_ADAPTER(gf2x_fake_fft) DEFINE_FFT_ADAPTER(gf2x_cantor_fft) DEFINE_FFT_ADAPTER(gf2x_ternary_fft) #endif #endif /* GF2X_FFT_H_ */ gf2x-1.2/fft/gf2x-fake-fft.h0000644000327606072450000001153412725540356012457 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_FAKE_FFT_FFT_H_ #define GF2X_FAKE_FFT_FFT_H_ #include #include #include "gf2x/gf2x-config-export.h" #include "gf2x/gf2x-impl-export.h" #include "gf2x/gf2x-thresholds.h" /* This file is a placeholder for the typical requirements of an FFT * interface. Of course, there is nothing interesting being done here. * It's just an E-X-A-M-P-L-E. See also the .c file. * * * A unified adapter for the CXX code is in fft-adapter.hpp */ /* TODO * * There is some space wasted here. We're only copying the data when * doing the transforms, so we might as well keep the data as is. This * implies that it would perhaps make more sense not to have a separate * structure for this case -- although of course this could make the * calling interface more complicated. * */ #ifdef __cplusplus extern "C" { #endif struct gf2x_fake_fft_info_struct { size_t n1,n2,n3; size_t acc; size_t size; }; typedef struct gf2x_fake_fft_info_struct gf2x_fake_fft_info_t[1]; typedef struct gf2x_fake_fft_info_struct * gf2x_fake_fft_info_ptr; typedef const struct gf2x_fake_fft_info_struct * gf2x_fake_fft_info_srcptr; typedef unsigned long gf2x_fake_fft_t; typedef gf2x_fake_fft_t * gf2x_fake_fft_ptr; typedef const gf2x_fake_fft_t * gf2x_fake_fft_srcptr; extern void gf2x_fake_fft_init(gf2x_fake_fft_info_ptr p, size_t nF, size_t nG, ...); static inline void gf2x_fake_fft_clear(gf2x_fake_fft_info_ptr p GF2X_MAYBE_UNUSED) {} static inline gf2x_fake_fft_ptr gf2x_fake_fft_alloc(gf2x_fake_fft_info_srcptr p, size_t n) { return (gf2x_fake_fft_ptr) malloc(n * p->size * sizeof(unsigned long)); } static inline void gf2x_fake_fft_free(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr x, size_t n GF2X_MAYBE_UNUSED) { free(x); } static inline gf2x_fake_fft_ptr gf2x_fake_fft_get(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr x, size_t k) { return x + (k * p->size); } static inline gf2x_fake_fft_srcptr gf2x_fake_fft_get_const(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_srcptr x, size_t k) { return x + (k * p->size); } static inline void gf2x_fake_fft_zero(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr x, size_t n) { memset(x, 0, n * p->size * sizeof(unsigned long)); } extern void gf2x_fake_fft_dft(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr x, const unsigned long * F, size_t nF); extern void gf2x_fake_fft_compose(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr y, gf2x_fake_fft_srcptr x1, gf2x_fake_fft_srcptr x2); extern void gf2x_fake_fft_addcompose_n(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr y, gf2x_fake_fft_srcptr *x1, gf2x_fake_fft_srcptr *x2, size_t n); extern void gf2x_fake_fft_addcompose(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr y, gf2x_fake_fft_srcptr x1, gf2x_fake_fft_srcptr x2); extern void gf2x_fake_fft_add(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr y, gf2x_fake_fft_srcptr x1, gf2x_fake_fft_srcptr x2); extern void gf2x_fake_fft_cpy(gf2x_fake_fft_info_srcptr p, gf2x_fake_fft_ptr y, gf2x_fake_fft_srcptr x); extern void gf2x_fake_fft_ift(gf2x_fake_fft_info_srcptr p, unsigned long * H, size_t Hl, gf2x_fake_fft_srcptr h); extern size_t gf2x_fake_fft_size(gf2x_fake_fft_info_srcptr p); extern void gf2x_fake_fft_init_similar(gf2x_fake_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_fake_fft_info_srcptr other); extern int gf2x_fake_fft_compatible(gf2x_fake_fft_info_srcptr o1, gf2x_fake_fft_info_srcptr o2); static inline int gf2x_fake_fft_recoverorder(gf2x_fake_fft_info_srcptr o GF2X_MAYBE_UNUSED) { return 0; } #ifdef __cplusplus } #endif #endif /* GF2X_FAKE_FFT_FFT_H_ */ /* vim: set sw=4 sta et: */ gf2x-1.2/fft/gf2x-cantor-fft.h0000644000327606072450000001571213125145133013026 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* An implementation of Cantor's algorithm for multiplication of Copyright 2007 Pierrick Gaudry. Copyright 2008,2009,2010,2012 Emmanuel Thomé. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with CADO-NFS; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_FFT_CANTOR_H_ #define GF2X_FFT_CANTOR_H_ #include #include #include "gf2x.h" #include "gf2x/gf2x-config-export.h" #include "gf2x/gf2x-thresholds.h" /* GF2X_WORDSIZE */ #ifdef __cplusplus extern "C" { #endif // we must implement some sort of fallback on the fake_fft thing when the // polynomials are too small, or something like this. The gf2x-fft // interface requires that any size can be used. struct gf2x_cantor_fft_info_struct { unsigned int k; size_t n; }; typedef struct gf2x_cantor_fft_info_struct gf2x_cantor_fft_info_t[1]; typedef struct gf2x_cantor_fft_info_struct * gf2x_cantor_fft_info_ptr; typedef const struct gf2x_cantor_fft_info_struct * gf2x_cantor_fft_info_srcptr; #if !defined(GF2X_WORDSIZE) || (GF2X_WORDSIZE != 32 && GF2X_WORDSIZE != 64) #error "define GF2X_WORDSIZE to either 32 or 64" #endif #if !defined(CANTOR_BASE_FIELD_SIZE) || (CANTOR_BASE_FIELD_SIZE != 64 && CANTOR_BASE_FIELD_SIZE != 128) #error "Define CANTOR_BASE_FIELD_SIZE to 64 or 128" #endif #if CANTOR_BASE_FIELD_SIZE == 128 #if GF2X_WORDSIZE == 64 #include "mpfq/x86_64/mpfq_2_128.h" #else #include "mpfq/i386/mpfq_2_128.h" #endif typedef mpfq_2_128_elt gf2x_cantor_fft_base_field_elt; #else #if GF2X_WORDSIZE == 64 #include "mpfq/x86_64/mpfq_2_64.h" #else #include "mpfq/i386/mpfq_2_64.h" #endif typedef mpfq_2_64_elt gf2x_cantor_fft_base_field_elt; #endif typedef gf2x_cantor_fft_base_field_elt * gf2x_cantor_fft_ptr; typedef const gf2x_cantor_fft_base_field_elt * gf2x_cantor_fft_srcptr; /* sets up the appropriate data for multiplying polynomials having * numbers of coefficients bounded respectively by nF and nG. This does * not allocate a transform in itself: only the descriptor structure that * will be useful for allocating transforms with _alloc. */ extern void gf2x_cantor_fft_init(gf2x_cantor_fft_info_t p, size_t nF, size_t nG, ...); /* paired with previous function. Zeroes out the initialization that was * done. */ extern void gf2x_cantor_fft_clear(gf2x_cantor_fft_info_t p GF2X_MAYBE_UNUSED); /* allocates space for n transforms, according to the transform info at p */ extern gf2x_cantor_fft_ptr gf2x_cantor_fft_alloc(const gf2x_cantor_fft_info_t p, size_t n); /* frees the n transforms allocated at x */ extern void gf2x_cantor_fft_free( const gf2x_cantor_fft_info_t p GF2X_MAYBE_UNUSED, gf2x_cantor_fft_ptr x, size_t n GF2X_MAYBE_UNUSED); /* accesses the k-th transform stored at location x. */ extern gf2x_cantor_fft_ptr gf2x_cantor_fft_get(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, size_t k); /* accesses the k-th transform stored at location x. */ extern gf2x_cantor_fft_srcptr gf2x_cantor_fft_get_const(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_srcptr x, size_t k); /* initialize to zero the n transforms allocated at x */ extern void gf2x_cantor_fft_zero(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, size_t n); /* performs a direct transform of F, having at most nF coefficients. */ extern void gf2x_cantor_fft_dft(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, const unsigned long * F, size_t nF); /* composes the transforms of two polynomials. The result is by * definition the transform of their product. */ extern void gf2x_cantor_fft_compose(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2); /* compose the n transforms at x1[0..[ and x2[0..[, accumulates the sum * of the result to y[0..[ */ extern void gf2x_cantor_fft_addcompose_n(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr * x1, gf2x_cantor_fft_srcptr * x2, size_t); /* compose the n transforms at x1 and x2, accumulates the result to * y[0..[ */ extern void gf2x_cantor_fft_addcompose(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2); /* adds two transforms (the direct transform is linear). */ extern void gf2x_cantor_fft_add(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2); /* copy */ extern void gf2x_cantor_fft_cpy(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x); /* performs an inverse transform. nH is the number of coefficients. */ extern void gf2x_cantor_fft_ift(const gf2x_cantor_fft_info_t p, unsigned long * H, size_t Hl, gf2x_cantor_fft_ptr h); extern size_t gf2x_cantor_fft_size(gf2x_cantor_fft_info_srcptr p); extern void gf2x_cantor_fft_init_similar(gf2x_cantor_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_cantor_fft_info_srcptr other); extern int gf2x_cantor_fft_compatible(gf2x_cantor_fft_info_srcptr o1, gf2x_cantor_fft_info_srcptr o2); static inline int gf2x_cantor_fft_recoverorder(gf2x_cantor_fft_info_srcptr o) { return o->k; } #ifdef __cplusplus } #endif #endif /* GF2X_FFT_CANTOR_H_ */ gf2x-1.2/fft/gf2x-ternary-fft.h0000644000327606072450000001023512725540356013232 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_TERNARY_FFT_H_ #define GF2X_TERNARY_FFT_H_ #ifdef __cplusplus extern "C" { #endif struct gf2x_ternary_fft_info_s { size_t bits_a; // number of bits of operand1 size_t bits_b; // number of bits of operand2 size_t K; // 0 indicates fallback. size_t M; unsigned long * tmp; size_t * perm; int split; // boolean }; typedef struct gf2x_ternary_fft_info_s gf2x_ternary_fft_info_t[1]; typedef struct gf2x_ternary_fft_info_s * gf2x_ternary_fft_info_ptr; typedef const struct gf2x_ternary_fft_info_s * gf2x_ternary_fft_info_srcptr; typedef unsigned long gf2x_ternary_fft_t; typedef gf2x_ternary_fft_t * gf2x_ternary_fft_ptr; typedef const gf2x_ternary_fft_t * gf2x_ternary_fft_srcptr; extern size_t gf2x_ternary_fft_size(gf2x_ternary_fft_info_srcptr o); extern gf2x_ternary_fft_ptr gf2x_ternary_fft_get(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr ptr, size_t k); extern gf2x_ternary_fft_srcptr gf2x_ternary_fft_get_const(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_srcptr ptr, size_t k); extern void gf2x_ternary_fft_zero(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr ptr, size_t n); extern void gf2x_ternary_fft_cpy(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr y, gf2x_ternary_fft_srcptr x); extern gf2x_ternary_fft_ptr gf2x_ternary_fft_alloc(gf2x_ternary_fft_info_srcptr o, size_t n); extern void gf2x_ternary_fft_free(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr ptr, size_t n); extern void gf2x_ternary_fft_dft(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tr, const unsigned long * a, size_t bits_a); extern void gf2x_ternary_fft_compose(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb); extern void gf2x_ternary_fft_addcompose_n(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr * ta, gf2x_ternary_fft_srcptr * tb, size_t n); extern void gf2x_ternary_fft_addcompose(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb); extern void gf2x_ternary_fft_add(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb); extern void gf2x_ternary_fft_ift(gf2x_ternary_fft_info_srcptr o, unsigned long * c, size_t bits_c, gf2x_ternary_fft_ptr tr); extern void gf2x_ternary_fft_init(gf2x_ternary_fft_info_ptr o, size_t bits_a, size_t bits_b, ...); extern void gf2x_ternary_fft_init_similar(gf2x_ternary_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_ternary_fft_info_srcptr other); extern int gf2x_ternary_fft_compatible(gf2x_ternary_fft_info_srcptr o1, gf2x_ternary_fft_info_srcptr o2); extern void gf2x_ternary_fft_clear(gf2x_ternary_fft_info_ptr o); static inline int gf2x_ternary_fft_recoverorder(gf2x_ternary_fft_info_srcptr o) { return ((o)->K * ((o)->split ? -1 : 1)); } #ifdef __cplusplus } #endif #endif /* GF2X_TERNARY_FFT_H_ */ gf2x-1.2/fft/gf2x-ternary-fft.c0000644000327606072450000010356512725540356013236 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Multiplication over GF(2)[x] using Fast Fourier Transform. * Bit-aligned version. */ #include "gf2x/gf2x-config.h" #include #include /* for uint64_t in Lshift */ #include #include #include /* for the fft interface */ #include "gf2x.h" #include "gf2x/gf2x-impl.h" #include "gf2x-ternary-fft.h" // #define DEBUG // #define DEBUG_LSHIFT // #define DEBUG_MULMOD // #define VERBOSE // #define TIMING /* The check in tunefft finds that gf2x_mul_fft does not work correctly for balanced operands of size <= 13 words. Hence this threshhold. */ #ifndef MUL_FFT_THRESHOLD #define MUL_FFT_THRESHOLD 28 #endif #if (MUL_FFT_THRESHOLD < 28) #error "MUL_FFT_THRESHOLD too small, should be at least 28" #endif /* Assume wordlength WLEN is 32 or 64 */ # define WLEN GF2X_WORDSIZE /** Some support functions. **/ /* CEIL(a,b) = ceiling(a/b) */ static inline size_t CEIL(size_t a, size_t b) { return ((a)+(b)-1)/(b); } /* W(b) is the number of words needed to store b bits */ static inline size_t W(size_t b) { return CEIL(b, WLEN); } /* I(b) is the index word of bit b, assuming bits 0..WLEN-1 have index 0 */ static inline size_t I(size_t b) { return b / WLEN; } static inline size_t R(size_t b) { return b % WLEN; } static inline size_t R2(size_t b) /* remaining bits */ { return (-b) % WLEN; } static inline unsigned long MASK(size_t x) { ASSERT(x < WLEN); return ((1UL << (x)) - 1UL); } /* GETBIT(a,i) gets the i-th bit of the bit-array starting at a[0], XORBIT(a,i,x) xors this bit with the bit x, where x = 0 or 1. */ static inline unsigned long GETBIT(unsigned long *a, size_t i) { return (a[I(i)] >> R(i)) & 1UL; } static inline void XORBIT(unsigned long *a, size_t i, unsigned long x) { ASSERT((x & ~1UL) == 0); a[I(i)] ^= x << R(i); } /* Don't define MIN, MAX, ABS as inlines, as they're already quite * customarily defined as macros */ #ifndef MAX #define MAX(h,i) ((h) > (i) ? (h) : (i)) #endif #ifndef MIN #define MIN(h,i) ((h) < (i) ? (h) : (i)) #endif #ifndef ABS #define ABS(h) ((h) < 0 ? -(h) : (h)) #endif static void *malloc_or_die(size_t size) { void *res = malloc(size); if (res == NULL) abort(); return res; } static inline void Copy(unsigned long *a, const unsigned long *b, size_t n) { memcpy(a, b, n * sizeof(unsigned long)); } static inline void Zero(unsigned long *a, size_t n) { memset(a, 0, n * sizeof(unsigned long)); } static inline void Clear(unsigned long *a, size_t low, size_t high) { if (high > low) memset (a + low, 0, (high - low) * sizeof(unsigned long)); } /** Now the specific things */ /* a <- b + c */ static void AddMod(unsigned long *a, unsigned long *b, unsigned long *c, size_t n) { for (size_t i = 0; i < n; i++) a[i] = b[i] ^ c[i]; } /* a <- b + c + d */ static void AddMod3 (unsigned long *a, unsigned long *b, unsigned long *c, unsigned long *d, size_t n) { for (size_t i = 0; i < n; i++) a[i] = b[i] ^ c[i] ^ d[i]; } /* c <- a * x^k, return carry out, 0 <= k < WLEN */ static unsigned long Lsh (unsigned long *c, unsigned long *a, size_t n, size_t k) { if (k == 0) { if (c != a) Copy(c, a, n); return 0; } /* {c, n} and {a, n} should not overlap */ ASSERT(c <= a || a + n <= c); ASSERT(k > 0); unsigned long t, cy = 0; for (size_t i = 0; i < n; i++) { t = (a[i] << k) | cy; cy = a[i] >> (WLEN - k); c[i] = t; } return cy; } /* c <- c + a * x^k, return carry out, 0 <= k < WLEN */ static unsigned long AddLsh(unsigned long *c, unsigned long *a, size_t n, size_t k) { unsigned long t, cy = 0; if (k == 0) { AddMod(c, c, a, n); return 0; } /* {c, n} and {a, n} should not overlap */ ASSERT(c <= a || a + n <= c); ASSERT(k > 0); for (size_t i = 0; i < n; i++) { t = (a[i] << k) | cy; cy = a[i] >> (WLEN - k); c[i] ^= t; } return cy; } /* c <- a / x^k, return carry out, 0 <= k < WLEN */ static unsigned long Rsh (unsigned long *c, const unsigned long *a, size_t n, size_t k) { if (k == 0) { if (c != a) Copy(c, a, n); return 0; } ASSERT(k > 0); unsigned long t, cy = 0; for (size_t i = n; i-- ; ) { t = (a[i] >> k) | cy; cy = a[i] << (WLEN - k); c[i] = t; } return cy; } /* c <- c + a / x^k, return carry out, 0 <= k < WLEN */ static unsigned long AddRsh(unsigned long *c, unsigned long *a, size_t n, size_t k) { unsigned long t, cy = 0; if (k == 0) { AddMod(c, c, a, n); return 0; } ASSERT(k > 0); for (size_t i = n ; i-- ; ) { t = (a[i] >> k) | cy; cy = a[i] << (WLEN - k); c[i] ^= t; } return cy; } #if (defined(DEBUG) || defined(DEBUG_LSHIFT) || defined(DEBUG_MULMOD)) static void dump(const unsigned long *a, size_t n) { for (size_t i = 0; i < n; i++) { printf("+%lu*X^%lu", a[i], i); if ((i + 1) % 3 == 0) printf("\n"); } printf(":\n"); } #endif /* a <- b * x^k mod x^(2*N)+x^N+1. Assume a and b do not overlap. */ static void Lshift(unsigned long *a, unsigned long *b, uint64_t k, size_t N) { size_t r, h, l, n, ih, il; unsigned long s1=0, s2=0; // hush gcc n = W(2 * N); #ifdef DEBUG_LSHIFT printf("R:=x^%u+x^%u+1: k:=%ld:\nb:=", 2 * N, N, k); dump(b, n); #endif k = k % (3 * N); ASSERT(k < 3 * N); if (k == 0) { if (a != b) Copy(a, b, n); } else if (k <= N) { /* ------------------------------------------ | L0 | L1 | L2 | H | ------------------------------------------ ------------------------------------------ | H | L0 | L1+H | L2 | ------------------------------------------ L0 has l bits, L1 has h bits, L2 has l bits, H has h bits */ h = k; /* 1 <= h <= N */ ASSERT(h <= N); ASSERT(1 <= h); l = N - h; /* 0 <= l < N */ /* A <- 0:L0:L1:L2 */ s1 = Lsh(a + I(h), b, W(N + l), R(h)); /* b[W(N + l)-1] has R2(N+l) bits from H, thus s1 has no bit from L if R(h) <= R2(N+l), and R(h)-R2(N+l) bits from L otherwise */ if (R(h) > R2(N + l)) a[I(h) + W(N + l)] = s1 & MASK(R(h) - R2(N + l)); if (n - I(N + l) > I(h)) s1 = a[I(h)]; if (n - I(N + l) > I(h) + 1) s2 = a[I(h) + 1]; ASSERT(n - I(N + l) <= I(h) + 2); /* copy H in low words: will clobber a[0]..a[n-I(N+l)-1] */ Rsh(a, b + I(N + l), n - I(N + l), R(N + l)); if (n - I(N + l) > I(h)) a[I(h)] ^= s1; if (n - I(N + l) > I(h) + 1) a[I(h) + 1] ^= s2; /* we now have a = H:L0:L1:L2 */ /* add H in high words */ if (R(N + l) <= R(N)) { s1 = AddLsh(a + I(N), b + I(N + l), n - I(N + l), R(N) - R(N + l)); /* we have to remove the high R(N+l) bits from L2 */ a[I(N)] ^= (b[I(N + l)] & MASK(R(N + l))) << (R(N) - R(N + l)); if (s1) a[I(N) + n - I(N + l)] ^= s1; } else { /* the low word from H in b contains R(N + l) bits from L2, and the low word from L1+H in a contains R(N) bits from L0. After the shift, it remains R(N) bits from L2 */ AddRsh(a + I(N), b + I(N + l), n - I(N + l), R(N + l) - R(N)); if (R(N)) a[I(N)] ^= (b[I(N + l)] & MASK(R(N + l))) >> (R(N + l) - R(N)); } } else if (k <= 2 * N) { /* ------------------------------------------ | L | H0 | H1 | H2 | ------------------------------------------ ------------------------------------------ | H0+H2 | H1 | H0 | L+H1 | ------------------------------------------ L has l bits, H0 has h bits, H1 has l bits, H2 has h bits */ h = k - N; /* 1 <= h <= N */ l = N - h; /* 0 <= l < N */ r = R(l); Rsh(a, b + I(l), W(N + l) - I(l), r); /* mask high bits */ if (R(N)) a[I(N)] &= MASK(R(N)); /* now we have a = H0:H1 */ if (R(N) > 0) s1 = a[I(N)]; // ASSERT(I(N) >= 0); s2 = Lsh(a + I(N), a, I(N), R(N)); if (R(N) > 0) { a[I(N)] ^= s1; /* restore high R(N) bits */ a[2 * I(N)] = s2 ^ (s1 << R(N)); if (2 * R(N) > WLEN) a[2 * I(N) + 1] = s1 >> (WLEN - R(N)); } /* now we have a = H0:H1:H0:H1 */ AddRsh(a, b + I(N + l), W(2 * N) - I(N + l), R(N + l)); /* now we have a = H0+H2:H1:H0:H1 */ s1 = AddLsh(a + I(N + h), b, W(l), R(N + h)); if (r > 0) /* mask shifted low bits from H0 */ a[I(N + h) + I(l)] ^= (b[I(l)] & ~MASK(R(l))) << R(N + h); /* b[W(l)-1] contains R2(l) bits from H0, thus if R(N+h) > R2(l), then s1 contains R(N+h)-R2(l) bits from L */ if (R(N + h) > R2(l)) a[I(N + h) + W(l)] ^= s1 & MASK(R(N + h) - R2(l)); } else { /* 2*N < k < 3*N */ /* ------------------------------------------ | L | H0 | H1 | H2 | ------------------------------------------ ------------------------------------------ | H0+H2 | H1 | H0 | L+H1 | after k-N ------------------------------------------ ------------------------------------------ | H0 | L+H1 | H2 | L | ------------------------------------------ L has l bits, H0 has h bits, H1 has l bits, H2 has h bits */ h = k - 2 * N; /* 1 <= h < N */ l = N - h; /* 0 < l < N */ il = W(2 * N) - I(l); Rsh(a, b + I(l), il, R(l)); /* we now have a = H0:H1:H2:0 */ s1 = AddLsh(a + I(h), b, W(l), R(h)); /* H0:H1+L:H2:0 */ if (R(h) > R2(l)) /* add least R(h) - R2(l) bits from s1 */ a[I(h) + W(l)] ^= s1 & MASK(R(h) - R2(l)); else if (R2(l) > R(h)) /* mask low bits from H0 */ a[I(h) + W(l) - 1] ^= (b[W(l) - 1] & ~MASK(R(l))) << R(h); /* we now have a = H0:H1+L:H2:0 */ ih = I(N + h); /* index of lowest word from L in a */ if (R(N + h) > 0) /* H2 and L share a common word a[ih] */ s2 = a[ih]; // ASSERT(W(l) >= 0); s1 = Lsh(a + ih, b, W(l), R(N + h)); /* H0:H1+L:H2:L */ /* b[W(l)-1] contains R2(l) bits of H0, thus if R(N+h) > R2(l), s1 contains R(N+h) - R2(l) bits of L */ if (R(N + h) > R2(l)) a[ih + W(l)] = s1 & MASK(R(N + h) - R2(l)); if (R(N + h) > 0) a[ih] ^= s2; } /* mask high bits of result */ r = R(2 * N); if (r > 0) a[n - 1] &= MASK(r); #ifdef DEBUG_LSHIFT printf("a:="); dump(a, n); #endif } /* a <- b * c mod x^(2*N)+x^(N)+1. Assumes t has space for 2n words, and u for gf2x_toomspace(n) words, where n = ceil(2N/WLEN). a and b may be equal. a must have space for n words. */ static void MulMod(unsigned long *a, const unsigned long *b, const unsigned long *c, size_t N, unsigned long *t, unsigned long *u) { size_t n = W(2 * N), sh, l; /* FIXME: in practice N is divisible by a multiple of 3, thus if WLEN is a power of two, R(N) > 0 and W(N) = I(N) + 1, thus we can avoid a few tests below. */ #ifdef DEBUG_MULMOD printf("b:="); dump(b, n); printf("c:="); dump(c, n); #endif gf2x_mul_toom(t, b, c, n, u); /* t = | L0:N | L1:N | H0:N | H1:N | */ /* t mod x^(2*N)+x^(N)+1 = | L0+H0+H1:N | L1+H0:N | */ l = W(N); Rsh(a, t + I(2 * N), W(3 * N) - I(2 * N), R(2 * N)); /* H0 */ if (R(N) > 0) /* mask low bits from H1 if necessary */ a[I(N)] &= MASK(R(N)); if (I(N) < l) /* necessarily l = I(N)+1 */ u[0] = a[l - 1]; // ASSERT(I(N) >= 0); u[1] = Lsh(a + I(N), a, I(N), R(N)); /* H0:H0 */ /* u[0] and a[1] have R(N) bits */ if (I(N) < l) { ASSERT(2 * l - 2 < n); a[2 * l - 2] = u[1] ^ (u[0] << R(N)); /* 2R(N) bits */ if (2 * R(N) > WLEN) { ASSERT(2 * l - 1 < n); a[2 * l - 1] = u[0] >> (WLEN - R(N)); } a[l - 1] ^= u[0]; /* restore low R(N) bits */ } AddMod(a, a, t, W(2 * N)); /* H0+L0:H0+L1 */ AddRsh(a, t + I(3 * N), W(4 * N) - I(3 * N), R(3 * N)); /* L0+H0+H1:H0+L1 */ /* mask high bits */ sh = R(2 * N); if (sh > 0) a[n - 1] &= MASK(sh); #ifdef DEBUG_MULMOD printf("a:="); dump(a, W(2 * N)); #endif } /* starting from i=0, j=0, K and Z=1, enumerates all pairs (i,j) for 0 <= i < K such that j = bitrev(i). */ static void bitrev(size_t i, size_t j, size_t K, size_t Z, size_t *perm) { if (K == 1) perm[i] = j; else { bitrev(i, j, K / 3, 3 * Z, perm); bitrev(i + K / 3, j + Z, K / 3, 3 * Z, perm); bitrev(i + 2 * K / 3, j + 2 * Z, K / 3, 3 * Z, perm); } } /* performs an FFT of length K on A[0], A[stride], A[(K-1)*stride] with omega=x^j as root of unity, where all computations are done modulo x^(2Np) + x^Np + 1. Each A[i] has space for 2np words where np=ceil(Np/WLEN). Assume omega^K = 1 mod x^(2Np) + x^Np + 1, i.e., mod x^(3Np)+1. t1, t2, t3 are buffers of 2np words. Assumes 0 <= j < 3*Np. For 0 <= i < K, p[i] = tritrev(i), i.e., the integer j such that the base-3 representation of i and j are reverse one from each other. */ static void fft(unsigned long **A, uint64_t K, uint64_t j, size_t Np, size_t stride, unsigned long *t1, unsigned long *t2, unsigned long *t3, size_t *p) { ASSERT(j < 3 * Np); if (K == 1) return; size_t i, k = K / 3, twonp = W(2 * Np); uint64_t ii; fft(A, k, (3 * j) % (3 * Np), Np, 3 * stride, t1, t2, t3, p); fft(A + stride, k, (3 * j) % (3 * Np), Np, 3 * stride, t1, t2, t3, p); fft(A + 2 * stride, k, (3 * j) % (3 * Np), Np, 3 * stride, t1, t2, t3, p); #define a A[3*i*stride] #define b A[(3*i+1)*stride] #define c A[(3*i+2)*stride] unsigned long *t4 = malloc (twonp * sizeof (unsigned long)); /* extra */ for (i = 0; i < k; i++) { ii = p[3 * stride * i]; /* bitrev(i,K/3) = bitrev(3*stride*i,K) */ /* a <- a + b * w^(ii*j) + c * w^(2*ii*j) b <- a + b * w^((ii + K / 3) * j) + c * w^((2 * ii + 2 * K / 3) * j c <- a + b ^ w^((ii+2*K/3) * j) + c * w^((2 * ii + 4 * K / 3) * j) */ Lshift(t1, b, ii * j, Np); /* t1 = w^ii*b */ Lshift(t2, b, (ii + 2 * K / 3) * j, Np); /* t2 = w^(ii+2K/3)*b */ Lshift(t3, b, (ii + K / 3) * j, Np); Lshift(t4, c, (2 * ii + 2 * K / 3) * j, Np); AddMod3(b, a, t3, t4, twonp); Lshift(t4, c, (2 * ii + 4 * K / 3) * j, Np); Lshift(t3, c, 2 * ii * j, Np); /* t3 = w^(2ii)*c */ AddMod3(c, a, t2, t4, twonp); AddMod3(a, a, t1, t3, twonp); } free (t4); #undef a #undef b #undef c } /* allocate A[0]...A[K-1], and put there {a, an} cut into K chunks of M bits; return pointer to block of memory containing A[0]...A[K-1] (to be freed by the calling routine) */ static void decompose(unsigned long **A, const unsigned long *a, size_t an, size_t M, size_t K, size_t np) { size_t i, j, k, l, sh = R(M); for (i = 0, j = 0, k = 0; i < K; i++) { /* invariant: we have already used k bits of a[j] */ l = W(k + M); /* number of words for k+M bits */ if (j + l > an) l = (an > j) ? an - j : 0; /* remains l words a[j]..a[j+l-1] */ if (l > 0) { ASSERT(j + l <= an); Rsh(A[i], a + j, l, k); /* mask last bits */ if (sh) { ASSERT(I(M) < 2 * np); A[i][I(M)] &= MASK(sh); } if (l > W(M)) l = W(M); } ASSERT(l < 2 * np); Zero(A[i] + l, 2 * np - l); k += M; j += k / WLEN; k %= WLEN; } } static void recompose(unsigned long * c, size_t cn, unsigned long **C, size_t K, size_t M, size_t Np) { // size_t np = W(Np); // Words to store Np bits /* reconstruct C = sum(C[i]*X^(M*i) mod x^N+1. We first compute sum(C[i]*X^(M*i), then reduce it using the wrap function. Since we know the result has at most cn words, any value exceeding cn words is necessarily zero. Each C[i] has 2*Np bits, thus the full C has (K-1)*M+2*Np = N - M + 2*Np >= N + Np >= 2*n*WLEN + Np bits. Thus exactly 2*Np-M bits wrap around mod x^N+1. */ size_t l = 2 * Np - M;/* number of overlapping bits with previous C[i] */ size_t i, j, k; size_t j1, k1; size_t z; for (i = 0, j = 0, k = 0, j1 = I(l), k1 = R(l); i < K; i++) { // unsigned long cy; /* invariants: - first bit of C[i] is bit k of c[j] - first bit of C[i] non overlapping with C[i-1] is bit k1 of c[j1] */ /* add C[i] shifted by i*M to c, where K*M = N, and Np >= M */ if (i == 0) /* FIXME: we could set C[0] to c to avoid this copy */ Copy(c, C[i], W(2 * Np) < cn ? W(2 * Np) : cn); else { /* we have already set bit k of c[j] up to bit k1 of c[j1] (excluded), i.e., words c[j] up to c[j1 - (k1 == 0)] */ z = j1 + (k1 != 0) - j; /* number of overlapping words */ /* first treat the high (non overlapping) words of C[i], i.e., {C[i] + z, W(2*Np) - z} */ if (j + W(2 * Np) < cn) { if (z < W(2 * Np)) { // ASSERT(W(2 * Np) - z >= 0); ASSERT((j + W(2 * Np) < cn)); c[j + W(2 * Np)] = Lsh(c + j + z, C[i] + z, W(2 * Np) - z, k); } else if (z == W(2 * Np)) { /* all words overlap with C[i-1] */ ASSERT((j + W(2 * Np) < cn)); c[j + W(2 * Np)] = 0UL; } } else if (j + z < cn) { Lsh(c + j + z, C[i] + z, cn - j - z, k); } /* then deal with the low bits of C[i], overlapping with C[i-1] */ if (j + z < cn) c[j + z] ^= AddLsh(c + j, C[i], z, k); else if (j < cn) AddLsh(c + j, C[i], cn - j, k); } k += M; j += k / WLEN; k %= WLEN; k1 += M; j1 += k1 / WLEN; k1 %= WLEN; } } static inline size_t compute_Np(size_t M, size_t K) { size_t Mp = CEIL(M, K / 3); // ceil(M/(K/3)) size_t Np = Mp * (K / 3); // Np >= M, Np multiple of K/3 return Np; } static inline size_t compute_np(size_t M, size_t K) { size_t np = W(compute_Np(M,K));// Words to store Np bits return np; } // Wraps the polynomial represented by c mod x^N + 1 // Assumes wraps at most once, i.e. deg(c) < 2N. // The high part of c (bits N to WLEN*cn) are cleared. // RPB 20070429 static void wrap(unsigned long *c, size_t bits_c, size_t N) { size_t i; size_t Nw = I(N); size_t Nb = R(N); size_t Nbc = WLEN - Nb; size_t cn = W(bits_c); // Perhaps most of this could be done by a call to AddLsh ? if (N >= bits_c) return; // xor bits N .. WLEN*cn of c to c[0...] if (Nb == 0) { for (i = 0; i < cn - Nw - 1; i++) c[i] ^= c[i + Nw]; } else { for (i = 0; i < cn - Nw - 1; i++) c[i] ^= (c[i + Nw] >> Nb) | (c[i + Nw + 1] << Nbc); } ASSERT(cn > Nw); c[cn - Nw - 1] ^= (c[cn - 1] >> Nb); // Now clear remaining bits of c c[Nw] &= MASK(Nb); // Clear high Nbc bits of c[Nw] Clear(c, Nw + 1, cn); } static void split_reconstruct(unsigned long * c, unsigned long * c1, unsigned long * c2, size_t cn, size_t K, size_t m1) { size_t n = WLEN * cn; // Max bit-size of full product size_t delta = K; // delta = n1 - n2; size_t jw, jn1w, jn1b, jn1bc, jdw, jdb, jdbc; unsigned long t, next; // Now extract the result. First do a partial word bit-by-bit. #if defined(DEBUG) || !defined(NDEBUG) size_t m2 = m1 - 1; size_t n2 = K * m2; // n2 smallest possible multiple of K #endif size_t n1 = K * m1; // next possible multiple of K size_t j; for (j = n - n1 - 1; (j % WLEN) != (WLEN - 1); j--) { t = GETBIT(c1, j + delta) ^ GETBIT(c2, j + delta); XORBIT(c1, j + n1, t); // XOR assumes high part of c1 was zero XORBIT(c1, j, t); } // Now do the rest using full-word operations. j -= WLEN - 1; jdb = R(j + delta); jdbc = WLEN - 1 - jdb; jn1b = R(j + n1); jw = I(j); jdw = I(j + delta); jn1w = I(j + n1); next = c1[jdw + 1] ^ c2[jdw + 1]; if (jn1b == 0) { // Unusual case for (jw++ ; jw-- ; jdw--, jn1w--) { t = (next << 1) << jdbc; next = c1[jdw] ^ c2[jdw]; t ^= next >> jdb; c1[jw] ^= t; c1[jn1w] = t; } } else { // Usual case for (jn1bc = WLEN - jn1b, jw++; jw-- ; jdw--, jn1w--) { t = (next << 1) << jdbc; next = c1[jdw] ^ c2[jdw]; t ^= next >> jdb; c1[jw] ^= t; c1[jn1w] ^= t << jn1b; c1[jn1w + 1] ^= t >> jn1bc; } } // Do a consistency check. This is cheap and detects most errors. // If DEBUG defined we check the first delta bits, otherwise we only // check the first WLEN bits. #ifdef DEBUG for (j = 0; j < delta; j++) { if ((GETBIT(c2, j) ^ GETBIT(c1, j) ^ GETBIT(c1, j + n2)) != 0) { fprintf(stderr, "Consistency check failed in gf2x_mul_fft2, bit %ld\n", j); abort(); } } #endif #ifndef NDEBUG t = c2[0] ^ c1[0] ^ (c1[n2 / WLEN] >> n2 % WLEN) ^ ((c1[n2 / WLEN + 1] << 1) << (WLEN - 1 - n2 % WLEN)); if (t != 0) { fprintf(stderr, "Consistency check failed in gf2x_mul_fft2, low word %lx\n", t); abort(); } #endif Copy(c, c1, cn); // Copy result } /** now the external calls for the gf2x_ternary_fft interface **/ size_t gf2x_ternary_fft_size(gf2x_ternary_fft_info_srcptr o) { size_t K = o->K; if (K == 0) { /* special fall-back case */ return W(o->bits_a) + W(o->bits_b); } else if (!o->split) { return 2 * K * compute_np(o->M, K); } else { /* K < 0 : FFT split in two. */ /* m2 is just m1-1, so to make things simpler, we claim that the * size is made only of blocks corresponding to size m1. But yes, * half with m1 and half with m2 would make sense. But wouldn't * change the picture so much anyway. */ return 4 * o->K * compute_np(o->M, o->K); } } void gf2x_ternary_fft_zero(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr ptr, size_t n) { memset(ptr, 0, n * gf2x_ternary_fft_size(o) * sizeof(gf2x_ternary_fft_t)); } void gf2x_ternary_fft_cpy(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr y, gf2x_ternary_fft_srcptr x) { memcpy(y, x, gf2x_ternary_fft_size(o) * sizeof(gf2x_ternary_fft_t)); } gf2x_ternary_fft_ptr gf2x_ternary_fft_get(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr ptr, size_t k) { return ptr + k * gf2x_ternary_fft_size(o); } gf2x_ternary_fft_srcptr gf2x_ternary_fft_get_const(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_srcptr ptr, size_t k) { return ptr + k * gf2x_ternary_fft_size(o); } gf2x_ternary_fft_ptr gf2x_ternary_fft_alloc(gf2x_ternary_fft_info_srcptr o, size_t n) { return malloc_or_die(n * gf2x_ternary_fft_size(o) * sizeof(gf2x_ternary_fft_t)); } void gf2x_ternary_fft_free(gf2x_ternary_fft_info_srcptr o GF2X_MAYBE_UNUSED, gf2x_ternary_fft_ptr ptr, size_t n GF2X_MAYBE_UNUSED) { free(ptr); } static void gf2x_ternary_fft_dft_inner(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tr, const unsigned long * a, size_t bits_a, size_t M) { size_t K = o->K; size_t Mp = CEIL(M, K / 3); // ceil(M/(K/3)) size_t Np = Mp * (K / 3); // Np >= M, Np multiple of K/3 size_t np = W(Np); // Words to store Np bits // allocate the array of pointers. It's just temporary stuff. unsigned long ** A = malloc_or_die(K * sizeof(unsigned long *)); for (size_t i = 0; i < K; i++) A[i] = tr + 2 * i * np; decompose(A, a, W(bits_a), M, K, np); unsigned long * tmp1, * tmp2, * tmp3; tmp1 = o->tmp; tmp2 = o->tmp + 2 * np; tmp3 = o->tmp + 4 * np; /* max(2np,gf2x_toomspace(2np)) words */ fft(A, K, Mp, Np, 1, tmp1, tmp2, tmp3, o->perm); free(A); } static void gf2x_ternary_fft_dft_inner_split(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tr, const unsigned long * a, size_t bits_a, size_t M, unsigned long * buf, size_t bufsize) { size_t K = o->K; size_t N = K * M; // ASSERT(K >= WLEN); // why ? I've seen this comment somewhere, but why ? // ASSERT(2 * K * M >= W(bits_a + bits_b)); // FIXME: This wrapping, and use of extra buffer space, should be // merged into decompose(). Copy(buf, a, W(bits_a)); Clear(buf, W(bits_a), bufsize); // Clear upper part of a wrap(buf, bits_a, N); gf2x_ternary_fft_dft_inner(o, tr, buf, MIN(N, bits_a), M); } /* bits_a is a number of BITS */ void gf2x_ternary_fft_dft(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tr, const unsigned long * a, size_t bits_a) { // bits_a is a number of BITS. if (o->K == 0) { Copy(tr, a, W(bits_a)); /* zeroing out the bits isn't really needed. */ Clear(tr, W(bits_a), W(o->bits_a) + W(o->bits_b)); } else if (!o->split) { gf2x_ternary_fft_dft_inner(o, tr, a, bits_a, o->M); } else { size_t m1 = o->M; size_t m2 = o->M - 1; size_t K = o->K; /* there's some work to be done prior to doing the decomposition: * wrapping. We need some temporary space for that. */ size_t bufsize = MAX(W(bits_a), W((size_t) m1)); unsigned long * buf = malloc_or_die(bufsize * sizeof(unsigned long)); gf2x_ternary_fft_dft_inner_split(o, tr, a, bits_a, m1, buf, bufsize); tr += 2 * K * compute_np(m1, K); gf2x_ternary_fft_dft_inner_split(o, tr, a, bits_a, m2, buf, bufsize); free(buf); } } static void gf2x_ternary_fft_compose_inner(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb, size_t M) { size_t K = o->K; // tc, ta, tb may happily alias each other. size_t Np = compute_Np(M, K); size_t np = W(Np); unsigned long * tmp1 = o->tmp; // tmp2 = o->tmp + 2 * np; /* max(2np,gf2x_toomspace(2np)) words */ unsigned long * tmp3 = o->tmp + 4 * np; for (size_t i = 0; i < K; i++) { MulMod(tc, ta, tb, Np, tmp1, tmp3); ta += 2 * np; tb += 2 * np; tc += 2 * np; } } void gf2x_ternary_fft_compose(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb) { if (o->K == 0) { gf2x_mul(tc, ta, W(o->bits_a), tb, W(o->bits_b)); } else if (!o->split){ gf2x_ternary_fft_compose_inner(o, tc, ta, tb, o->M); } else { size_t m1 = o->M; size_t m2 = o->M - 1; size_t K = o->K; gf2x_ternary_fft_compose_inner(o, tc, ta, tb, m1); size_t offset = 2 * K * compute_np(m1, K); tc += offset; ta += offset; tb += offset; gf2x_ternary_fft_compose_inner(o, tc, ta, tb, m2); } } void gf2x_ternary_fft_add(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb) { for (size_t i = 0; i < gf2x_ternary_fft_size(o) ; i++) { tc[i] = ta[i] ^ tb[i]; } } void gf2x_ternary_fft_addcompose_n(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr * ta, gf2x_ternary_fft_srcptr * tb, size_t n) { gf2x_ternary_fft_t * t = gf2x_ternary_fft_alloc(o, 1); for(size_t k = 0 ; k < n ; k++) { gf2x_ternary_fft_compose(o, t, ta[k], tb[k]); gf2x_ternary_fft_add(o, tc, tc, t); } gf2x_ternary_fft_free(o, t, 1); } void gf2x_ternary_fft_addcompose(gf2x_ternary_fft_info_srcptr o, gf2x_ternary_fft_ptr tc, gf2x_ternary_fft_srcptr ta, gf2x_ternary_fft_srcptr tb) { gf2x_ternary_fft_addcompose_n(o, tc, &ta, &tb, 1); } void gf2x_ternary_fft_ift_inner(gf2x_ternary_fft_info_srcptr o, unsigned long * a, size_t bits_a, gf2x_ternary_fft_ptr tr, size_t M) { size_t K = o->K; size_t Mp = CEIL(M, K / 3); // ceil(M/(K/3)) size_t Np = Mp * (K / 3); // Np >= M, Np multiple of K/3 size_t np = W(Np); // Words to store Np bits size_t i; unsigned long * tmp1, * tmp2, * tmp3; tmp1 = o->tmp; tmp2 = o->tmp + 2 * np; tmp3 = o->tmp + 4 * np; /* max(2np,gf2x_toomspace(2np)) words */ // allocate the array of pointers. It's just temporary stuff. unsigned long ** A = malloc_or_die(K * sizeof(unsigned long *)); for (i = 0; i < K; i++) A[i] = tr + 2 * i * np; unsigned long ** Ap = malloc_or_die(K * sizeof(unsigned long *)); for (i = 0; i < K; i++) Ap[i] = A[o->perm[i]]; fft(Ap, K, 3 * Np - Mp, Np, 1, tmp1, tmp2, tmp3, o->perm); for (i = 0; i < K; i++) ASSERT(A[i] == Ap[o->perm[i]]); free(Ap); recompose(a, W(bits_a), A, K, M, Np); free(A); } void gf2x_ternary_fft_ift(gf2x_ternary_fft_info_srcptr o, unsigned long * c, size_t bits_c, gf2x_ternary_fft_ptr tr) { if (o->K == 0) { Copy(c, tr, W(bits_c)); } else if (!o->split) { gf2x_ternary_fft_ift_inner(o, c, bits_c, tr, o->M); } else { size_t K = o->K; size_t m1 = o->M; size_t m2 = m1 - 1; size_t cn = W(2 * K * m1); size_t cn0 = W(o->bits_a) + W(o->bits_b); ASSERT(cn0 <= cn); size_t cn1 = W(MIN(K*m1,o->bits_a)) + W(MIN(K*m1,o->bits_b)); unsigned long * c1 = malloc_or_die(cn * sizeof(unsigned long)); Clear(c1, I(K * m1), cn); gf2x_ternary_fft_ift_inner(o, c1, cn * WLEN, tr, m1); wrap(c1, cn1 * WLEN, K * m1); tr += 2 * K * compute_np(m1, K); size_t cn2 = W(MIN(K*m2,o->bits_a)) + W(MIN(K*m2,o->bits_b)); unsigned long * c2 = malloc_or_die(cn * sizeof(unsigned long)); Clear(c2, I(K * m2), cn); gf2x_ternary_fft_ift_inner(o, c2, cn * WLEN, tr, m2); wrap(c2, cn2 * WLEN, K * m2); split_reconstruct(c, c1, c2, cn0, K, m1); free(c1); free(c2); } } /* multiplies {a, an} by {b, bn} using an FFT of length K, and stores the result into {c, an+bn}. If an+bn is too small then Toom-Cook is used. */ // arrange so that we multiply polynomials having respectively n1 and n2 // _BITS_ ; which means degree+1 (thus can be unsigned). // // because this algorithm needs to know about the K value, which in turns // depends on proper tuning, we ask for it to be provided by the caller. // Negative values of K mean to use FFT2. void gf2x_ternary_fft_init(gf2x_ternary_fft_info_ptr o, size_t bits_a, size_t bits_b, ...) { o->bits_a = bits_a; o->bits_b = bits_b; size_t nwa = W(bits_a); size_t nwb = W(bits_b); va_list ap; va_start(ap, bits_b); long K = va_arg(ap, long); /* Since we have a dangerous interface with a variable argument which * is a possibly _signed_ long, better try to catch the expected * mistakes */ for(int i = 2*(K>0)-1 ; K/i > 1 ; i*=3) { if ((K/i)%3) { fprintf(stderr, "extra argument to gf2x_ternary_fft_init (of type long) must be a power of 3 (got %ld)\n", K); abort(); } } size_t M; if (K > 0) { M = CEIL((nwa + nwb) * WLEN, K); // ceil(bits(product)/K) o->K = K; o->M = M; o->split = 0; } else { ASSERT(-K >= WLEN); size_t cn2 = CEIL(nwa + nwb, 2); // Space for half product size_t m2 = CEIL(cn2 * WLEN, -K); // m2 = ceil(cn2*WLEN/K) size_t m1 = m2 + 1; // next possible M M = m1; o->K = -K; o->M = M; o->split = 1; } if (nwa + nwb < MUL_FFT_THRESHOLD) { // make this special. o->K = 0; o->M = 0; o->tmp = NULL; o->perm = NULL; return; } /* We also have to allocate the temporary space used by this FFT */ size_t np = compute_np(M, o->K); size_t i = gf2x_toomspace(2 * np); if (i < 2 * np) i = 2 * np; size_t ltmp = 4 * np + i; o->tmp = (unsigned long *) malloc_or_die(ltmp * sizeof(unsigned long)); o->perm = (size_t *) malloc_or_die(o->K * sizeof(size_t)); bitrev(0, 0, o->K, 1, o->perm); va_end(ap); } void gf2x_ternary_fft_init_similar(gf2x_ternary_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_ternary_fft_info_srcptr other) { gf2x_ternary_fft_init(o, bits_a, bits_b, other->K); } int gf2x_ternary_fft_compatible(gf2x_ternary_fft_info_srcptr o1, gf2x_ternary_fft_info_srcptr o2) { return o1->K == o2->K && o1->M == o2->M; } void gf2x_ternary_fft_clear(gf2x_ternary_fft_info_ptr o) { if (o->K) { free(o->tmp); free(o->perm); } memset(o, 0, sizeof(gf2x_ternary_fft_info_t)); } /** gf2x_mul_fft merely wraps around the calls above **/ /* multiplies {a, an} by {b, bn} using an FFT of length K, and stores the result into {c, an+bn}. The result is computed mod (x^N+1) where N = K*M. Thus for a full product K*M should be >= (an+bn)*WLEN, the size of product in bits. For the result mod (x^N+1) it is only required that 2*K*M >= (an+bn)*WLEN */ // here an and bn denote numbers of WORDS, while the gf2x_ternary_fft_* routines // are interested in number of BITS. void gf2x_mul_fft(unsigned long *c, const unsigned long *a, size_t an, const unsigned long *b, size_t bn, long K) { gf2x_ternary_fft_info_t o; gf2x_ternary_fft_init(o, an * WLEN, bn * WLEN, K); if (o->K == 0) { printf("gf2x_mul_fft: arguments (%zu, %zu) too small\n", an, bn); /* Note that actually the routines below do work, because they're * specified for working. However, this contradicts the fact that * via this entry point, we have explicitly asked for _not_ * falling back to standard gf2x routines. So it's a caller bug */ abort(); } gf2x_ternary_fft_ptr ta = gf2x_ternary_fft_alloc(o, 1); gf2x_ternary_fft_ptr tb = gf2x_ternary_fft_alloc(o, 1); gf2x_ternary_fft_ptr tc = gf2x_ternary_fft_alloc(o, 1); gf2x_ternary_fft_dft(o, ta, a, an * WLEN); gf2x_ternary_fft_dft(o, tb, b, bn * WLEN); gf2x_ternary_fft_compose(o, tc, ta, tb); gf2x_ternary_fft_ift(o, c, (an+bn)*WLEN, tc); gf2x_ternary_fft_free(o, ta, 1); gf2x_ternary_fft_free(o, tb, 1); gf2x_ternary_fft_free(o, tc, 1); gf2x_ternary_fft_clear(o); } gf2x-1.2/fft/gf2x-fake-fft.c0000644000327606072450000001211412725540356012445 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _GNU_SOURCE #include "gf2x.h" #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-impl.h" #include "gf2x-fake-fft.h" #define ULONG_BITS GF2X_WORDSIZE /* Number of words holding B bits ; better naming sought. */ #ifndef iceildiv /* unfortunately this fails miserably if x+y-1 overflows */ #define iceildiv(x,y) (((x)+(y)-1)/(y)) #endif #define BITS_TO_WORDS(B,W) iceildiv((B),(W)) /* nF, nG : number of coefficients */ void gf2x_fake_fft_init(gf2x_fake_fft_info_ptr p, size_t nF, size_t nG, ...) { p->n1 = nF; p->n2 = nG; p->n3 = nF + nG - 1; size_t nc = 0; if (p->n1 > nc) nc = p->n1; if (p->n2 > nc) nc = p->n2; p->size = 2 * BITS_TO_WORDS(nc, ULONG_BITS); } /* n is a number of coefficients ! */ void gf2x_fake_fft_dft(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, const unsigned long * src, size_t n) { ASSERT(n <= p->n1 || n <= p->n2); size_t s = BITS_TO_WORDS(n, ULONG_BITS); memcpy(dst, src, s * sizeof(unsigned long)); if (n % ULONG_BITS) { /* Just as we are computing this assertion, we could easily mask out * the bits ourselves. However, our interface mandates that the high * bits be cleared in any case. So make sure we properly enforce this * constraint. */ ASSERT((src[s-1] & ~((1UL << (n % ULONG_BITS)) - 1)) == 0); } memset(dst + s, 0, (p->size - s) * sizeof(unsigned long)); } /* n is a number of coefficients ! -- requiring less than the compute size is * okay, as long as it's understood as a means for truncating the data. So we * don't do checking for zero high bits. */ void gf2x_fake_fft_ift(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, unsigned long * dst, size_t n, gf2x_fake_fft_srcptr src) { ASSERT(n <= p->n3); size_t t = BITS_TO_WORDS(n, ULONG_BITS); memcpy(dst, src, t * sizeof(unsigned long)); } void gf2x_fake_fft_compose(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, gf2x_fake_fft_srcptr s1, gf2x_fake_fft_srcptr s2) { size_t n1 = BITS_TO_WORDS(p->n1, ULONG_BITS); size_t n2 = BITS_TO_WORDS(p->n2, ULONG_BITS); gf2x_mul(dst, s1, n1, s2, n2); } void gf2x_fake_fft_addcompose_n(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, gf2x_fake_fft_srcptr * s1, gf2x_fake_fft_srcptr * s2, size_t n) { size_t n1 = BITS_TO_WORDS(p->n1, ULONG_BITS); size_t n2 = BITS_TO_WORDS(p->n2, ULONG_BITS); unsigned long * h = malloc(p->size * sizeof(unsigned long)); /* lacking addmul in gf2x, we do some extra allocation */ memset(h, 0, p->size * sizeof(unsigned long)); for(size_t k = 0 ; k < n ; k++) { gf2x_mul(h, s1[k], n1, s2[k], n2); for(unsigned int i = 0 ; i < p->size ; i++) { dst[i] ^= h[i]; } } free(h); } void gf2x_fake_fft_addcompose(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, gf2x_fake_fft_srcptr s1, gf2x_fake_fft_srcptr s2) { gf2x_fake_fft_addcompose_n(p, dst, &s1, &s2, 1); } void gf2x_fake_fft_add(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, gf2x_fake_fft_srcptr s1, gf2x_fake_fft_srcptr s2) { size_t i; for(i = 0 ; i < p->size ; i++) { dst[i] = s1[i] ^ s2[i]; } } void gf2x_fake_fft_cpy(gf2x_fake_fft_info_srcptr p GF2X_MAYBE_UNUSED, gf2x_fake_fft_ptr dst, gf2x_fake_fft_srcptr s) { memcpy(dst, s, (p->size)*sizeof(unsigned long)); } size_t gf2x_fake_fft_size(gf2x_fake_fft_info_srcptr p) { return p->size; } void gf2x_fake_fft_init_similar(gf2x_fake_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_fake_fft_info_srcptr other GF2X_MAYBE_UNUSED) { gf2x_fake_fft_init(o, bits_a, bits_b); } int gf2x_fake_fft_compatible(gf2x_fake_fft_info_srcptr o1 GF2X_MAYBE_UNUSED, gf2x_fake_fft_info_srcptr o2 GF2X_MAYBE_UNUSED) { return 1; } /* vim: set sw=4 sta et: */ gf2x-1.2/fft/gf2x-cantor-fft.c0000644000327606072450000013233713125176245013034 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* 20080122 -- shortened the input file somewhat. Old disabled code has * been deleted in this operation. * * * XXX The inverse transform operation should be unified between the * truncated and non-truncated case. */ #include #include #include #include #include #include #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-impl.h" #include "gf2x-cantor-fft.h" /* The following flags affect the behaviour of the program */ #define xxxCANTOR_GM /* Use Gao-Mateer recursion */ #define xxxCANTOR_GM_TRUNCATE /* Use truncated variant */ #include "mpfq/mpfq_name_K.h" /* It's a placeholder, really. After macro expansion, nobody really uses * this */ Kfield K; /* #define Kdst_elt unsigned long * #define Ksrc_elt const unsigned long * */ // Kelt * fbase; // size_t * findex; // Some constants related to Cantor's algorithm // Beta_i are such that Beta_{i-1} = Beta_i^2 + Beta_i // and { Beta_i : i in [1..128] } is a GF(2)-basis of GF(2^128). // The following is (the begining of) a solution. // NB: the defining polynomial for GF(2^128) is x^128 + x^7 + x^2 + x + 1 // // /* Magma code: _:=PolynomialRing(GF(2)); K:=ext; beta:=K!1; for i in [1..31] do ti:=Polynomial([beta,1,1]); beta:=[r[1]:r in Roots(ti) | Eltseq(r[1])[1] eq 0][1]; print Intseq(Seqint(ChangeUniverse(Eltseq(beta),Integers()),2),2^32); end for; // same deal for base field 2^64 _:=PolynomialRing(GF(2)); K:=ext; beta:=K!1; for i in [1..31] do ti:=Polynomial([beta,1,1]); beta:=[r[1]:r in Roots(ti) | Eltseq(r[1])[1] eq 0][1]; print Intseq(Seqint(ChangeUniverse(Eltseq(beta),Integers()),2),2^32); end for; */ #if CANTOR_BASE_FIELD_SIZE == 128 #if GF2X_WORDSIZE == 32 #define BETA(x,y,z,t) { x, y, z, t, } #else #define BETA(x,y,z,t) { y << 32 | x, t << 32 | z } #endif static const Kelt Betai[32] = { BETA(1UL,0UL,0UL,0UL), BETA(2763131656UL, 1735044255UL, 4101184249UL, 693813425UL), BETA(465473314UL, 4279278019UL, 3443545289UL, 2719171618UL), BETA(45213768UL, 1404590948UL, 3790498114UL, 2035930892UL), BETA(1766741572UL, 3401373924UL, 3912612066UL, 150385427UL), BETA(1642619116UL, 1296609638UL, 891822488UL, 1237922326UL), BETA(1432407564UL, 2705320108UL, 2845284892UL, 87917909UL), BETA(3169845528UL, 1555107770UL, 977112198UL, 1297233226UL), BETA(3766302226UL, 3784070584UL, 2372619472UL, 751494893UL), BETA(3319219312UL, 1485529668UL, 1919364198UL, 554536894UL), BETA(2221231524UL, 3494370010UL, 2246133939UL, 3255900204UL), BETA(4004748792UL, 4275287155UL, 1207038226UL, 273485854UL), BETA(4134924972UL, 3206127284UL, 3660212267UL, 3465895584UL), BETA(1810844824UL, 432364429UL, 3275102095UL, 3685546794UL), BETA(2239846096UL, 4115864360UL, 3774983060UL, 1484196804UL), BETA(572310756UL, 2341975643UL, 1205907074UL, 1233095387UL), BETA(374654328UL, 2701982826UL, 4048512218UL, 95057245UL), BETA(1069419604UL, 3135871566UL, 603196539UL, 2195404101UL), BETA(2819376738UL, 2390789826UL, 3206934123UL, 3126567229UL), BETA(2667030844UL, 1546355395UL, 894286960UL, 806061570UL), BETA(3589162292UL, 2284726595UL, 3987361705UL, 3261030005UL), BETA(488495394UL, 2513641547UL, 3724856370UL, 956902965UL), BETA(894705622UL, 3412990576UL, 2985357841UL, 2327012336UL), BETA(691430644UL, 2704377464UL, 1647445035UL, 3189688948UL), BETA(3013060094UL, 3867471049UL, 66167789UL, 3014841169UL), BETA(1101590000UL, 1839657742UL, 3478054432UL, 884001900UL), BETA(494046998UL, 2899707219UL, 2156601667UL, 2796513881UL), BETA(3398486548UL, 57111011UL, 1428951442UL, 894796186UL), BETA(3950556970UL, 3334574894UL, 3366886047UL, 3938361620UL), BETA(999564750UL, 4233655517UL, 706258300UL, 428364188UL), BETA(1913007172UL, 1894536580UL, 871798750UL, 1621883580UL), BETA(2252056148UL, 2850320680UL, 3455532848UL, 234262497UL), }; #elif CANTOR_BASE_FIELD_SIZE == 64 #if GF2X_WORDSIZE == 32 #define BETA(x,y) { x, y, } #else #define BETA(x,y) { y << 32 | x } #endif static const Kelt Betai[32] = { BETA(1UL,0UL), BETA(663411714UL, 432617119UL), BETA(1868560276UL, 2709645270UL), BETA(3463994632UL, 1572356951UL), BETA(4123644106UL, 3111375974UL), BETA(2199521118UL, 1377486985UL), BETA(3720914518UL, 54323390UL), BETA(129568784UL, 3045354574UL), BETA(3011130092UL, 1082636491UL), BETA(2349523324UL, 13685640UL), BETA(595534370UL, 2950016112UL), BETA(3426396920UL, 3824529305UL), BETA(1779128504UL, 1511895985UL), BETA(4269728328UL, 160726100UL), BETA(6878532UL, 244231950UL), BETA(189484890UL, 2728465232UL), BETA(3603827632UL, 3916404741UL), BETA(1553915212UL, 1397321611UL), BETA(4104923806UL, 2905758902UL), BETA(3622692902UL, 1250807691UL), BETA(3057861136UL, 2750006610UL), BETA(3384573648UL, 1604922073UL), BETA(3447141598UL, 2743728400UL), BETA(3393587672UL, 3910595551UL), BETA(1272090518UL, 4170545265UL), BETA(595211090UL, 1447942745UL), BETA(3344624952UL, 2905848940UL), BETA(3440271156UL, 1470304335UL), BETA(3445621658UL, 2968847076UL), BETA(2448727948UL, 3947030431UL), BETA(1957951568UL, 1424342839UL), BETA(3960779986UL, 3060294886UL), }; #else #error "Define CANTOR_BASE_FIELD_SIZE to 64 or 128" #endif // The S_i polynomials of Cantor's algorithm: linearized polynomials such // that S_i | S_{i+1}. static const size_t ind_S[31][15] = { {}, // S0 {1}, // S1 {1}, // S2 {4, 2, 1}, // S3 {1}, // S4 {16, 2, 1}, // S5 {16, 4, 1}, // S6 {64, 32, 16, 8, 4, 2, 1}, // S7 {1}, // S8 {256, 2, 1}, // S9 {256, 4, 1}, // S10 {1024, 512, 256, 8, 4, 2, 1}, // S11 {256, 16, 1}, // S12 {4096, 512, 256, 32, 16, 2, 1}, // S13 {4096, 1024, 256, 64, 16, 4, 1}, // S14 {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}, // S15 {1}, // S16 {65536, 2, 1}, // S17 {65536, 4, 1}, // S18 {262144, 131072, 65536, 8, 4, 2, 1}, // S19 {65536, 16, 1}, // S20 {1048576, 131072, 65536, 32, 16, 2, 1}, // S21 {1048576, 262144, 65536, 64, 16, 4, 1}, // S22 {4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 128, 64, 32, 16, 8, 4, 2, 1}, // S23 {65536, 256, 1}, // S24 {16777216, 131072, 65536, 512, 256, 2, 1}, // S25 {16777216, 262144, 65536, 1024, 256, 4, 1}, // S26 {67108864, 33554432, 16777216, 524288, 262144, 131072, 65536, 2048, 1024, 512, 256, 8, 4, 2, 1}, // S27 {16777216, 1048576, 65536, 4096, 256, 16, 1}, // S28 {268435456, 33554432, 16777216, 2097152, 1048576, 131072, 65536, 8192, 4096, 512, 256, 32, 16, 2, 1}, // S29 {268435456, 67108864, 16777216, 4194304, 1048576, 262144, 65536, 16384, 4096, 1024, 256, 64, 16, 4, 1}, // S30 }; // The number of terms in S_i. static const unsigned int ind_number[31] = { 0, 1, 1, 3, 1, 3, 3, 7, 1, 3, 3, 7, 3, 7, 7, 15, 1, 3, 3, 7, 3, 7, 7, 15, 3, 7, 7, 15, 7, 15, 15 }; // At index i=i0+2*i1+4*i2+8*i3..., one computes // allBetai[i] = i0*Betai[1] + i1*Betai[2] + i2*Betai[3] + ... static inline void allBetai(Kdst_elt x, size_t i) { size_t j; Kset_zero(x); j = 0; for( ; i ; i>>=1, j++) { if (!(i & 1)) continue; Kadd(x, x, Betai[j]); } } static inline size_t transform_datasize(gf2x_cantor_fft_info_srcptr p) { size_t n = p->n; #ifdef WITHOUT_CANTOR_TRUNCATION n = 1 << p->k; #endif return n; } #ifdef CANTOR_GM #if 0 /* These versions would make sense if Kelt were defined to be _v2di *, * which it isn't */ /* TODO: anyway we would need to redefine all this to use __m128i's */ static inline void allBetai1(Kdst_elt x, size_t i) { size_t j; Kset_zero(x); j = 0; __v2di m[2] = { (__v2di) {0,0}, (__v2di) { -1L, -1L } }; for( ; i ; i>>=1, j++) { * (__v2di*) x ^= m[i&1] & * (__v2di*) Betai[j]; } } // compute omega_i and omega_{2i} static inline void allBetai2(Kdst_elt x, Kdst_elt y, size_t i) { size_t j; Kset_zero(x); Kset_zero(y); j = 0; __v2di m[2] = { (__v2di) {0,0}, (__v2di) { -1L, -1L } }; for( ; i ; i>>=1, j++) { * (__v2di*) x ^= m[i&1] & * (__v2di*) Betai[j]; * (__v2di*) y ^= m[i&1] & * (__v2di*) Betai[j+1]; } } static inline void allBetai4(Kdst_elt x, Kdst_elt y, Kdst_elt z, Kdst_elt t, size_t i) { size_t j; Kset_zero(x); Kset_zero(y); Kset_zero(z); Kset_zero(t); j = 0; __v2di m[2] = { (__v2di) {0,0}, (__v2di) { -1L, -1L } }; for( ; i ; i>>=1, j++) { * (__v2di*) x ^= m[i&1] & * (__v2di*) Betai[j]; * (__v2di*) y ^= m[i&1] & * (__v2di*) Betai[j+1]; * (__v2di*) z ^= m[i&1] & * (__v2di*) Betai[j+2]; * (__v2di*) t ^= m[i&1] & * (__v2di*) Betai[j+3]; } } #else static inline void allBetai1(Kdst_elt x, size_t i) { size_t j; Kset_zero(x); j = 0; for( ; i ; i>>=1, j++) { if (!(i & 1)) continue; Kadd(x, x, Betai[j]); } } static inline void allBetai2(Kdst_elt x, Kdst_elt y, size_t i) { size_t j; Kset_zero(x); Kset_zero(y); j = 0; for( ; i ; i>>=1, j++) { if (!(i & 1)) continue; Kadd(x, x, Betai[j]); Kadd(y, y, Betai[j+1]); } } static inline void allBetai4(Kdst_elt x, Kdst_elt y, Kdst_elt z, Kdst_elt t, size_t i) { size_t j; Kset_zero(x); Kset_zero(y); Kset_zero(z); Kset_zero(t); j = 0; for( ; i ; i>>=1, j++) { if (!(i & 1)) continue; Kadd(x, x, Betai[j]); Kadd(y, y, Betai[j+1]); Kadd(z, z, Betai[j+2]); Kadd(t, t, Betai[j+3]); } } #endif /* v2di or not v2di */ #endif /* CANTOR_GM */ #ifdef CANTOR_GM static inline void expand(Kelt * f, unsigned int u, unsigned int t) { // f has at most 2^u coefficients. Split in pieces of 2^t // coefficients. if (u == t) return; size_t K1 = 1UL << (u-1); size_t K0 = 1UL << (u-1-t); for (size_t i = 2 * K1 - 1; i >= K1; --i) { Kadd(f[i+K0-K1], f[i+K0-K1], f[i]); } expand(f, u-1, t); expand(f+K1, u-1, t); } static inline void expand_trunc(Kelt * f, unsigned int u, unsigned int t, size_t n) { // f has at most n coefficients. Split in pieces of 2^t // coefficients. size_t K1; for( ; n <= (K1 = (1UL << (u-1))) ; u--); if (u <= t) return; size_t K0 = 1UL << (u-1-t); for (size_t i = n - 1; i >= K1; --i) { Kadd(f[i+K0-K1], f[i+K0-K1], f[i]); } expand(f, u-1, t); expand_trunc(f+K1, u-1, t, n-K1); } #if 0 static inline void expand_unroll(Kelt * f, unsigned int u, unsigned int t) { // f has at most 2^u coefficients. Split in pieces of 2^t // coefficients. if (u == t) return; size_t K1 = 1UL << (u-1); size_t K0 = 1UL << (u-1-t); for (size_t i = 2 * K1 - 1; i >= K1; --i) { Kadd(f[i+K0-K1], f[i+K0-K1], f[i]); fprintf(stderr, "Kadd(f[%ld],f[%ld],f[%ld]);\n", findex[i+K0-K1+f-fbase], findex[i+K0-K1+f-fbase], findex[i+f-fbase]); } expand_unroll(f, u-1, t); expand_unroll(f+K1, u-1, t); } #endif void transpose_inplace(Kelt * f, unsigned int t) { #define Kswap(a,b) do { Kelt x; Kset(x,a); Kset(a,b); Kset(b,x); } while (0) // transpose for(size_t i = 0 ; i < (1UL<> 1; size_t tau = 1UL << t; expand_unroll(f,2*t,t); for(size_t i = 0 ; i < tau ; i++) { for(size_t j = i+1 ; j < tau ; j++) { Kswap(f[(i<> 1; size_t tau = 1UL << t; expand(f,2*t,t); transpose_inplace(f,t); // evaluate ; we can use f as a buffer, now. for(size_t l = 0 ; l < tau ; l++) { gm_trick(t, f + (l << t), j); } transpose_inplace(f,t); // evaluate again for(size_t i = 0 ; i < tau ; i++) { gm_trick(t, f + (i << t), (j << t) + i); } } void multievaluateKrec(Kelt * f, unsigned int i, size_t rep_beta); /* This is the same gao-mateer trick. It reduces a length 2^two_t * polynomial to 2^t polynomials of length 2^t. Recursive work for the * inner evaluation is handled * by multievaluateKrec (which in turn may call us). The outer * evaluations are also processed the same way, and also handed over to * multievaluateKrec */ void multievaluateKrecGM(Kelt * f, unsigned int two_t, size_t j) { assert((two_t & (two_t-1)) == 0); unsigned int t = two_t >> 1; size_t tau = 1UL << t; expand(f,2*t,t); transpose_inplace(f,t); // evaluate ; we can use f as a buffer, now. for(size_t l = 0 ; l < tau ; l++) { multievaluateKrec(f + (l << t), t, j); } transpose_inplace(f,t); // evaluate again for(size_t i = 0 ; i < tau ; i++) { multievaluateKrec(f + (i << t), t, (j << t) + i); } } #endif #ifdef CANTOR_GM_TRUNCATE // compute only n' = 1UL<>1)) { gm_trick_trunc(two_t>>1, f, buf, j, k, n); return; } unsigned int t = two_t >> 1; assert(k > t); assert(k <= two_t); assert(n > (1UL << t)); /* beware ; on 32-bit machines, two_t might be equal to 32... */ assert(two_t == GF2X_WORDSIZE || n <= (1UL << two_t)); size_t tau = 1UL << t; // long cn = (n+tau-1)>>t; // Ceiling(n/tau); size_t cn = 1UL << (k-t); expand_trunc(f,2*t,t,n); memset(f + n, 0, ((1UL<= K1; --i) { fi = f[i]; for (j = 0; j < ind_number[k]; ++j) { size_t index = ind_S[k][j] + i - K1; Kadd(f[index], f[index], fi); } Kmul(coeff, fi, beta); Kadd(f[i - K1], f[i - K1], coeff); } // The other rest is just the sum of low and hi parts for (i = 0; i < K1; ++i) Kadd(f[i + K1], f[i + K1], f[i]); } #ifdef CANTOR_GM // same as multieval, but only to chunks of size kappa void reduce_top_cantor(unsigned int k, unsigned int kappa, Kelt * f, size_t j) { if (k == kappa) return; // fprintf(stderr, "top-reduce %d %d\n",k,kappa); j *= 2; Kelt x; allBetai(x, j); reduceSi(k-1, f, x); reduce_top_cantor(k-1,kappa,f,j); reduce_top_cantor(k-1,kappa,f+(1L<<(k-1)),j+1); } #endif // The generic reduction function. // truncated version static inline void reduceSiNobeta_trunc(unsigned int k, Kelt * f, size_t L) { size_t j; size_t i, K1; Ksrc_elt fi; K1 = 1UL << k; // put rest mod Sk+beta in low part of f and quo in high part. for (i = L - 1; i >= K1; --i) { fi = f[i]; for (j = 0; j < ind_number[k]; ++j) { long index = ind_S[k][j] + i - K1; Kadd(f[index], f[index], fi); } } // The other rest is just the sum of low and hi parts for (i = 0; i < K1; ++i) Kadd(f[i + K1], f[i + K1], f[i]); } // A generic interpolation function. // TODO: unroll small sizes, like for reduction. static inline void interpolateSi(unsigned int k, Kelt * f, Kelt beta) { unsigned int j; size_t i, K1 = 1UL << k; for (i = 0; i < K1; ++i) Kadd(f[i + K1], f[i + K1], f[i]); for (i = K1; i < K1 << 1; ++i) { Kelt coeff; Ksrc_elt fi; fi = f[i]; for (j = 0; j < ind_number[k]; ++j) { size_t index = ind_S[k][j] + i - K1; Kadd(f[index], f[index], fi); } Kmul(coeff, fi, beta); Kadd(f[i - K1], f[i - K1], coeff); } } static inline void interpolateSiNobeta(unsigned int k, Kelt * f) { unsigned int j; size_t i, K1 = 1UL << k; for (i = 0; i < K1; ++i) Kadd(f[i + K1], f[i + K1], f[i]); for (i = K1; i < K1 << 1; ++i) { Ksrc_elt fi; fi = f[i]; for (j = 0; j < ind_number[k]; ++j) { size_t index = ind_S[k][j] + i - K1; Kadd(f[index], f[index], fi); } } } // f has length 2^i void multievaluateKrec(Kelt * f, unsigned int i, size_t rep_beta) { Kelt beta; #if 0 #ifdef CANTOR_GM assert(i < 32); if ((i&-i)==i) { static int n[17]={0,}; n[i]++; if ((n[i]&-n[i])==n[i]) { fprintf(stderr, "call for i==%d (%d-th)\n",i,n[i]); } if (i==4) { gm_trick4(f, rep_beta); } else { multievaluateKrecGM(f, i, rep_beta); } return; } #endif #endif rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(i - 1, f, beta); if (i == 2) { rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(0, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 2, beta); return; } else if (i == 3) { rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(1, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(1, f + 4, beta); rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(0, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 2, beta); Kadd(beta, beta, Betai[2]); reduceSi(0, f + 6, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 4, beta); return; } if (i > 1) { { multievaluateKrec(f, i - 1, rep_beta); multievaluateKrec(f + (1UL << (i - 1)), i - 1, rep_beta + 1); } } } #ifdef CANTOR_GM // f must have 2^k coeffs exactly void multievaluateGM(Kelt * f, unsigned int k, size_t length GF2X_MAYBE_UNUSED) { unsigned int t = 1; unsigned int two_t; for( ; (two_t = t << 1) < k ; t = two_t) ; assert(t < k && k <= two_t); #ifdef CANTOR_GM_TRUNCATE Kelt * buf = malloc(sizeof(Kelt) << k); gm_trick_trunc(two_t,f,buf,0,k,length); free(buf); #else reduce_top_cantor(k,t,f,0); size_t K1 = 1UL << k; size_t tau = 1UL << t; size_t j = 0; for(size_t u = 0 ; u < K1 ; u += tau) { // treat coeffs [u..u+tau[ = [u..u+2^t[ gm_trick(t, f + u, j); j++; } #endif } #endif // evaluate f, having _length_ coefficients, at the 2^i roots following // rep_beta void multievaluateKrec_trunc(Kelt * f, unsigned int i, size_t rep_beta, size_t length) { Kelt beta; assert(i >= 1); rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(i - 1, f, beta); if (i == 2) { rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(0, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 2, beta); return; } if (i == 3) { rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(1, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(1, f + 4, beta); rep_beta <<= 1; allBetai(beta, rep_beta); reduceSi(0, f, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 2, beta); Kadd(beta, beta, Betai[2]); reduceSi(0, f + 6, beta); Kadd(beta, beta, Betai[1]); reduceSi(0, f + 4, beta); return; } if (i > 1) { if (length < (1UL << (i - 1))) { multievaluateKrec_trunc(f, i - 1, rep_beta, length); } else if (length > (1UL << (i - 1))) { multievaluateKrec(f, i - 1, rep_beta); multievaluateKrec_trunc(f + (1UL << (i - 1)), i - 1, rep_beta + 1, length - (1UL << (i - 1))); } else { // length == 1UL<<(i-1) multievaluateKrec(f, i - 1, rep_beta); } } } // evaluate f, having length coefficients, at all the roots of the polynomial // s_k void multievaluateKnew_trunc(Kelt * f, unsigned int k, size_t length) { assert(length <= (1UL << k)); if (k == 0) { // s_0 is x. We're evaluating a constant polynomial at a point, which // turns out to be 0, but that hardly matters. So there's actually // _nothing_ at all to do. return; } else if (k == 1) { // we need to evaluate at 0 and 1. So we must basically add f[0] to // f[1], unless there is no f1. if (length <= 1) return; else Kadd(f[1], f[0], f[1]); return; } reduceSiNobeta_trunc(k - 1, f, length); multievaluateKrec(f, k - 1, 0); multievaluateKrec_trunc(f + (1UL << (k - 1)), k - 1, 1, length - (1UL << (k - 1))); } // Interpolation with subproduct tree. void interpolateK(Kelt * f, unsigned int k) { size_t i, j; Kelt beta; for (i = 0; i < k - 1; ++i) { for (j = 0; j < (1UL << (k - 1 - i)); ++j) { size_t index = j * (1UL << (i + 1)); allBetai(beta, 2 * j); interpolateSi(i, f + index, beta); } } interpolateSiNobeta(k - 1, f); } // Quotrem Si. f is possibly larger than 2 times 1UL< 1UL<= K1; --i) { fi = f[i]; for (j = 0; j < ind_number[k]; ++j) { size_t index = ind_S[k][j] + i - K1; Kadd(f[index], f[index], fi); } Kmul(coeff, fi, beta); Kadd(f[i - K1], f[i - K1], coeff); } } // Mul Si. f is possibly smaller than half of 1UL<> 32) { a += 32; x >>= 32; } #endif if (x >> 16) { a += 16; x >>= 16; } if (x >> 8) { a += 8; x >>= 8; } if (x >> 4) { a += 4; x >>= 4; } if (x >> 2) { a += 2; x >>= 2; } res = GF2X_WORDSIZE - 2 - a + t[x]; return res; } /* the following code is correct because if x = 0...0abc10...0, then -x = ~x + 1, where ~x = 1...1(1-a)(1-b)(1-c)01...1, thus -x = 1...1(1-a)(1-b)(1-c)10...0, and x & (-x) = 0...000010...0 */ static inline int gf2x_ctzl(unsigned long x) { ASSERT(GF2X_WORDSIZE == sizeof(unsigned long) * CHAR_BIT); return (GF2X_WORDSIZE - 1) - gf2x_clzl(x & - x); } #endif // Reduce f (with 1UL< 0 ; ) { if (len >> i) { allBetai(beta, offset_f >> i); quotremSi(i, f + offset_f, (1UL << k) - offset_f, beta); offset_f += 1UL << i; len -= 1UL << i; } } // go up, reconstructing general rem len = length; i = gf2x_ctzl(len); len >>= i; pf = f + length; ii = 1UL << i; i++; len >>= 1; for (; i <= k - 1; ++i) { if (len & 1) { allBetai(beta, (length - (1UL << i) - ii) >> i); mulSi(i, pf - ii, ii, beta); ii += 1UL << i; } len >>= 1; } } // Interpolation with subproduct tree. // This is a truncated version, where we reconstruct length coefficients, // from length values. (length <= 1UL< (1UL << (k - 1))) interpolateSiNobeta(k - 1, f); reduceModTrunc(f, k, length); } #if (GF2X_WORDSIZE == 64) #if CANTOR_BASE_FIELD_SIZE == 128 void decomposeK(Kelt * f, const unsigned long * F, size_t Fl, int k) { assert(Fl <= (1UL << k)); for (size_t i = 0; i < Fl; ++i) { /* Set low part of 128 bits from 64-bits in F[i] */ f[i][0] = F[i]; f[i][1] = 0; } memset(f + Fl, 0, ((1UL << k) - Fl) * sizeof(Kelt)); } void recomposeK(unsigned long * F, Kelt * f, size_t Fl, int k GF2X_MAYBE_UNUSED) { assert(Fl <= (1UL << k)); F[0] = f[0][0]; for (size_t i = 1; i < Fl ; ++i) F[i] = f[i][0] ^ f[i - 1][1]; } #elif CANTOR_BASE_FIELD_SIZE == 64 void decomposeK(Kelt * f, const unsigned long * F, size_t Fl, int k) { size_t i; /* We're computing a DFT of length 2^k, so we can accomodate 2^k*32 * bits in the coefficients. We need to make Fl*64 bits fit. Hence * the following assertion. */ assert(Fl <= (1UL << (k-1))); for (i = 0; i < 2*Fl ; i+=2) { /* Set low part of 64 bits from low 32 bits in F[i/2] */ f[i][0] = F[i/2] & ((1UL<<32)-1); /* Set low part of 64 bits from low 32 bits in F[i/2] */ f[i+1][0] = F[i/2] >> 32; } memset(f + i, 0, ((1UL << k) - 2*Fl) * sizeof(Kelt)); } void recomposeK(unsigned long * F, Kelt * f, size_t Fl, int k GF2X_MAYBE_UNUSED) { size_t i; assert(Fl <= (1UL << (k-1))); i=0; F[i] = f[2*i][0] ^ (f[2*i+1][0] << 32) ; for (i = 1; i < Fl ;i++) { F[i] = f[2*i][0] ^ (f[2*i+1][0] << 32) ^ (f[2*i-1][0] >> 32); } } #else #error "Define CANTOR_BASE_FIELD_SIZE to 64 or 128" #endif #elif (GF2X_WORDSIZE == 32) #if CANTOR_BASE_FIELD_SIZE == 128 void decomposeK(Kelt * f, const unsigned long * F, size_t Fl, int k) { size_t i; assert(Fl <= (1UL << (k+1))); for (i = 0; i < Fl / 2 ; ++i) { /* Set low part of 128 bits from 64-bits in F[i] */ f[i][0] = F[2*i]; f[i][1] = F[2*i + 1]; f[i][2] = 0; f[i][3] = 0; } if (Fl & 1) { /* Fix the tail, too */ f[i][0] = F[2*i]; f[i][1] = 0; f[i][2] = 0; f[i][3] = 0; i++; } memset(f + i, 0, ((1UL << k) - i) * sizeof(Kelt)); } void recomposeK(unsigned long * F, Kelt * f, size_t Fl, unsigned int k GF2X_MAYBE_UNUSED) { size_t i; assert(Fl <= (1UL << (k+1))); F[0] = f[0][0]; F[1] = f[0][1]; for (i = 2; i + 1 < Fl; i += 2) { F[i] = f[i/2][0] ^ f[i/2 - 1][2]; F[i+1] = f[i/2][1] ^ f[i/2 - 1][3]; } if (Fl & 1) { F[i] = f[i/2][0] ^ f[i/2 - 1][2]; } } #elif CANTOR_BASE_FIELD_SIZE == 64 void decomposeK(Kelt * f, const unsigned long * F, size_t Fl, int k) { /* We're computing a DFT of length 2^k, so we can accomodate 2^k*32 * bits in the coefficients. We need to make Fl*32 bits fit. Hence * the following assertion. */ assert(Fl <= (1UL << k)); for (size_t i = 0; i < Fl; ++i) { /* Set low part of 64 bits from 32-bits in F[i] */ f[i][0] = F[i]; f[i][1] = 0; } memset(f + Fl, 0, ((1UL << k) - Fl) * sizeof(Kelt)); } void recomposeK(unsigned long * F, Kelt * f, size_t Fl, int k GF2X_MAYBE_UNUSED) { assert(Fl <= (1UL << k)); F[0] = f[0][0]; for (size_t i = 1; i < Fl ; ++i) F[i] = f[i][0] ^ f[i - 1][1]; } #else #error "Define CANTOR_BASE_FIELD_SIZE to 64 or 128" #endif #else #error "define GF2X_WORDSIZE" #endif /* nF is a number of coefficients == number of bits ; a.k.a. degree + 1 */ void gf2x_cantor_fft_init(gf2x_cantor_fft_info_t p, size_t nF, size_t nG, ...) { unsigned int k; size_t Hl; size_t n; /* Since internally we're working with 64-bit data, then it's really * a hard 64 here, not GF2X_WORDSIZE : We're just deciding on the order * of things. */ const int keep_bits_per_coeff = CANTOR_BASE_FIELD_SIZE / 2; size_t Fl = (nF + keep_bits_per_coeff - 1) / keep_bits_per_coeff; size_t Gl = (nG + keep_bits_per_coeff - 1) / keep_bits_per_coeff; n = Hl = Fl + Gl; // nb of Kelt of the result, with padding. for(k = 1; (1UL << k) < n ; k++) ; /* We used to refuse k < 2 here. Now we've got sufficient provision * in here to accomodate for the case where k==1, so a safe fallback * works. */ p->k = k; p->n = n; } void gf2x_cantor_fft_clear(gf2x_cantor_fft_info_t p) { memset(p, 0, sizeof(gf2x_cantor_fft_info_t)); } /* nF is a number of coefficients */ void gf2x_cantor_fft_dft(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, const unsigned long * F, size_t nF) { size_t Fl = (nF + GF2X_WORDSIZE - 1) / GF2X_WORDSIZE; if (nF % GF2X_WORDSIZE) { /* Just as we are computing this assertion, we could easily mask out * the bits ourselves. However, our interface mandates that the high * bits be cleared in any case. So make sure we properly enforce this * constraint. */ assert((F[Fl-1] & ~((1UL << (nF % GF2X_WORDSIZE)) - 1)) == 0); } #ifdef WITHOUT_CANTOR_TRUNCATION memset(x, 0, sizeof(Kelt) << p->k); #endif decomposeK(x,F,Fl,p->k); #ifdef CANTOR_GM multievaluateGM(x, p->k, p->n); #else #ifdef WITHOUT_CANTOR_TRUNCATION multievaluateKrec(x, p->k, 0); #else multievaluateKnew_trunc(x, p->k, p->n); #endif #endif } void gf2x_cantor_fft_compose(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2) { for (size_t j = 0; j < transform_datasize(p) ; j++) { Kmul(y[j], x1[j], x2[j]); } } void gf2x_cantor_fft_addcompose_n(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr * x1, gf2x_cantor_fft_srcptr * x2, size_t n) { Kelt er; #if 0 /* strategy 1: run all pointers simultaneously, and run many * simultaneous accumulators */ #define ACCUMULATE 256 size_t j; for (j = 0; j + ACCUMULATE - 1 < transform_datasize(p) ; j+= ACCUMULATE) { Kelt_ur e[ACCUMULATE], s[ACCUMULATE]; for(int t = 0 ; t < ACCUMULATE ; t++) Kelt_ur_set_zero(s[t]); for(size_t k = 0 ; k < n ; k++) { for(int t = 0 ; t < ACCUMULATE ; t++) { Kmul_ur(e[t], x1[k][j+t], x2[k][j+t]); Kelt_ur_add(s[t], s[t], e[t]); } } for(int t = 0 ; t < ACCUMULATE ; t++) { Kreduce(er, s[t]); Kadd(y[j+t], y[j+t], er); } } for (; j < transform_datasize(p) ; j++) { Kelt_ur e, s; Kelt_ur_set_zero(s); for(size_t k = 0 ; k < n ; k++) { Kmul_ur(e, x1[k][j], x2[k][j]); Kelt_ur_add(s, s, e); } Kreduce(er, s); Kadd(y[j], y[j], er); } #else /* strategy 2: run only a fixed number of pointers at the same time. * We do more reductions, but control how fewer we do. */ #define SIMULTANEOUS 8 size_t k; for(k = 0 ; k + SIMULTANEOUS - 1 < n ; k += SIMULTANEOUS) { for(size_t j = 0 ; j < transform_datasize(p) ; j++) { Kelt_ur s; Kelt_ur_set_zero(s); for(size_t r = 0 ; r < SIMULTANEOUS ; r++) { Kelt_ur e; Kmul_ur(e, x1[r][j], x2[r][j]); Kelt_ur_add(s, s, e); } Kreduce(er, s); Kadd(y[j], y[j], er); } x1 += SIMULTANEOUS; x2 += SIMULTANEOUS; } for( ; k < n ; k ++) { for(size_t j = 0 ; j < transform_datasize(p) ; j++) { Kelt_ur s; Kelt_ur_set_zero(s); { size_t r = 0; Kelt_ur e; Kmul_ur(e, x1[r][j], x2[r][j]); Kelt_ur_add(s, s, e); } Kreduce(er, s); Kadd(y[j], y[j], er); } x1 ++; x2 ++; } #endif } void gf2x_cantor_fft_addcompose(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2) { gf2x_cantor_fft_addcompose_n(p, y, &x1, &x2, 1); } void gf2x_cantor_fft_add(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x1, gf2x_cantor_fft_srcptr x2) { for (size_t j = 0; j < transform_datasize(p) ; j++) { Kadd(y[j], x1[j], x2[j]); } } void gf2x_cantor_fft_cpy(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr y, gf2x_cantor_fft_srcptr x) { memcpy(y, x, transform_datasize(p)*sizeof(Kelt)); } size_t gf2x_cantor_fft_size(const gf2x_cantor_fft_info_t p) { // the _size() is a number of Kelt of the result. // n normally, except when not truncating... return transform_datasize(p); } /* nH is a number of coefficients */ /* this destroys the input */ void gf2x_cantor_fft_ift( const gf2x_cantor_fft_info_t p, unsigned long * H, size_t nH, gf2x_cantor_fft_ptr h) { size_t Hl = (nH + GF2X_WORDSIZE - 1) / GF2X_WORDSIZE; #ifdef WITHOUT_CANTOR_TRUNCATION interpolateK(h, p->k); #else // fill in with zeros to facilitate interpolation memset(h + p->n, 0, ((1UL << p->k) - p->n) * sizeof(Kelt)); if (p->n & (p->n - 1)) { /* n is not a power of 2 */ interpolateK_trunc(h, p->k, p->n); } else { interpolateK(h, p->k); } #endif recomposeK(H, h, Hl, p->k); } gf2x_cantor_fft_ptr gf2x_cantor_fft_alloc(const gf2x_cantor_fft_info_t p, size_t n) { return (Kelt *) malloc((n+(n << p->k)) * sizeof(Kelt)); } void gf2x_cantor_fft_free( const gf2x_cantor_fft_info_t p GF2X_MAYBE_UNUSED, gf2x_cantor_fft_ptr x, size_t n GF2X_MAYBE_UNUSED) { free(x); } gf2x_cantor_fft_srcptr gf2x_cantor_fft_get_const(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_srcptr x, size_t k) { return x + (k << p->k) + k; } gf2x_cantor_fft_ptr gf2x_cantor_fft_get(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, size_t k) { return x + (k << p->k) + k; } void gf2x_cantor_fft_zero(const gf2x_cantor_fft_info_t p, gf2x_cantor_fft_ptr x, size_t n) { memset(x, 0, ((n << p->k) + n) * sizeof(Kelt)); } void gf2x_cantor_fft_init_similar(gf2x_cantor_fft_info_ptr o, size_t bits_a, size_t bits_b, gf2x_cantor_fft_info_srcptr other GF2X_MAYBE_UNUSED) { gf2x_cantor_fft_init(o, bits_a, bits_b); } int gf2x_cantor_fft_compatible(gf2x_cantor_fft_info_srcptr o1, gf2x_cantor_fft_info_srcptr o2) { return o1->k == o2->k; } /* vim: set sw=4 sta et: */ gf2x-1.2/fft/mpfq/0000755000327606072450000000000013126452066010772 500000000000000gf2x-1.2/fft/mpfq/i386/0000755000327606072450000000000013126452066011463 500000000000000gf2x-1.2/fft/mpfq/i386/mpfq_2_128.c0000644000327606072450000002434113125214702013321 00000000000000/* MPFQ generated file -- do not edit */ #include "mpfq_2_128.h" /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^128) */ /* Definition polynomial P = X^128 + X^7 + X^2 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 128, 7, 2, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=128, no_gmp=1, output_path=i386, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_128, w=32, } */ /* Functions operating on the field structure */ /* Element allocation functions */ /* Elementary assignment functions */ /* Assignment of random values */ /* Arithmetic operations on elements */ /* missing powz */ /* Operations involving unreduced elements */ /* Comparison functions */ /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ /* *Mpfq::defaults::vec::alloc::code_for_vec_init, Mpfq::defaults::vec */ void mpfq_2_128_vec_init(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n) { unsigned int i; *v = (mpfq_2_128_vec) malloc (n*sizeof(mpfq_2_128_elt)); for(i = 0; i < n; i++) mpfq_2_128_init(K, (*v) + i); } /* *Mpfq::defaults::vec::alloc::code_for_vec_reinit, Mpfq::defaults::vec */ void mpfq_2_128_vec_reinit(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n, unsigned int m) { if (n < m) { // increase size unsigned int i; *v = (mpfq_2_128_vec) realloc (*v, m * sizeof(mpfq_2_128_elt)); for(i = n; i < m; i+=1) mpfq_2_128_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_128_clear(K, (*v) + i); *v = (mpfq_2_128_vec) realloc (*v, m * sizeof(mpfq_2_128_elt)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_clear, Mpfq::defaults::vec */ void mpfq_2_128_vec_clear(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_clear(K, (*v) + i); free(*v); } /* missing vec_random */ /* missing vec_random2 */ /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_init, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_init(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n) { unsigned int i; *v = (mpfq_2_128_vec_ur) malloc (n*sizeof(mpfq_2_128_elt_ur)); for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_init(K, &( (*v)[i])); } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_reinit, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_reinit(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n, unsigned int m) { if (n < m) { // increase size *v = (mpfq_2_128_vec_ur) realloc (*v, m * sizeof(mpfq_2_128_elt_ur)); unsigned int i; for(i = n; i < m; i+=1) mpfq_2_128_elt_ur_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_128_elt_ur_clear(K, (*v) + i); *v = (mpfq_2_128_vec_ur) realloc (*v, m * sizeof(mpfq_2_128_elt_ur)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_clear, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_clear(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_clear(K, &( (*v)[i])); free(*v); } /* Polynomial functions */ /* *Mpfq::defaults::poly::code_for_poly_setmonic */ void mpfq_2_128_poly_setmonic(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p) { long degp = mpfq_2_128_poly_deg(K, p); if (degp == -1) { q->size = 0; return; } if (degp == 0) { mpfq_2_128_elt aux; mpfq_2_128_init(K, &aux); mpfq_2_128_set_ui(K, aux, 1); mpfq_2_128_poly_setcoeff(K, q, aux, 0); mpfq_2_128_clear(K, &aux); q->size = 1; return; } mpfq_2_128_elt lc; /* spurious uninit warning sometimes */ mpfq_2_128_init(K, &lc); mpfq_2_128_poly_getcoeff(K, lc, p, degp); mpfq_2_128_inv(K, lc, lc); mpfq_2_128_poly_setcoeff_ui(K, q, 1, degp); mpfq_2_128_vec_scal_mul(K, q->c, p->c, lc, degp); q->size = degp+1; mpfq_2_128_clear(K, &lc); } /* *Mpfq::defaults::poly::code_for_poly_divmod */ int mpfq_2_128_poly_divmod(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_dst_poly r, mpfq_2_128_src_poly a, mpfq_2_128_src_poly b) { if (b->size == 0) { return 0; } if (a->size == 0) { q->size = 0; r->size = 0; return 1; } int dega = mpfq_2_128_poly_deg(K, a); if (dega<0) { q->size = 0; r->size = 0; return 1; } // Compute deg b and inverse of leading coef int degb = mpfq_2_128_poly_deg(K, b); if (degb<0) { return 0; } if (degb > dega) { q->size=0; mpfq_2_128_poly_set(K, r, a); return 1; } int bmonic; mpfq_2_128_elt ilb; mpfq_2_128_init(K, &ilb); mpfq_2_128_elt temp; mpfq_2_128_init(K, &temp); mpfq_2_128_poly_getcoeff(K, temp, b, degb); if (mpfq_2_128_cmp_ui(K, temp, 1) == 0) { mpfq_2_128_set_ui(K, ilb, 1); bmonic = 1; } else { mpfq_2_128_inv(K, ilb, temp); bmonic = 0; } mpfq_2_128_poly qq, rr; mpfq_2_128_poly_init(K, qq, dega-degb+1); mpfq_2_128_poly_init(K, rr, dega); mpfq_2_128_poly_set(K, rr, a); mpfq_2_128_elt aux, aux2; mpfq_2_128_init(K, &aux); mpfq_2_128_init(K, &aux2); int i; int j; for (i = dega; i >= (int)degb; --i) { mpfq_2_128_poly_getcoeff(K, aux, rr, i); if (!bmonic) mpfq_2_128_mul(K, aux, aux, ilb); mpfq_2_128_poly_setcoeff(K, qq, aux, i-degb); for (j = i-1; j >= (int)(i - degb); --j) { mpfq_2_128_poly_getcoeff(K, temp, b, j-i+degb); mpfq_2_128_mul(K, aux2, aux, temp); mpfq_2_128_poly_getcoeff(K, temp, rr, j); mpfq_2_128_sub(K, temp, temp, aux2); mpfq_2_128_poly_setcoeff(K, rr, temp, j); } } rr->size = degb; int degr = mpfq_2_128_poly_deg(K, rr); rr->size = degr+1; if (q != NULL) mpfq_2_128_poly_set(K, q, qq); if (r != NULL) mpfq_2_128_poly_set(K, r, rr); mpfq_2_128_clear(K, &temp); mpfq_2_128_clear(K, &ilb); mpfq_2_128_clear(K, &aux); mpfq_2_128_clear(K, &aux2); mpfq_2_128_poly_clear(K, rr); mpfq_2_128_poly_clear(K, qq); return 1; } static void mpfq_2_128_poly_preinv(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned int); /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ /* Triggered by: poly_precomp_mod */ static void mpfq_2_128_poly_preinv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p, unsigned int n) { // Compute the inverse of p(x) modulo x^n // Newton iteration: x_{n+1} = x_n + x_n(1 - a*x_n) // Requires p(0) = 1 // Assume p != q (no alias) mpfq_2_128_elt temp; /* spurious uninit warning sometimes */ mpfq_2_128_init(K, &temp); mpfq_2_128_poly_getcoeff(K, temp, p, 0);//Should be in the assert assert( mpfq_2_128_cmp_ui(K, temp, 1) == 0); assert (p != q); int m; if (n <= 2) { mpfq_2_128_poly_setcoeff_ui(K, q, 1, 0); q->size = 1; m = 1; if (n == 1) return; } else { // n >= 3: recursive call at prec m = ceil(n/2) m = 1 + ((n-1)/2); mpfq_2_128_poly_preinv(K, q, p, m); } // enlarge q if necessary if (q->alloc < n) { mpfq_2_128_vec_reinit(K, &(q->c), q->alloc, n); q->alloc = n; } // refine value mpfq_2_128_vec tmp; mpfq_2_128_vec_init(K, &tmp, m+n-1); mpfq_2_128_vec_conv(K, tmp, p->c, MIN(n, p->size), q->c, m); int nn = MIN(n, MIN(n, p->size) + m -1); mpfq_2_128_vec_neg(K, tmp, tmp, nn); mpfq_2_128_vec_getcoeff(K, temp, tmp, 0); mpfq_2_128_add_ui(K, temp, temp, 1); mpfq_2_128_vec_setcoeff(K, tmp, temp, 0); mpfq_2_128_vec_conv(K, tmp, q->c, m, tmp, nn); mpfq_2_128_vec_set(K, mpfq_2_128_vec_subvec(K, q->c, m), mpfq_2_128_vec_subvec(K, tmp, m), n-m); q->size = n; mpfq_2_128_clear(K, &temp); mpfq_2_128_vec_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ void mpfq_2_128_poly_precomp_mod(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p) { assert(p != q); int N = mpfq_2_128_poly_deg(K, p); mpfq_2_128_poly rp; mpfq_2_128_poly_init(K, rp, N+1); mpfq_2_128_vec_rev(K, rp->c, p->c, N+1); rp->size = N+1; mpfq_2_128_poly_preinv(K, q, rp, N); mpfq_2_128_poly_clear(K, rp); } /* *Mpfq::defaults::poly::code_for_poly_mod_pre */ void mpfq_2_128_poly_mod_pre(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly r, mpfq_2_128_src_poly q, mpfq_2_128_src_poly p, mpfq_2_128_src_poly irp) { int N = mpfq_2_128_poly_deg(K, p); int degq = mpfq_2_128_poly_deg(K, q); if (degq < N) { mpfq_2_128_poly_set(K, r, q); return; } int m = degq - N; assert (degq <= 2*N-2); mpfq_2_128_poly revq; mpfq_2_128_poly_init(K, revq, MAX(degq+1, m+1)); mpfq_2_128_vec_rev(K, revq->c, q->c, degq+1); revq->size = q->size; mpfq_2_128_poly_mul(K, revq, revq, irp); mpfq_2_128_vec_rev(K, revq->c, revq->c, m+1); revq->size = m+1; mpfq_2_128_poly_mul(K, revq, revq, p); mpfq_2_128_poly_sub(K, r, q, revq); r->size = mpfq_2_128_poly_deg(K, r)+1; mpfq_2_128_poly_clear(K, revq); } /* missing poly_random */ /* missing poly_random2 */ /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/i386/mpfq_2_128.h0000644000327606072450000021511713125214702013331 00000000000000#ifndef MPFQ_2_128_H_ #define MPFQ_2_128_H_ /* MPFQ generated file -- do not edit */ #include "gf2x.h" #include "gf2x/gf2x-small.h" #include "mpfq.h" #include "mpfq_gf2n_common.h" #include #include #include #include #include #include #include #include #include "assert.h" #ifdef MPFQ_LAST_GENERATED_TAG #undef MPFQ_LAST_GENERATED_TAG #endif #define MPFQ_LAST_GENERATED_TAG 2_128 /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^128) */ /* Definition polynomial P = X^128 + X^7 + X^2 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 128, 7, 2, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=128, no_gmp=1, output_path=i386, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_128, w=32, } */ typedef mpfq_2_field mpfq_2_128_field; typedef mpfq_2_dst_field mpfq_2_128_dst_field; typedef unsigned long mpfq_2_128_elt[4]; typedef unsigned long * mpfq_2_128_dst_elt; typedef const unsigned long * mpfq_2_128_src_elt; typedef unsigned long mpfq_2_128_elt_ur[8]; typedef unsigned long * mpfq_2_128_dst_elt_ur; typedef const unsigned long * mpfq_2_128_src_elt_ur; typedef mpfq_2_128_elt * mpfq_2_128_vec; typedef mpfq_2_128_elt * mpfq_2_128_dst_vec; typedef mpfq_2_128_elt * mpfq_2_128_src_vec; typedef mpfq_2_128_elt_ur * mpfq_2_128_vec_ur; typedef mpfq_2_128_elt_ur * mpfq_2_128_dst_vec_ur; typedef mpfq_2_128_elt_ur * mpfq_2_128_src_vec_ur; typedef struct { mpfq_2_128_vec c; unsigned int alloc; unsigned int size; } mpfq_2_128_poly_struct; typedef mpfq_2_128_poly_struct mpfq_2_128_poly [1]; typedef mpfq_2_128_poly_struct * mpfq_2_128_dst_poly; typedef mpfq_2_128_poly_struct * mpfq_2_128_src_poly; #ifdef __cplusplus extern "C" { #endif /* *Mpfq::defaults::code_for_impl_name */ #define mpfq_2_128_impl_name() "2_128" /* *Mpfq::gf2n::field::code_for_impl_max_characteristic_bits */ #define mpfq_2_128_impl_max_characteristic_bits() 2 /* *Mpfq::gf2n::field::code_for_impl_max_degree */ #define mpfq_2_128_impl_max_degree() 1 /* Functions operating on the field structure */ /* *Mpfq::gf2n::field::code_for_field_characteristic_bits */ #define mpfq_2_128_field_characteristic_bits(f) 1 /* *Mpfq::gf2n::field::code_for_field_degree */ #define mpfq_2_128_field_degree(f) 128 static inline void mpfq_2_128_field_init(mpfq_2_128_dst_field); /* *Mpfq::gf2n::field::code_for_field_clear */ #define mpfq_2_128_field_clear(K) /**/ /* *Mpfq::gf2n::field::code_for_field_specify */ #define mpfq_2_128_field_specify(k, dummy, vp) /**/ static inline void mpfq_2_128_field_setopt(mpfq_2_128_dst_field, unsigned long, void *); /* Element allocation functions */ /* *Mpfq::defaults::flatdata::code_for_init, Mpfq::gf2n::trivialities */ #define mpfq_2_128_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_128_clear(f, px) /**/ /* Elementary assignment functions */ static inline void mpfq_2_128_set(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, unsigned long); static inline void mpfq_2_128_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_elt); static inline unsigned long mpfq_2_128_get_ui(mpfq_2_128_dst_field, mpfq_2_128_src_elt); static inline void mpfq_2_128_set_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, unsigned long); static inline void mpfq_2_128_set_uipoly_wide(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, const unsigned long *, unsigned int); static inline unsigned long mpfq_2_128_get_uipoly(mpfq_2_128_dst_field, mpfq_2_128_src_elt); static inline void mpfq_2_128_get_uipoly_wide(mpfq_2_128_dst_field, unsigned long *, mpfq_2_128_src_elt); /* Assignment of random values */ /* Arithmetic operations on elements */ static inline void mpfq_2_128_add(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, mpfq_2_128_src_elt); /* *Mpfq::gf2n::trivialities::code_for_sub */ #define mpfq_2_128_sub(K, r, s1, s2) mpfq_2_128_add(K,r,s1,s2) /* *Mpfq::gf2n::trivialities::code_for_neg */ #define mpfq_2_128_neg(K, r, s) mpfq_2_128_set(K,r,s) static inline void mpfq_2_128_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_sqr(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); /* *Mpfq::gf2n::trivialities::code_for_is_sqr */ #define mpfq_2_128_is_sqr(f, p) 1 static inline int mpfq_2_128_sqrt(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_pow(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long *, size_t); /* missing powz */ /* *Mpfq::gf2n::trivialities::code_for_frobenius */ #define mpfq_2_128_frobenius(K, r, s) mpfq_2_128_sqr(K,r,s) static inline void mpfq_2_128_add_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_ui */ #define mpfq_2_128_sub_ui(K, r, s1, s2) mpfq_2_128_add_ui(K,r,s1,s2) static inline void mpfq_2_128_mul_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); static inline void mpfq_2_128_add_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_uipoly */ #define mpfq_2_128_sub_uipoly(K, r, s1, s2) mpfq_2_128_add_uipoly(K,r,s1,s2) static inline void mpfq_2_128_mul_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); static inline void mpfq_2_128_longshift_left(unsigned long *, const unsigned long *, int, int); static inline void mpfq_2_128_longaddshift_left(unsigned long *, const unsigned long *, int, int); static inline int mpfq_2_128_inv(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_as_solve(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline unsigned long mpfq_2_128_trace(mpfq_2_128_dst_field, mpfq_2_128_src_elt); /* Operations involving unreduced elements */ /* *Mpfq::defaults::flatdata::code_for_elt_ur_init, Mpfq::gf2n::trivialities */ #define mpfq_2_128_elt_ur_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_elt_ur_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_128_elt_ur_clear(f, px) /**/ static inline void mpfq_2_128_elt_ur_set(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt_ur); static inline void mpfq_2_128_elt_ur_set_elt(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt); static inline void mpfq_2_128_elt_ur_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur); static inline void mpfq_2_128_elt_ur_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, unsigned long); static inline void mpfq_2_128_elt_ur_add(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt_ur, mpfq_2_128_src_elt_ur); /* *Mpfq::gf2n::trivialities::code_for_elt_ur_neg */ #define mpfq_2_128_elt_ur_neg(K, r, s) mpfq_2_128_elt_ur_set(K,r,s) /* *Mpfq::gf2n::trivialities::code_for_elt_ur_sub */ #define mpfq_2_128_elt_ur_sub(K, r, s1, s2) mpfq_2_128_elt_ur_add(K,r,s1,s2) static inline void mpfq_2_128_mul_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_sqr_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt); static inline void mpfq_2_128_reduce(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_dst_elt_ur); /* Comparison functions */ static inline int mpfq_2_128_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline int mpfq_2_128_cmp_ui(mpfq_2_128_dst_field, mpfq_2_128_src_elt, unsigned long); static inline int mpfq_2_128_is_zero(mpfq_2_128_dst_field, mpfq_2_128_src_elt); /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ void mpfq_2_128_vec_init(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int); void mpfq_2_128_vec_reinit(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int, unsigned int); void mpfq_2_128_vec_clear(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int); static inline void mpfq_2_128_vec_set(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, unsigned int); static inline void mpfq_2_128_vec_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_setcoeff_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, unsigned long, unsigned int); static inline void mpfq_2_128_vec_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_add(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_rev(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_scal_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_conv(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int, mpfq_2_128_src_vec, unsigned int); /* missing vec_random */ /* missing vec_random2 */ static inline int mpfq_2_128_vec_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline int mpfq_2_128_vec_is_zero(mpfq_2_128_dst_field, mpfq_2_128_src_vec, unsigned int); static inline mpfq_2_128_dst_vec mpfq_2_128_vec_subvec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, int); static inline mpfq_2_128_src_vec mpfq_2_128_vec_subvec_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec, int); static inline mpfq_2_128_dst_elt mpfq_2_128_vec_coeff_ptr(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, int); static inline mpfq_2_128_src_elt mpfq_2_128_vec_coeff_ptr_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec, int); /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ void mpfq_2_128_vec_ur_init(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int); static inline void mpfq_2_128_vec_ur_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_set_vec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, unsigned int); void mpfq_2_128_vec_ur_reinit(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int, unsigned int); void mpfq_2_128_vec_ur_clear(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int); static inline void mpfq_2_128_vec_ur_set(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_elt_ur, unsigned int); static inline void mpfq_2_128_vec_ur_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_add(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_rev(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_scal_mul_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_conv_ur_n(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_conv_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, unsigned int, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_reduce(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_dst_vec_ur, unsigned int); static inline mpfq_2_128_dst_vec_ur mpfq_2_128_vec_ur_subvec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, int); static inline mpfq_2_128_src_vec_ur mpfq_2_128_vec_ur_subvec_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec_ur, int); static inline mpfq_2_128_dst_elt mpfq_2_128_vec_ur_coeff_ptr(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, int); static inline mpfq_2_128_src_elt mpfq_2_128_vec_ur_coeff_ptr_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec_ur, int); /* *Mpfq::defaults::flatdata::code_for_vec_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_128_vec_elt_stride(K, n) ((n)*sizeof(mpfq_2_128_elt)) /* *Mpfq::defaults::flatdata::code_for_vec_ur_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_128_vec_ur_elt_stride(K, n) ((n)*sizeof(mpfq_2_128_elt_ur)) /* Polynomial functions */ static inline void mpfq_2_128_poly_init(mpfq_2_128_dst_field, mpfq_2_128_poly, unsigned int); static inline void mpfq_2_128_poly_clear(mpfq_2_128_dst_field, mpfq_2_128_poly); static inline void mpfq_2_128_poly_set(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_setmonic(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_poly_setcoeff_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, unsigned long, unsigned int); static inline void mpfq_2_128_poly_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_poly, unsigned int); static inline int mpfq_2_128_poly_deg(mpfq_2_128_dst_field, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_add(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, unsigned long); static inline void mpfq_2_128_poly_add_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned long); static inline void mpfq_2_128_poly_sub_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned long); static inline void mpfq_2_128_poly_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_scal_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_elt); static inline void mpfq_2_128_poly_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); int mpfq_2_128_poly_divmod(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_precomp_mod(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_mod_pre(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_gcd(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_xgcd(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); /* missing poly_random */ /* missing poly_random2 */ static inline int mpfq_2_128_poly_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_poly, mpfq_2_128_src_poly); /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ #ifdef __cplusplus } #endif /* Implementations for inlines */ /* *Mpfq::gf2n::field::code_for_field_init */ static inline void mpfq_2_128_field_init(mpfq_2_128_dst_field f) { f->io_type=16; } /* *Mpfq::gf2n::field::code_for_field_setopt */ static inline void mpfq_2_128_field_setopt(mpfq_2_128_dst_field f, unsigned long x MAYBE_UNUSED, void * y) { assert(x == MPFQ_IO_TYPE); f->io_type=((unsigned long*)y)[0]; } /* *Mpfq::defaults::flatdata::code_for_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt)); } /* *Mpfq::gf2n::trivialities::code_for_set_ui */ static inline void mpfq_2_128_set_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_128_elt) - sizeof(unsigned long)); } /* *Mpfq::defaults::flatdata::code_for_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r) { mpfq_2_128_vec_set_zero(K,(mpfq_2_128_dst_vec)r,1); } /* *Mpfq::gf2n::trivialities::code_for_get_ui */ static inline unsigned long mpfq_2_128_get_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { return r[0] & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly */ static inline void mpfq_2_128_set_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, unsigned long x) { r[0] = x; memset(r + 1, 0, sizeof(mpfq_2_128_elt) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly_wide */ static inline void mpfq_2_128_set_uipoly_wide(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, const unsigned long * x, unsigned int n) { unsigned int i; for (i = 0 ; i < n && i < 4 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly */ static inline unsigned long mpfq_2_128_get_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { return r[0]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly_wide */ static inline void mpfq_2_128_get_uipoly_wide(mpfq_2_128_dst_field K MAYBE_UNUSED, unsigned long * r, mpfq_2_128_src_elt x) { unsigned int i; for(i = 0 ; i < 4 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_add */ static inline void mpfq_2_128_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { int i; for(i = 0 ; i < 4 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::trivialities::code_for_mul */ static inline void mpfq_2_128_mul(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { mpfq_2_128_elt_ur t; mpfq_2_128_mul_ur(K, t, s1, s2); mpfq_2_128_reduce(K, r, t); } /* *Mpfq::gf2n::trivialities::code_for_sqr */ static inline void mpfq_2_128_sqr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { mpfq_2_128_elt_ur t; mpfq_2_128_sqr_ur(K, t, s); mpfq_2_128_reduce(K, r, t); } /* *Mpfq::gf2n::linearops::code_for_sqrt */ static inline int mpfq_2_128_sqrt(mpfq_2_128_dst_field K, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { static const unsigned long shuffle_table[256] = { 0, 1, 16, 17, 2, 3, 18, 19, 32, 33, 48, 49, 34, 35, 50, 51, 4, 5, 20, 21, 6, 7, 22, 23, 36, 37, 52, 53, 38, 39, 54, 55, 64, 65, 80, 81, 66, 67, 82, 83, 96, 97, 112, 113, 98, 99, 114, 115, 68, 69, 84, 85, 70, 71, 86, 87, 100, 101, 116, 117, 102, 103, 118, 119, 8, 9, 24, 25, 10, 11, 26, 27, 40, 41, 56, 57, 42, 43, 58, 59, 12, 13, 28, 29, 14, 15, 30, 31, 44, 45, 60, 61, 46, 47, 62, 63, 72, 73, 88, 89, 74, 75, 90, 91, 104, 105, 120, 121, 106, 107, 122, 123, 76, 77, 92, 93, 78, 79, 94, 95, 108, 109, 124, 125, 110, 111, 126, 127, 128, 129, 144, 145, 130, 131, 146, 147, 160, 161, 176, 177, 162, 163, 178, 179, 132, 133, 148, 149, 134, 135, 150, 151, 164, 165, 180, 181, 166, 167, 182, 183, 192, 193, 208, 209, 194, 195, 210, 211, 224, 225, 240, 241, 226, 227, 242, 243, 196, 197, 212, 213, 198, 199, 214, 215, 228, 229, 244, 245, 230, 231, 246, 247, 136, 137, 152, 153, 138, 139, 154, 155, 168, 169, 184, 185, 170, 171, 186, 187, 140, 141, 156, 157, 142, 143, 158, 159, 172, 173, 188, 189, 174, 175, 190, 191, 200, 201, 216, 217, 202, 203, 218, 219, 232, 233, 248, 249, 234, 235, 250, 251, 204, 205, 220, 221, 206, 207, 222, 223, 236, 237, 252, 253, 238, 239, 254, 255, }; mpfq_2_128_elt sqrt_t ={ 0xb6db6da4UL, 0x6db6db6dUL, 0x92492492UL, 0x24924924UL, } ; mpfq_2_128_elt odd, even; mpfq_2_128_elt_ur odd_t; unsigned long t; #define EVEN_MASK (((unsigned long)-1)/3UL) #define ODD_MASK ((EVEN_MASK)<<1) unsigned int i; for(i = 0 ; i < 4 ; i++) { even[i] = s[i] & EVEN_MASK; } for(i = 0 ; i < 2 ; i++) { t = even[2*i]; t |= t >> 7; even[i] = shuffle_table[t & 255]; t >>= 16; even[i] |= shuffle_table[t & 255] << 8; t = even[2*i+1]; t |= t >> 7; even[i] |= shuffle_table[t & 255] << 16; t >>= 16; even[i] |= shuffle_table[t & 255] << 24; } memset(even + 2, 0, 2 * sizeof(unsigned long)); for(i = 0 ; i < 4 ; i++) { odd[i] = (s[i] & ODD_MASK) >> 1; } for(i = 0 ; i < 2 ; i++) { t = odd[2*i]; t |= t >> 7; odd[i] = shuffle_table[t & 255]; t >>= 16; odd[i] |= shuffle_table[t & 255] << 8; t = odd[2*i+1]; t |= t >> 7; odd[i] |= shuffle_table[t & 255] << 16; t >>= 16; odd[i] |= shuffle_table[t & 255] << 24; } memset(odd + 2, 0, 2 * sizeof(unsigned long)); mpfq_2_128_mul_ur(K, odd_t, odd, sqrt_t); for(i = 0 ; i < (4+1)/2 ; i++) { odd_t[i] ^= even[i]; } mpfq_2_128_reduce(K, r, odd_t); return 1; } /* *Mpfq::defaults::pow::code_for_pow, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_pow(mpfq_2_128_dst_field k, mpfq_2_128_dst_elt res, mpfq_2_128_src_elt r, unsigned long * x, size_t n) { mpfq_2_128_elt u, a; long i, j, lead; /* it is a signed type */ unsigned long mask; /* get the correct (i,j) position of the most significant bit in x */ for(i = ((long)n)-1; i>=0 && x[i]==0; i--) ; if (i < 0) { /* power zero gets 1 */ mpfq_2_128_set_ui(k, res, 1); return; } j = 32 - 1; mask = (1UL<>=1) ; lead = i*32+j; /* Ensured. */ mpfq_2_128_init(k, &u); mpfq_2_128_init(k, &a); mpfq_2_128_set(k, a, r); for( ; lead > 0; lead--) { if (j-- == 0) { i--; j = 32-1; mask = (1UL<>= 1; } if (x[i]&mask) { mpfq_2_128_sqr(k, u, a); mpfq_2_128_mul(k, a, u, r); } else { mpfq_2_128_sqr(k, a,a); } } mpfq_2_128_set(k, res, a); mpfq_2_128_clear(k, &u); mpfq_2_128_clear(k, &a); } /* *Mpfq::gf2n::trivialities::code_for_add_ui */ static inline void mpfq_2_128_add_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_set(K, r, s); r[0] ^= x & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_mul_ui */ static inline void mpfq_2_128_mul_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { if (x & 1UL) { mpfq_2_128_set(K, r, s); } else { memset(r, 0, sizeof(mpfq_2_128_elt)); } } /* *Mpfq::gf2n::trivialities::code_for_add_uipoly */ static inline void mpfq_2_128_add_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_set(K, r, s); r[0] ^= x; } /* *Mpfq::gf2n::trivialities::code_for_mul_uipoly */ static inline void mpfq_2_128_mul_uipoly(mpfq_2_128_dst_field k, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_elt xx; mpfq_2_128_init(k, &xx); mpfq_2_128_set_uipoly(k, xx, x); mpfq_2_128_mul(k, r, s, xx); mpfq_2_128_clear(k, &xx); } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_128_longshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 32; int i; s %= 32; if (s > 0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i] << s ^ src[i-1] >> (32-s); } dst[m] = src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i]; } dst[m] = src[0]; } for(i = m-1 ; i>= 0 ; i--) { dst[i] = 0UL; } } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_128_longaddshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 32; int i; s %= 32; if (s>0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i] << s ^ src[i-1] >> (32-s); } dst[m] ^= src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i]; } dst[m] ^= src[0]; } } /* *Mpfq::gf2n::inversion::code_for_inv */ static inline int mpfq_2_128_inv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { unsigned long a[5] = { 0x80000000UL, 0x43UL, 0x0UL, 0x0UL, 0x80000000UL, }; unsigned long b[5]; unsigned long u[5] = { 0, }; unsigned long v[5] = { 1, 0, }; unsigned long x; int ia, ib; int i,d; if (mpfq_2_128_cmp_ui(K, s, 0UL) == 0) return 0; { unsigned long z; z = s[0] << 31; b[0] = z; z = s[0] >> 1 ^ s[1] << 31; b[1] = z; z = s[1] >> 1 ^ s[2] << 31; b[2] = z; z = s[2] >> 1 ^ s[3] << 31; b[3] = z; z = s[3] >> 1; b[4] = z; } ib = mpfq_clzlx(b, 5); ia = 0; mpfq_2_128_longshift_left(b,b,5,ib); for(d = ib - ia ; ; ) { if (d == 0) { for(i = 0 ; i < 5 ; i++) v[i] ^= u[i]; b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; b[3] ^= a[3]; x |= b[3]; b[4] ^= a[4]; x |= b[4]; if (!x) { memcpy(r,u,4 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,5); ib += t; d += t; mpfq_2_128_longshift_left(b,b,5,t); } for(;d > 0;) { mpfq_2_128_longaddshift_left(u,v,5,d); a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; a[3] ^= b[3]; x |= a[3]; a[4] ^= b[4]; x |= a[4]; if (!x) { memcpy(r,v,4 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,5); ia += t; d -= t; mpfq_2_128_longshift_left(a,a,5,t); } if (d == 0) { for(i = 0 ; i < 5 ; i++) u[i] ^= v[i]; a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; a[3] ^= b[3]; x |= a[3]; a[4] ^= b[4]; x |= a[4]; if (!x) { memcpy(r,v,4 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,5); ia += t; d -= t; mpfq_2_128_longshift_left(a,a,5,t); } for(;d < 0;) { mpfq_2_128_longaddshift_left(v,u,5,-d); b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; b[3] ^= a[3]; x |= b[3]; b[4] ^= a[4]; x |= b[4]; if (!x) { memcpy(r,u,4 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,5); ib += t; d += t; mpfq_2_128_longshift_left(b,b,5,t); } } } /* *Mpfq::gf2n::linearops::code_for_as_solve */ static inline void mpfq_2_128_as_solve(mpfq_2_128_dst_field K, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { static const mpfq_2_128_elt t[128] = { { 0xa4b20b08UL, 0x676aac9fUL, 0xf4731af9UL, 0x295ac0b1UL, }, { 0x766af404UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0x766af406UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0x3404a20cUL, 0x7783f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0x766af402UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0x83074e6aUL, 0x7dc714cbUL, 0xd7da34b0UL, 0x2aaea79aUL, }, { 0x3404a204UL, 0x7783f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0xd2d9fe18UL, 0xf5f3f531UL, 0x1ae41171UL, 0xcc809524UL, }, { 0x766af412UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0x8ac85b44UL, 0x77cb862eUL, 0xd159ce96UL, 0x4e983687UL, }, { 0x83074e4aUL, 0x7dc714cbUL, 0xd7da34b0UL, 0x2aaea79aUL, }, { 0x6aaff56UL, 0xf73fcb3cUL, 0xaf144aafUL, 0xaae2ab6aUL, }, { 0x3404a244UL, 0x7783f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0x40603f62UL, 0x893fe9caUL, 0xcd5792ddUL, 0xe62f327cUL, }, { 0xd2d9fe98UL, 0xf5f3f531UL, 0x1ae41171UL, 0xcc809524UL, }, { 0xd453b626UL, 0xe1336bc7UL, 0x3f47c90bUL, 0xab52f032UL, }, { 0x766af512UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0xabf4573aUL, 0x79a6a089UL, 0xd75338b4UL, 0x2abe34baUL, }, { 0x8ac85944UL, 0x77cb862eUL, 0xd159ce96UL, 0x4e983687UL, }, { 0x232562fcUL, 0x1a9cbef8UL, 0xdcc72f2eUL, 0x1e8ccb9UL, }, { 0x83074a4aUL, 0x7dc714cbUL, 0xd7da34b0UL, 0x2aaea79aUL, }, { 0x4a80e48cUL, 0xce869b2UL, 0x21f3dc1aUL, 0x2442c32UL, }, { 0x6aaf756UL, 0xf73fcb3cUL, 0xaf144aafUL, 0xaae2ab6aUL, }, { 0xdd9aa228UL, 0xeb3ff936UL, 0x39c4323dUL, 0xcf64612fUL, }, { 0x3404b244UL, 0x7783f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0x57572458UL, 0xf0d5382aUL, 0x880d4909UL, 0xcc911696UL, }, { 0x40601f62UL, 0x893fe9caUL, 0xcd5792ddUL, 0xe62f327cUL, }, { 0xe5db2834UL, 0x697f6478UL, 0x29d28cf2UL, 0x4d7cd7ccUL, }, { 0xd2d9be98UL, 0xf5f3f531UL, 0x1ae41171UL, 0xcc809524UL, }, { 0x1a5b86a4UL, 0xfc0956caUL, 0x569146a7UL, 0xccc99127UL, }, { 0xd4533626UL, 0xe1336bc7UL, 0x3f47c90bUL, 0xab52f032UL, }, { 0x1eeb82UL, 0x14f5986bUL, 0xdacd5b1cUL, 0x65cece94UL, }, { 0x766bf512UL, 0x929959afUL, 0xee970b89UL, 0xe5da5595UL, }, { 0xc7c3e73aUL, 0x6fe27169UL, 0xd509ca74UL, 0x2b0e7fa2UL, }, { 0xabf6573aUL, 0x79a6a089UL, 0xd75338b4UL, 0x2abe34baUL, }, { 0x85980142UL, 0x11d35538UL, 0x48241324UL, 0x65df4d26UL, }, { 0x8acc5944UL, 0x77cb862eUL, 0xd159ce96UL, 0x4e983687UL, }, { 0x2af671a4UL, 0xef6fd21dUL, 0x70ef2af7UL, 0xcf74f70eUL, }, { 0x232d62fcUL, 0x1a9cbef8UL, 0xdcc72f2eUL, 0x1e8ccb9UL, }, { 0x99490f58UL, 0xf91a9d84UL, 0x3b16cdf9UL, 0xcec4b917UL, }, { 0x83174a4aUL, 0x7dc714cbUL, 0xd7da34b0UL, 0x2aaea79aUL, }, { 0x6b513bdcUL, 0x99a6cf20UL, 0x175f6247UL, 0x83f16f99UL, }, { 0x4aa0e48cUL, 0xce869b2UL, 0x21f3dc1aUL, 0x2442c32UL, }, { 0xe84671c0UL, 0x1b9e27ebUL, 0x6a2aa908UL, 0x3f562a9UL, }, { 0x6eaf756UL, 0xf73fcb3cUL, 0xaf144aafUL, 0xaae2ab6aUL, }, { 0xcddeebd4UL, 0xfcd6d526UL, 0xe11bcce3UL, 0xccc9c07aUL, }, { 0xdd1aa228UL, 0xeb3ff936UL, 0x39c4323dUL, 0xcf64612fUL, }, { 0xe8467196UL, 0xe461dfebUL, 0xc09556f7UL, 0xa95fc803UL, }, { 0x3504b244UL, 0x7783f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0xc15c7384UL, 0x7b20ee03UL, 0xf0ab5b2eUL, 0x4cdc1ab0UL, }, { 0x55572458UL, 0xf0d5382aUL, 0x880d4909UL, 0xcc911696UL, }, { 0xfe68cf6aUL, 0xfb48c8c7UL, 0x1da11d79UL, 0xaaba6896UL, }, { 0x44601f62UL, 0x893fe9caUL, 0xcd5792ddUL, 0xe62f327cUL, }, { 0x638d3beeUL, 0x938b5c70UL, 0xee209847UL, 0xe5db5416UL, }, { 0xeddb2834UL, 0x697f6478UL, 0x29d28cf2UL, 0x4d7cd7ccUL, }, { 0xa7e512ceUL, 0xb49fa26UL, 0x95e2e76eUL, 0x6437818bUL, }, { 0xc2d9be98UL, 0xf5f3f531UL, 0x1ae41171UL, 0xcc809524UL, }, { 0x22ddf34UL, 0x7868a299UL, 0x46184ba2UL, 0x4cd90207UL, }, { 0x3a5b86a4UL, 0xfc0956caUL, 0x569146a7UL, 0xccc99127UL, }, { 0x7e8e76cUL, 0x8f1d24e4UL, 0xefbe4a8bUL, 0x824171dcUL, }, { 0x94533626UL, 0xe1336bc7UL, 0x3f47c90bUL, 0xab52f032UL, }, { 0x2cdc3b5eUL, 0x88711e20UL, 0x1f6bf32bUL, 0xe62e22afUL, }, { 0x801eeb82UL, 0x14f5986bUL, 0xdacd5b1cUL, 0x65cece94UL, }, { 0x27b54520UL, 0x9aadb854UL, 0x23a92e49UL, 0x83f4672bUL, }, { 0x766bf512UL, 0x929959aeUL, 0xee970b89UL, 0xe5da5595UL, }, { 0xbeccf94cUL, 0x48711dUL, 0x92097172UL, 0x1040UL, }, { 0xc7c3e73aUL, 0x6fe2716bUL, 0xd509ca74UL, 0x2b0e7fa2UL, }, { 0xd0d7976cUL, 0x99d6b267UL, 0x7a7437cbUL, 0x81edd40aUL, }, { 0xabf6573aUL, 0x79a6a08dUL, 0xd75338b4UL, 0x2abe34baUL, }, { 0x1a5d4462UL, 0x84dd884dUL, 0xeccdf96dUL, 0xe46a1e8dUL, }, { 0x85980142UL, 0x11d35530UL, 0x48241324UL, 0x65df4d26UL, }, { 0x3a605920UL, 0x8ab1aeebUL, 0xeac70f69UL, 0x804c1cb1UL, }, { 0x8acc5944UL, 0x77cb863eUL, 0xd159ce96UL, 0x4e983687UL, }, { 0x7dbd55aaUL, 0xe0451437UL, 0x52499e01UL, 0xa94f4b32UL, }, { 0x2af671a4UL, 0xef6fd23dUL, 0x70ef2af7UL, 0xcf74f70eUL, }, { 0xf56f619eUL, 0x978a93f3UL, 0x831189d3UL, 0xe7d77da5UL, }, { 0x232d62fcUL, 0x1a9cbeb8UL, 0xdcc72f2eUL, 0x1e8ccb9UL, }, { 0xb0a16ef4UL, 0x7a5109eaUL, 0x2b68e52aUL, 0x4cdd0f36UL, }, { 0x99490f58UL, 0xf91a9d04UL, 0x3b16cdf9UL, 0xcec4b917UL, }, { 0x88d05912UL, 0x8830781eUL, 0x7bf23369UL, 0xe4329c3dUL, }, { 0x83174a4aUL, 0x7dc715cbUL, 0xd7da34b0UL, 0x2aaea79aUL, }, { 0xcff334e0UL, 0x8618bcbfUL, 0x59738741UL, 0x82082082UL, }, { 0x6b513bdcUL, 0x99a6cd20UL, 0x175f6247UL, 0x83f16f99UL, }, { 0xf4adcc3aUL, 0x6297e291UL, 0xd1181a84UL, 0x294b124eUL, }, { 0x4aa0e48cUL, 0xce86db2UL, 0x21f3dc1aUL, 0x2442c32UL, }, { 0x6550119eUL, 0x9b696b66UL, 0x14466493UL, 0xe78fff41UL, }, { 0xe84671c0UL, 0x1b9e2febUL, 0x6a2aa908UL, 0x3f562a9UL, }, { 0x63d55a14UL, 0xeb568d9eUL, 0x54a1436bUL, 0xcd78dbfdUL, }, { 0x6eaf756UL, 0xf73fdb3cUL, 0xaf144aafUL, 0xaae2ab6aUL, }, { 0xed722b64UL, 0xfacabbbeUL, 0x1ce38d0fUL, 0xccdd4e7bUL, }, { 0xcddeebd4UL, 0xfcd6f526UL, 0xe11bcce3UL, 0xccc9c07aUL, }, { 0xa43bbf3cUL, 0x1fb4754fUL, 0xb1bf89c6UL, 0x3e5e1ccUL, }, { 0xdd1aa228UL, 0xeb3fb936UL, 0x39c4323dUL, 0xcf64612fUL, }, { 0x172caea2UL, 0x926f68f4UL, 0x3461b455UL, 0xe5da0089UL, }, { 0xe8467196UL, 0xe4615febUL, 0xc09556f7UL, 0xa95fc803UL, }, { 0xcb9d1fd2UL, 0x981cf1dcUL, 0x7b3e87b1UL, 0xe78ae2a7UL, }, { 0x3504b244UL, 0x7782f733UL, 0x4350bfe6UL, 0x4e9826c7UL, }, { 0xc15f72c6UL, 0x6fd777b6UL, 0x2a675b0aUL, 0x2912d422UL, }, { 0xc15c7384UL, 0x7b22ee03UL, 0xf0ab5b2eUL, 0x4cdc1ab0UL, }, { 0x85956fd2UL, 0x96f8740fUL, 0x58d237f1UL, 0xe7d6682eUL, }, { 0x55572458UL, 0xf0d1382aUL, 0x880d4909UL, 0xcc911696UL, }, { 0x33474626UL, 0xe46143c9UL, 0x764a0b4bUL, 0xab4366b0UL, }, { 0xfe68cf6aUL, 0xfb40c8c7UL, 0x1da11d79UL, 0xaaba6896UL, }, { 0xf7de0d9eUL, 0x97849bb7UL, 0x8378aeb3UL, 0xe7d77d71UL, }, { 0x44601f62UL, 0x892fe9caUL, 0xcd5792ddUL, 0xe62f327cUL, }, { 0x382e380eUL, 0xd13f9bdUL, 0xfb5729d6UL, 0x64231d9eUL, }, { 0x638d3beeUL, 0x93ab5c70UL, 0xee209847UL, 0xe5db5416UL, }, { 0x9a557220UL, 0x959811bdUL, 0xa5fe1499UL, 0x81b51ab7UL, }, { 0xeddb2834UL, 0x693f6478UL, 0x29d28cf2UL, 0x4d7cd7ccUL, }, { 0x75a08406UL, 0x678a4ee9UL, 0x43072c12UL, 0x295ab4bbUL, }, { 0xa7e512ceUL, 0xbc9fa26UL, 0x95e2e76eUL, 0x6437818bUL, }, { 0x25989a26UL, 0xef9e1acdUL, 0x8eb165ebUL, 0xab0eead3UL, }, { 0xc2d9be98UL, 0xf4f3f531UL, 0x1ae41171UL, 0xcc809524UL, }, { 0x29b00000UL, 0x10185b9bUL, 0xdb230c00UL, 0x3ba7996UL, }, { 0x22ddf34UL, 0x7a68a299UL, 0x46184ba2UL, 0x4cd90207UL, }, { 0x38765990UL, 0x8261f453UL, 0x10890d05UL, 0x82109320UL, }, { 0x3a5b86a4UL, 0xf80956caUL, 0x569146a7UL, 0xccc99127UL, }, { 0x3db361faUL, 0x7f14722eUL, 0xb92f0c2cUL, 0x2a88e0fbUL, }, { 0x7e8e76cUL, 0x871d24e4UL, 0xefbe4a8bUL, 0x824171dcUL, }, { 0x7d17578aUL, 0x6fb067f4UL, 0xb8989fd8UL, 0x29b11e87UL, }, { 0x94533626UL, 0xf1336bc7UL, 0x3f47c90bUL, 0xab52f032UL, }, { 0x3891e6faUL, 0xdb7ed8cUL, 0xfae1613cUL, 0x38b21c09UL, }, { 0x2cdc3b5eUL, 0xa8711e20UL, 0x1f6bf32bUL, 0xe62e22afUL, }, { 0x2cdc3b6cUL, 0xa8711e20UL, 0x1f6bf32bUL, 0x862e22afUL, }, { 0x801eeb82UL, 0x54f5986bUL, 0xdacd5b1cUL, 0x65cece94UL, }, { 0xc270bdacUL, 0xb1ef36f7UL, 0x770aef73UL, 0x8e8cbdc6UL, }, { 0x27b54520UL, 0x1aadb854UL, 0x23a92e49UL, 0x83f4672bUL, }, { 0x0UL, 0x0UL, 0x0UL, 0x0UL, }, }; const mpfq_2_128_elt * ptr = t; unsigned int i,j; memset(r, 0, sizeof(mpfq_2_128_elt)); for(i = 0 ; i < 4 ; i++) { unsigned long a = s[i]; for(j = 0 ; j < 32 && ptr != &t[128]; j++, ptr++) { if (a & 1UL) { mpfq_2_128_add(K, r, r, *ptr); } a >>= 1; } } } /* *Mpfq::gf2n::linearops::code_for_trace */ static inline unsigned long mpfq_2_128_trace(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt s) { return ((s[3]>>31) ^ (s[3]>>25)) & 1; } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt_ur s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_elt, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set_elt(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt s) { memset(r, 0, sizeof(mpfq_2_128_elt_ur)); memcpy(r,s,sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r) { memset(r, 0, sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_set_ui */ static inline void mpfq_2_128_elt_ur_set_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_128_elt_ur) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_add */ static inline void mpfq_2_128_elt_ur_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt_ur s1, mpfq_2_128_src_elt_ur s2) { int i; for(i = 0 ; i < 8 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::mul::code_for_mul_ur */ static inline void mpfq_2_128_mul_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur t, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { gf2x_mul4(t, s1, s2); } /* *Mpfq::gf2n::squaring::code_for_sqr_ur */ static inline void mpfq_2_128_sqr_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur t, mpfq_2_128_src_elt s) { static const unsigned long g[16] = { 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85, }; { unsigned long u; u = g[s[0] & 15]; t[0] = u; u = g[s[0] >> 4 & 15]; t[0] ^= u << 8; u = g[s[0] >> 8 & 15]; t[0] ^= u << 16; u = g[s[0] >> 12 & 15]; t[0] ^= u << 24; u = g[s[0] >> 16 & 15]; t[1] = u; u = g[s[0] >> 20 & 15]; t[1] ^= u << 8; u = g[s[0] >> 24 & 15]; t[1] ^= u << 16; u = g[s[0] >> 28 & 15]; t[1] ^= u << 24; u = g[s[1] & 15]; t[2] = u; u = g[s[1] >> 4 & 15]; t[2] ^= u << 8; u = g[s[1] >> 8 & 15]; t[2] ^= u << 16; u = g[s[1] >> 12 & 15]; t[2] ^= u << 24; u = g[s[1] >> 16 & 15]; t[3] = u; u = g[s[1] >> 20 & 15]; t[3] ^= u << 8; u = g[s[1] >> 24 & 15]; t[3] ^= u << 16; u = g[s[1] >> 28 & 15]; t[3] ^= u << 24; u = g[s[2] & 15]; t[4] = u; u = g[s[2] >> 4 & 15]; t[4] ^= u << 8; u = g[s[2] >> 8 & 15]; t[4] ^= u << 16; u = g[s[2] >> 12 & 15]; t[4] ^= u << 24; u = g[s[2] >> 16 & 15]; t[5] = u; u = g[s[2] >> 20 & 15]; t[5] ^= u << 8; u = g[s[2] >> 24 & 15]; t[5] ^= u << 16; u = g[s[2] >> 28 & 15]; t[5] ^= u << 24; u = g[s[3] & 15]; t[6] = u; u = g[s[3] >> 4 & 15]; t[6] ^= u << 8; u = g[s[3] >> 8 & 15]; t[6] ^= u << 16; u = g[s[3] >> 12 & 15]; t[6] ^= u << 24; u = g[s[3] >> 16 & 15]; t[7] = u; u = g[s[3] >> 20 & 15]; t[7] ^= u << 8; u = g[s[3] >> 24 & 15]; t[7] ^= u << 16; u = g[s[3] >> 28 & 15]; t[7] ^= u << 24; } } /* *Mpfq::gf2n::reduction::code_for_reduce */ static inline void mpfq_2_128_reduce(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_dst_elt_ur t) { { unsigned long s[5]; /* 127 excess bits */ { unsigned long z; z = t[0]; s[0] = z; z = t[1]; s[1] = z; z = t[2]; s[2] = z; z = t[3]; s[3] = z; } memset(s + 4, 0, 1 * sizeof(unsigned long)); { unsigned long z; z = t[4]; s[0]^= z << 7; s[0]^= z << 2; s[0]^= z << 1; s[0]^= z; z >>= 25; z^= t[5] << 7; s[1]^= z; z >>= 5; z^= t[5] >> 25 << 27; s[1]^= z; z >>= 1; z^= t[5] >> 30 << 31; s[1]^= z; z >>= 1; z^= (t[5] & ~0x7fffffffUL); s[1]^= z; z >>= 25; z^= t[6] << 7; s[2]^= z; z >>= 5; z^= t[6] >> 25 << 27; s[2]^= z; z >>= 1; z^= t[6] >> 30 << 31; s[2]^= z; z >>= 1; z^= (t[6] & ~0x7fffffffUL); s[2]^= z; z >>= 25; z^= t[7] << 7; s[3]^= z; z >>= 5; z^= t[7] >> 25 << 27; s[3]^= z; z >>= 1; z^= t[7] >> 30 << 31; s[3]^= z; z >>= 1; s[3]^= z; z >>= 25; s[4]^= z; z >>= 5; s[4]^= z; } /* 6 excess bits */ { unsigned long z; z = s[0]; r[0] = z; z = s[1]; r[1] = z; z = s[2]; r[2] = z; z = s[3]; r[3] = z; } { unsigned long z; z = s[4]; r[0]^= z << 7; r[0]^= z << 2; r[0]^= z << 1; r[0]^= z; } } } /* *Mpfq::gf2n::trivialities::code_for_cmp */ static inline int mpfq_2_128_cmp(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt a, mpfq_2_128_src_elt b) { return memcmp(a, b, sizeof(mpfq_2_128_elt)); } /* *Mpfq::gf2n::trivialities::code_for_cmp_ui */ static inline int mpfq_2_128_cmp_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r, unsigned long x) { int i; if (r[0] < (x & 1UL)) return -1; if (r[0] > (x & 1UL)) return 1; for(i = 1 ; i < 4 ; i++) { if (r[i]) return 1; } return 0; } /* *Mpfq::defaults::flatdata::code_for_is_zero, Mpfq::gf2n::trivialities */ static inline int mpfq_2_128_is_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { unsigned int i; for(i = 0 ; i < sizeof(mpfq_2_128_elt)/sizeof(r[0]) ; i++) { if (r[i]) return 0; } return 1; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec r, mpfq_2_128_src_vec s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_setcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_elt x, unsigned int i) { mpfq_2_128_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff_ui, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_setcoeff_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, unsigned long x, unsigned int i) { mpfq_2_128_set_ui(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_getcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt x, mpfq_2_128_src_vec w, unsigned int i) { mpfq_2_128_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_add, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_neg, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_neg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_rev, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_rev(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_128_elt tmp[1]; mpfq_2_128_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_128_set(K, tmp[0], u[i]); mpfq_2_128_set(K, w[i], u[n-1-i]); mpfq_2_128_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_128_set(K, w[nn], u[nn]); mpfq_2_128_clear(K, tmp); } /* *Mpfq::defaults::vec::addsub::code_for_vec_sub, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_sub(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_scal_mul(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_mul(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv */ static inline void mpfq_2_128_vec_conv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n, mpfq_2_128_src_vec v, unsigned int m) { mpfq_2_128_vec_ur tmp; mpfq_2_128_vec_ur_init(K, &tmp, m+n-1); mpfq_2_128_vec_conv_ur(K, tmp, u, n, v, m); mpfq_2_128_vec_reduce(K, w, tmp, m+n-1); mpfq_2_128_vec_ur_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::vec::getset::code_for_vec_cmp, Mpfq::defaults::vec */ static inline int mpfq_2_128_vec_cmp(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) { int ret = mpfq_2_128_cmp(K, u[i], v[i]); if (ret != 0) return ret; } return 0; } /* *Mpfq::defaults::vec::getset::code_for_vec_is_zero, Mpfq::defaults::vec */ static inline int mpfq_2_128_vec_is_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec r, unsigned int n) { unsigned int i; for(i = 0 ; i < n ; i+=1) { if (!mpfq_2_128_is_zero(K,r[i])) return 0; } return 1; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_vec mpfq_2_128_vec_subvec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_vec mpfq_2_128_vec_subvec_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_elt mpfq_2_128_vec_coeff_ptr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_elt mpfq_2_128_vec_coeff_ptr_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_ur_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_set_vec, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_set_vec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_set_elt(K, w[i], u[i]); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_ur_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur r, mpfq_2_128_src_vec_ur s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_setcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_elt_ur x, unsigned int i) { mpfq_2_128_elt_ur_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_getcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur x, mpfq_2_128_src_vec_ur w, unsigned int i) { mpfq_2_128_elt_ur_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_add, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, mpfq_2_128_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_sub, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_sub(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, mpfq_2_128_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_neg, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_neg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_elt_ur_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_rev, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_rev(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_128_elt_ur tmp[1]; mpfq_2_128_elt_ur_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_128_elt_ur_set(K, tmp[0], u[i]); mpfq_2_128_elt_ur_set(K, w[i], u[n-1-i]); mpfq_2_128_elt_ur_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_128_elt_ur_set(K, w[nn], u[nn]); mpfq_2_128_elt_ur_clear(K, tmp); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul_ur, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_scal_mul_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, mpfq_2_128_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_mul_ur(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ /* Triggered by: vec_conv_ur */ static inline void mpfq_2_128_vec_conv_ur_n(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { if (n == 0) return; if (n == 1) { mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); return; } if (n == 2) { // Kara 2 mpfq_2_128_elt t1, t2; mpfq_2_128_init(K, &t1); mpfq_2_128_init(K, &t2); mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); mpfq_2_128_mul_ur(K, w[2], u[1], v[1]); mpfq_2_128_add(K, t1, u[0], u[1]); mpfq_2_128_add(K, t2, v[0], v[1]); mpfq_2_128_mul_ur(K, w[1], t1, t2); mpfq_2_128_elt_ur_sub(K, w[1], w[1], w[0]); mpfq_2_128_elt_ur_sub(K, w[1], w[1], w[2]); mpfq_2_128_clear(K, &t1); mpfq_2_128_clear(K, &t2); return; } if (n == 3) { // do it in 6 mpfq_2_128_elt t1, t2; mpfq_2_128_elt_ur s; mpfq_2_128_init(K, &t1); mpfq_2_128_init(K, &t2); mpfq_2_128_elt_ur_init(K, &s); // a0*b0*(1 - X) mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); mpfq_2_128_elt_ur_neg(K, w[1], w[0]); // a1*b1*(-X + 2*X^2 - X^3) mpfq_2_128_mul_ur(K, w[2], u[1], v[1]); mpfq_2_128_elt_ur_neg(K, w[3], w[2]); mpfq_2_128_elt_ur_add(K, w[2], w[2], w[2]); mpfq_2_128_elt_ur_add(K, w[1], w[1], w[3]); // a2*b2*(-X^3+X^4) mpfq_2_128_mul_ur(K, w[4], u[2], v[2]); mpfq_2_128_elt_ur_sub(K, w[3], w[3], w[4]); // (a0+a1)*(b0+b1)*(X - X^2) mpfq_2_128_add(K, t1, u[0], u[1]); mpfq_2_128_add(K, t2, v[0], v[1]); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[1], w[1], s); mpfq_2_128_elt_ur_sub(K, w[2], w[2], s); // (a1+a2)*(b1+b2)*(X^3 - X^2) mpfq_2_128_add(K, t1, u[1], u[2]); mpfq_2_128_add(K, t2, v[1], v[2]); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[3], w[3], s); mpfq_2_128_elt_ur_sub(K, w[2], w[2], s); // (a0+a1+a2)*(b0+b1+b2)* X^2 mpfq_2_128_add(K, t1, u[0], t1); mpfq_2_128_add(K, t2, v[0], t2); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[2], w[2], s); return; } unsigned int n0, n1; n0 = n / 2; n1 = n - n0; mpfq_2_128_vec_conv_ur_n(K, w, u, v, n0); mpfq_2_128_vec_conv_ur_n(K, w + 2*n0, u + n0, v + n0, n1); mpfq_2_128_elt_ur_set_ui(K, w[2*n0-1], 0); mpfq_2_128_vec tmpu, tmpv; mpfq_2_128_vec_ur tmpw; mpfq_2_128_vec_init(K, &tmpu, n1); mpfq_2_128_vec_init(K, &tmpv, n1); mpfq_2_128_vec_ur_init(K, &tmpw, 2*n1-1); mpfq_2_128_vec_set(K, tmpu, u, n0); if (n1 != n0) mpfq_2_128_set_ui(K, tmpu[n0], 0); mpfq_2_128_vec_add(K, tmpu, tmpu, u+n0, n1); mpfq_2_128_vec_set(K, tmpv, v, n0); if (n1 != n0) mpfq_2_128_set_ui(K, tmpv[n0], 0); mpfq_2_128_vec_add(K, tmpv, tmpv, v+n0, n1); mpfq_2_128_vec_conv_ur_n(K, tmpw, tmpu, tmpv, n1); mpfq_2_128_vec_ur_sub(K, tmpw, tmpw, w, 2*n0-1); mpfq_2_128_vec_ur_sub(K, tmpw, tmpw, w + 2*n0, 2*n1-1); mpfq_2_128_vec_ur_add(K, w + n0, w + n0, tmpw, 2*n1-1); mpfq_2_128_vec_clear(K, &tmpu, n1); mpfq_2_128_vec_clear(K, &tmpv, n1); mpfq_2_128_vec_ur_clear(K, &tmpw, 2*n1-1); return; } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ static inline void mpfq_2_128_vec_conv_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, unsigned int n, mpfq_2_128_src_vec v, unsigned int m) { unsigned int i, j MAYBE_UNUSED, k; mpfq_2_128_elt_ur acc, z; mpfq_2_128_elt_ur_init(K, &acc); mpfq_2_128_elt_ur_init(K, &z); // swap pointers to have n <= m mpfq_2_128_src_vec uu, vv; if (n <= m) { uu = u; vv = v; } else { uu = v; vv = u; unsigned int tmp = n; n = m; m = tmp; } for(k = 0; k < n; ++k) { mpfq_2_128_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i <= k; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } for(k = n; k < m; ++k) { mpfq_2_128_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i < n; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } for(k = m; k < n+m-1; ++k) { mpfq_2_128_mul_ur(K, acc, uu[k-m+1], vv[m-1]); for(i = k-m+2; i < n; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } mpfq_2_128_elt_ur_clear(K, &acc); mpfq_2_128_elt_ur_clear(K, &z); } /* *Mpfq::defaults::vec::mul::code_for_vec_reduce, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_reduce(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_dst_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_reduce(K, w[i], u[i]); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_vec_ur mpfq_2_128_vec_ur_subvec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_vec_ur mpfq_2_128_vec_ur_subvec_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_elt mpfq_2_128_vec_ur_coeff_ptr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_elt mpfq_2_128_vec_ur_coeff_ptr_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::poly::code_for_poly_init */ static inline void mpfq_2_128_poly_init(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_poly p, unsigned int n) { mpfq_2_128_vec_init(k, &(p->c), n); p->alloc=n; p->size=0; } /* *Mpfq::defaults::poly::code_for_poly_clear */ static inline void mpfq_2_128_poly_clear(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_poly p) { mpfq_2_128_vec_clear(k, &(p->c), p->alloc); } /* *Mpfq::defaults::poly::code_for_poly_set */ static inline void mpfq_2_128_poly_set(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u) { if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_128_vec_set(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_setcoeff */ static inline void mpfq_2_128_poly_setcoeff(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_elt x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_128_vec_set_zero(k, mpfq_2_128_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_128_vec_setcoeff(k, w->c, x, i); w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_setcoeff_ui */ static inline void mpfq_2_128_poly_setcoeff_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, unsigned long x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_128_vec_set_zero(k, mpfq_2_128_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, i); w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_getcoeff */ static inline void mpfq_2_128_poly_getcoeff(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_elt x, mpfq_2_128_src_poly w, unsigned int i) { if (w->size < (i+1)) { mpfq_2_128_set_ui(k,x,0); } else { mpfq_2_128_vec_getcoeff(k, x, w->c, i); } } /* *Mpfq::defaults::poly::code_for_poly_deg */ static inline int mpfq_2_128_poly_deg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_poly w) { if (w->size == 0) return -1; int deg = w->size-1; mpfq_2_128_elt temp; mpfq_2_128_init(K, &temp); mpfq_2_128_vec_getcoeff(K, temp, w->c, deg); int comp=mpfq_2_128_cmp_ui(K, temp, 0); while ((deg >= 0) && (comp == 0)){ deg--; if (deg>=0) { mpfq_2_128_vec_getcoeff(K, temp, w->c, deg); comp=mpfq_2_128_cmp_ui(K, temp, 0); } } mpfq_2_128_clear(K, &temp); return deg; } /* *Mpfq::defaults::poly::code_for_poly_add */ static inline void mpfq_2_128_poly_add(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_128_vec_add(k, w->c, u->c, v->c, su); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, su), mpfq_2_128_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_128_vec_add(k, w->c, u->c, v->c, sv); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, sv), mpfq_2_128_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_sub */ static inline void mpfq_2_128_poly_sub(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_128_vec_sub(k, w->c, u->c, v->c, su); mpfq_2_128_vec_neg(k, mpfq_2_128_vec_subvec(k, w->c, su), mpfq_2_128_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_128_vec_sub(k, w->c, u->c, v->c, sv); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, sv), mpfq_2_128_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_set_ui */ static inline void mpfq_2_128_poly_set_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, unsigned long x) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_add_ui */ static inline void mpfq_2_128_poly_add_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_128_poly_deg(k, w); return; } if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, 1), mpfq_2_128_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_128_add_ui(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), mpfq_2_128_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_sub_ui */ static inline void mpfq_2_128_poly_sub_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_elt temp; mpfq_2_128_init(k, &temp); mpfq_2_128_set_ui(k, temp, x); mpfq_2_128_neg(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), temp); w->size = mpfq_2_128_cmp_ui(k, temp, 0); mpfq_2_128_clear(k, &temp); return; } if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, 1), mpfq_2_128_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_128_sub_ui(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), mpfq_2_128_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_neg */ static inline void mpfq_2_128_poly_neg(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u) { if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_128_vec_neg(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_scal_mul */ static inline void mpfq_2_128_poly_scal_mul(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_elt x) { if (mpfq_2_128_cmp_ui(k, x, 0) == 0) { w->size = 0; return; } unsigned int n = u->size; if (w->alloc < n) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, n); w->alloc = n; } mpfq_2_128_vec_scal_mul(k, w->c, u->c, x, n); w->size=n; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_mul */ static inline void mpfq_2_128_poly_mul(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int usize = mpfq_2_128_poly_deg(k, u)+1; unsigned int vsize = mpfq_2_128_poly_deg(k, v)+1; if ((usize == 0) || (vsize == 0)) { w->size = 0; return; } unsigned int wsize = usize + vsize - 1; if (w->alloc < wsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, wsize); w->alloc = wsize; } mpfq_2_128_vec_conv(k, w->c, u->c, usize, v->c, vsize); w->size=wsize; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::polygcd::code_for_poly_gcd, Mpfq::defaults::poly */ static inline void mpfq_2_128_poly_gcd(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly g, mpfq_2_128_src_poly a0, mpfq_2_128_src_poly b0) { mpfq_2_128_poly a,b,q,r; int da0=mpfq_2_128_poly_deg(k,a0), db0=mpfq_2_128_poly_deg(k,b0); if (db0==-1) mpfq_2_128_poly_set(k,g,a0); else { mpfq_2_128_poly_init(k,a,da0+1); mpfq_2_128_poly_init(k,b,db0+1); mpfq_2_128_poly_init(k,q,1); mpfq_2_128_poly_init(k,r,db0); mpfq_2_128_poly_set(k,a,a0); mpfq_2_128_poly_set(k,b,b0); while (mpfq_2_128_poly_deg(k,b)>=0) { mpfq_2_128_poly_divmod(k,q,r,a,b); mpfq_2_128_poly_set(k,a,b); mpfq_2_128_poly_set(k,b,r); } mpfq_2_128_poly_setmonic(k,g,a); mpfq_2_128_poly_clear(k,a); mpfq_2_128_poly_clear(k,b); mpfq_2_128_poly_clear(k,q); mpfq_2_128_poly_clear(k,r); } } /* *Mpfq::defaults::polygcd::code_for_poly_xgcd, Mpfq::defaults::poly */ static inline void mpfq_2_128_poly_xgcd(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly g, mpfq_2_128_dst_poly u0, mpfq_2_128_dst_poly v0, mpfq_2_128_src_poly a0, mpfq_2_128_src_poly b0) { mpfq_2_128_poly a,b,u,v,w,x,q,r; mpfq_2_128_elt c; mpfq_2_128_init(k,&c); mpfq_2_128_set_ui(k,c,0); /* placate gcc */ int da0=mpfq_2_128_poly_deg(k,a0), db0=mpfq_2_128_poly_deg(k,b0), dega; if (db0==-1) { if (da0==-1) { mpfq_2_128_poly_set(k,u0,a0); mpfq_2_128_poly_set(k,v0,b0); mpfq_2_128_poly_set(k,g,a0); } else { mpfq_2_128_poly_getcoeff(k,c,a0,da0); mpfq_2_128_inv(k,c,c); mpfq_2_128_poly_scal_mul(k,g,a0,c); mpfq_2_128_poly_set(k,v0,b0); mpfq_2_128_poly_set(k,u0,b0); mpfq_2_128_poly_setcoeff(k,u0,c,0); } } else { mpfq_2_128_poly_init(k,a,da0+1); mpfq_2_128_poly_init(k,b,db0+1); mpfq_2_128_poly_init(k,q,1); mpfq_2_128_poly_init(k,r,db0); mpfq_2_128_poly_set(k,a,a0); mpfq_2_128_poly_set(k,b,b0); mpfq_2_128_poly_init(k,u,1); mpfq_2_128_poly_init(k,v,1); mpfq_2_128_poly_init(k,w,1); mpfq_2_128_poly_init(k,x,1); mpfq_2_128_poly_setcoeff_ui(k,u,1,0); mpfq_2_128_poly_setcoeff_ui(k,x,1,0); /* u*a_initial + v*b_initial = a */ /* w*a_initial + x*b_initial = b */ while (mpfq_2_128_poly_deg(k,b)>=0) { mpfq_2_128_poly_divmod(k,q,r,a,b); mpfq_2_128_poly_set(k,a,b); /* a,b <- b,a-qb=r */ mpfq_2_128_poly_set(k,b,r); mpfq_2_128_poly_mul(k,r,q,w); mpfq_2_128_poly_sub(k,r,u,r); mpfq_2_128_poly_set(k,u,w); /* u,w <- w,u-qw */ mpfq_2_128_poly_set(k,w,r); mpfq_2_128_poly_mul(k,r,q,x); /* v,x <- x,v-qx */ mpfq_2_128_poly_sub(k,r,v,r); mpfq_2_128_poly_set(k,v,x); mpfq_2_128_poly_set(k,x,r); } dega=mpfq_2_128_poly_deg(k,a); mpfq_2_128_poly_getcoeff(k,c,a,dega); mpfq_2_128_inv(k,c,c); mpfq_2_128_poly_scal_mul(k,g,a,c); mpfq_2_128_poly_scal_mul(k,u0,u,c); mpfq_2_128_poly_scal_mul(k,v0,v,c); mpfq_2_128_poly_clear(k,a); mpfq_2_128_poly_clear(k,b); mpfq_2_128_poly_clear(k,u); mpfq_2_128_poly_clear(k,v); mpfq_2_128_poly_clear(k,w); mpfq_2_128_poly_clear(k,x); mpfq_2_128_poly_clear(k,q); mpfq_2_128_poly_clear(k,r); } mpfq_2_128_clear(k,&c); } /* *Mpfq::defaults::poly::code_for_poly_cmp */ static inline int mpfq_2_128_poly_cmp(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { if (u->size != v->size) return (int)(u->size) - (int)(v->size); else return mpfq_2_128_vec_cmp(k, u->c, v->c, u->size); } #endif /* MPFQ_2_128_H_ */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/i386/mpfq_2_64.c0000644000327606072450000002410313125214702013234 00000000000000/* MPFQ generated file -- do not edit */ #include "mpfq_2_64.h" /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^64) */ /* Definition polynomial P = X^64 + X^4 + X^3 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 64, 4, 3, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=64, no_gmp=1, output_path=i386, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_64, w=32, } */ /* Functions operating on the field structure */ /* Element allocation functions */ /* Elementary assignment functions */ /* Assignment of random values */ /* Arithmetic operations on elements */ /* missing powz */ /* Operations involving unreduced elements */ /* Comparison functions */ /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ /* *Mpfq::defaults::vec::alloc::code_for_vec_init, Mpfq::defaults::vec */ void mpfq_2_64_vec_init(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n) { unsigned int i; *v = (mpfq_2_64_vec) malloc (n*sizeof(mpfq_2_64_elt)); for(i = 0; i < n; i++) mpfq_2_64_init(K, (*v) + i); } /* *Mpfq::defaults::vec::alloc::code_for_vec_reinit, Mpfq::defaults::vec */ void mpfq_2_64_vec_reinit(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n, unsigned int m) { if (n < m) { // increase size unsigned int i; *v = (mpfq_2_64_vec) realloc (*v, m * sizeof(mpfq_2_64_elt)); for(i = n; i < m; i+=1) mpfq_2_64_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_64_clear(K, (*v) + i); *v = (mpfq_2_64_vec) realloc (*v, m * sizeof(mpfq_2_64_elt)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_clear, Mpfq::defaults::vec */ void mpfq_2_64_vec_clear(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_clear(K, (*v) + i); free(*v); } /* missing vec_random */ /* missing vec_random2 */ /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_init, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_init(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n) { unsigned int i; *v = (mpfq_2_64_vec_ur) malloc (n*sizeof(mpfq_2_64_elt_ur)); for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_init(K, &( (*v)[i])); } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_reinit, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_reinit(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n, unsigned int m) { if (n < m) { // increase size *v = (mpfq_2_64_vec_ur) realloc (*v, m * sizeof(mpfq_2_64_elt_ur)); unsigned int i; for(i = n; i < m; i+=1) mpfq_2_64_elt_ur_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_64_elt_ur_clear(K, (*v) + i); *v = (mpfq_2_64_vec_ur) realloc (*v, m * sizeof(mpfq_2_64_elt_ur)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_clear, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_clear(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_clear(K, &( (*v)[i])); free(*v); } /* Polynomial functions */ /* *Mpfq::defaults::poly::code_for_poly_setmonic */ void mpfq_2_64_poly_setmonic(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p) { long degp = mpfq_2_64_poly_deg(K, p); if (degp == -1) { q->size = 0; return; } if (degp == 0) { mpfq_2_64_elt aux; mpfq_2_64_init(K, &aux); mpfq_2_64_set_ui(K, aux, 1); mpfq_2_64_poly_setcoeff(K, q, aux, 0); mpfq_2_64_clear(K, &aux); q->size = 1; return; } mpfq_2_64_elt lc; /* spurious uninit warning sometimes */ mpfq_2_64_init(K, &lc); mpfq_2_64_poly_getcoeff(K, lc, p, degp); mpfq_2_64_inv(K, lc, lc); mpfq_2_64_poly_setcoeff_ui(K, q, 1, degp); mpfq_2_64_vec_scal_mul(K, q->c, p->c, lc, degp); q->size = degp+1; mpfq_2_64_clear(K, &lc); } /* *Mpfq::defaults::poly::code_for_poly_divmod */ int mpfq_2_64_poly_divmod(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_dst_poly r, mpfq_2_64_src_poly a, mpfq_2_64_src_poly b) { if (b->size == 0) { return 0; } if (a->size == 0) { q->size = 0; r->size = 0; return 1; } int dega = mpfq_2_64_poly_deg(K, a); if (dega<0) { q->size = 0; r->size = 0; return 1; } // Compute deg b and inverse of leading coef int degb = mpfq_2_64_poly_deg(K, b); if (degb<0) { return 0; } if (degb > dega) { q->size=0; mpfq_2_64_poly_set(K, r, a); return 1; } int bmonic; mpfq_2_64_elt ilb; mpfq_2_64_init(K, &ilb); mpfq_2_64_elt temp; mpfq_2_64_init(K, &temp); mpfq_2_64_poly_getcoeff(K, temp, b, degb); if (mpfq_2_64_cmp_ui(K, temp, 1) == 0) { mpfq_2_64_set_ui(K, ilb, 1); bmonic = 1; } else { mpfq_2_64_inv(K, ilb, temp); bmonic = 0; } mpfq_2_64_poly qq, rr; mpfq_2_64_poly_init(K, qq, dega-degb+1); mpfq_2_64_poly_init(K, rr, dega); mpfq_2_64_poly_set(K, rr, a); mpfq_2_64_elt aux, aux2; mpfq_2_64_init(K, &aux); mpfq_2_64_init(K, &aux2); int i; int j; for (i = dega; i >= (int)degb; --i) { mpfq_2_64_poly_getcoeff(K, aux, rr, i); if (!bmonic) mpfq_2_64_mul(K, aux, aux, ilb); mpfq_2_64_poly_setcoeff(K, qq, aux, i-degb); for (j = i-1; j >= (int)(i - degb); --j) { mpfq_2_64_poly_getcoeff(K, temp, b, j-i+degb); mpfq_2_64_mul(K, aux2, aux, temp); mpfq_2_64_poly_getcoeff(K, temp, rr, j); mpfq_2_64_sub(K, temp, temp, aux2); mpfq_2_64_poly_setcoeff(K, rr, temp, j); } } rr->size = degb; int degr = mpfq_2_64_poly_deg(K, rr); rr->size = degr+1; if (q != NULL) mpfq_2_64_poly_set(K, q, qq); if (r != NULL) mpfq_2_64_poly_set(K, r, rr); mpfq_2_64_clear(K, &temp); mpfq_2_64_clear(K, &ilb); mpfq_2_64_clear(K, &aux); mpfq_2_64_clear(K, &aux2); mpfq_2_64_poly_clear(K, rr); mpfq_2_64_poly_clear(K, qq); return 1; } static void mpfq_2_64_poly_preinv(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned int); /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ /* Triggered by: poly_precomp_mod */ static void mpfq_2_64_poly_preinv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p, unsigned int n) { // Compute the inverse of p(x) modulo x^n // Newton iteration: x_{n+1} = x_n + x_n(1 - a*x_n) // Requires p(0) = 1 // Assume p != q (no alias) mpfq_2_64_elt temp; /* spurious uninit warning sometimes */ mpfq_2_64_init(K, &temp); mpfq_2_64_poly_getcoeff(K, temp, p, 0);//Should be in the assert assert( mpfq_2_64_cmp_ui(K, temp, 1) == 0); assert (p != q); int m; if (n <= 2) { mpfq_2_64_poly_setcoeff_ui(K, q, 1, 0); q->size = 1; m = 1; if (n == 1) return; } else { // n >= 3: recursive call at prec m = ceil(n/2) m = 1 + ((n-1)/2); mpfq_2_64_poly_preinv(K, q, p, m); } // enlarge q if necessary if (q->alloc < n) { mpfq_2_64_vec_reinit(K, &(q->c), q->alloc, n); q->alloc = n; } // refine value mpfq_2_64_vec tmp; mpfq_2_64_vec_init(K, &tmp, m+n-1); mpfq_2_64_vec_conv(K, tmp, p->c, MIN(n, p->size), q->c, m); int nn = MIN(n, MIN(n, p->size) + m -1); mpfq_2_64_vec_neg(K, tmp, tmp, nn); mpfq_2_64_vec_getcoeff(K, temp, tmp, 0); mpfq_2_64_add_ui(K, temp, temp, 1); mpfq_2_64_vec_setcoeff(K, tmp, temp, 0); mpfq_2_64_vec_conv(K, tmp, q->c, m, tmp, nn); mpfq_2_64_vec_set(K, mpfq_2_64_vec_subvec(K, q->c, m), mpfq_2_64_vec_subvec(K, tmp, m), n-m); q->size = n; mpfq_2_64_clear(K, &temp); mpfq_2_64_vec_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ void mpfq_2_64_poly_precomp_mod(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p) { assert(p != q); int N = mpfq_2_64_poly_deg(K, p); mpfq_2_64_poly rp; mpfq_2_64_poly_init(K, rp, N+1); mpfq_2_64_vec_rev(K, rp->c, p->c, N+1); rp->size = N+1; mpfq_2_64_poly_preinv(K, q, rp, N); mpfq_2_64_poly_clear(K, rp); } /* *Mpfq::defaults::poly::code_for_poly_mod_pre */ void mpfq_2_64_poly_mod_pre(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly r, mpfq_2_64_src_poly q, mpfq_2_64_src_poly p, mpfq_2_64_src_poly irp) { int N = mpfq_2_64_poly_deg(K, p); int degq = mpfq_2_64_poly_deg(K, q); if (degq < N) { mpfq_2_64_poly_set(K, r, q); return; } int m = degq - N; assert (degq <= 2*N-2); mpfq_2_64_poly revq; mpfq_2_64_poly_init(K, revq, MAX(degq+1, m+1)); mpfq_2_64_vec_rev(K, revq->c, q->c, degq+1); revq->size = q->size; mpfq_2_64_poly_mul(K, revq, revq, irp); mpfq_2_64_vec_rev(K, revq->c, revq->c, m+1); revq->size = m+1; mpfq_2_64_poly_mul(K, revq, revq, p); mpfq_2_64_poly_sub(K, r, q, revq); r->size = mpfq_2_64_poly_deg(K, r)+1; mpfq_2_64_poly_clear(K, revq); } /* missing poly_random */ /* missing poly_random2 */ /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/i386/mpfq_2_64.h0000644000327606072450000017264013125214702013253 00000000000000#ifndef MPFQ_2_64_H_ #define MPFQ_2_64_H_ /* MPFQ generated file -- do not edit */ #include "gf2x.h" #include "gf2x/gf2x-small.h" #include "mpfq.h" #include "mpfq_gf2n_common.h" #include #include #include #include #include #include #include #include #include "assert.h" #ifdef MPFQ_LAST_GENERATED_TAG #undef MPFQ_LAST_GENERATED_TAG #endif #define MPFQ_LAST_GENERATED_TAG 2_64 /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^64) */ /* Definition polynomial P = X^64 + X^4 + X^3 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 64, 4, 3, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=64, no_gmp=1, output_path=i386, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_64, w=32, } */ typedef mpfq_2_field mpfq_2_64_field; typedef mpfq_2_dst_field mpfq_2_64_dst_field; typedef unsigned long mpfq_2_64_elt[2]; typedef unsigned long * mpfq_2_64_dst_elt; typedef const unsigned long * mpfq_2_64_src_elt; typedef unsigned long mpfq_2_64_elt_ur[4]; typedef unsigned long * mpfq_2_64_dst_elt_ur; typedef const unsigned long * mpfq_2_64_src_elt_ur; typedef mpfq_2_64_elt * mpfq_2_64_vec; typedef mpfq_2_64_elt * mpfq_2_64_dst_vec; typedef mpfq_2_64_elt * mpfq_2_64_src_vec; typedef mpfq_2_64_elt_ur * mpfq_2_64_vec_ur; typedef mpfq_2_64_elt_ur * mpfq_2_64_dst_vec_ur; typedef mpfq_2_64_elt_ur * mpfq_2_64_src_vec_ur; typedef struct { mpfq_2_64_vec c; unsigned int alloc; unsigned int size; } mpfq_2_64_poly_struct; typedef mpfq_2_64_poly_struct mpfq_2_64_poly [1]; typedef mpfq_2_64_poly_struct * mpfq_2_64_dst_poly; typedef mpfq_2_64_poly_struct * mpfq_2_64_src_poly; #ifdef __cplusplus extern "C" { #endif /* *Mpfq::defaults::code_for_impl_name */ #define mpfq_2_64_impl_name() "2_64" /* *Mpfq::gf2n::field::code_for_impl_max_characteristic_bits */ #define mpfq_2_64_impl_max_characteristic_bits() 2 /* *Mpfq::gf2n::field::code_for_impl_max_degree */ #define mpfq_2_64_impl_max_degree() 1 /* Functions operating on the field structure */ /* *Mpfq::gf2n::field::code_for_field_characteristic_bits */ #define mpfq_2_64_field_characteristic_bits(f) 1 /* *Mpfq::gf2n::field::code_for_field_degree */ #define mpfq_2_64_field_degree(f) 64 static inline void mpfq_2_64_field_init(mpfq_2_64_dst_field); /* *Mpfq::gf2n::field::code_for_field_clear */ #define mpfq_2_64_field_clear(K) /**/ /* *Mpfq::gf2n::field::code_for_field_specify */ #define mpfq_2_64_field_specify(k, dummy, vp) /**/ static inline void mpfq_2_64_field_setopt(mpfq_2_64_dst_field, unsigned long, void *); /* Element allocation functions */ /* *Mpfq::defaults::flatdata::code_for_init, Mpfq::gf2n::trivialities */ #define mpfq_2_64_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_64_clear(f, px) /**/ /* Elementary assignment functions */ static inline void mpfq_2_64_set(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, unsigned long); static inline void mpfq_2_64_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_elt); static inline unsigned long mpfq_2_64_get_ui(mpfq_2_64_dst_field, mpfq_2_64_src_elt); static inline void mpfq_2_64_set_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, unsigned long); static inline void mpfq_2_64_set_uipoly_wide(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, const unsigned long *, unsigned int); static inline unsigned long mpfq_2_64_get_uipoly(mpfq_2_64_dst_field, mpfq_2_64_src_elt); static inline void mpfq_2_64_get_uipoly_wide(mpfq_2_64_dst_field, unsigned long *, mpfq_2_64_src_elt); /* Assignment of random values */ /* Arithmetic operations on elements */ static inline void mpfq_2_64_add(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, mpfq_2_64_src_elt); /* *Mpfq::gf2n::trivialities::code_for_sub */ #define mpfq_2_64_sub(K, r, s1, s2) mpfq_2_64_add(K,r,s1,s2) /* *Mpfq::gf2n::trivialities::code_for_neg */ #define mpfq_2_64_neg(K, r, s) mpfq_2_64_set(K,r,s) static inline void mpfq_2_64_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_sqr(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); /* *Mpfq::gf2n::trivialities::code_for_is_sqr */ #define mpfq_2_64_is_sqr(f, p) 1 static inline int mpfq_2_64_sqrt(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_pow(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long *, size_t); /* missing powz */ /* *Mpfq::gf2n::trivialities::code_for_frobenius */ #define mpfq_2_64_frobenius(K, r, s) mpfq_2_64_sqr(K,r,s) static inline void mpfq_2_64_add_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_ui */ #define mpfq_2_64_sub_ui(K, r, s1, s2) mpfq_2_64_add_ui(K,r,s1,s2) static inline void mpfq_2_64_mul_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); static inline void mpfq_2_64_add_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_uipoly */ #define mpfq_2_64_sub_uipoly(K, r, s1, s2) mpfq_2_64_add_uipoly(K,r,s1,s2) static inline void mpfq_2_64_mul_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); static inline void mpfq_2_64_longshift_left(unsigned long *, const unsigned long *, int, int); static inline void mpfq_2_64_longaddshift_left(unsigned long *, const unsigned long *, int, int); static inline int mpfq_2_64_inv(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_as_solve(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline unsigned long mpfq_2_64_trace(mpfq_2_64_dst_field, mpfq_2_64_src_elt); /* Operations involving unreduced elements */ /* *Mpfq::defaults::flatdata::code_for_elt_ur_init, Mpfq::gf2n::trivialities */ #define mpfq_2_64_elt_ur_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_elt_ur_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_64_elt_ur_clear(f, px) /**/ static inline void mpfq_2_64_elt_ur_set(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt_ur); static inline void mpfq_2_64_elt_ur_set_elt(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt); static inline void mpfq_2_64_elt_ur_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur); static inline void mpfq_2_64_elt_ur_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, unsigned long); static inline void mpfq_2_64_elt_ur_add(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt_ur, mpfq_2_64_src_elt_ur); /* *Mpfq::gf2n::trivialities::code_for_elt_ur_neg */ #define mpfq_2_64_elt_ur_neg(K, r, s) mpfq_2_64_elt_ur_set(K,r,s) /* *Mpfq::gf2n::trivialities::code_for_elt_ur_sub */ #define mpfq_2_64_elt_ur_sub(K, r, s1, s2) mpfq_2_64_elt_ur_add(K,r,s1,s2) static inline void mpfq_2_64_mul_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_sqr_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt); static inline void mpfq_2_64_reduce(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_dst_elt_ur); /* Comparison functions */ static inline int mpfq_2_64_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline int mpfq_2_64_cmp_ui(mpfq_2_64_dst_field, mpfq_2_64_src_elt, unsigned long); static inline int mpfq_2_64_is_zero(mpfq_2_64_dst_field, mpfq_2_64_src_elt); /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ void mpfq_2_64_vec_init(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int); void mpfq_2_64_vec_reinit(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int, unsigned int); void mpfq_2_64_vec_clear(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int); static inline void mpfq_2_64_vec_set(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, unsigned int); static inline void mpfq_2_64_vec_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_setcoeff_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, unsigned long, unsigned int); static inline void mpfq_2_64_vec_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_add(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_rev(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_scal_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_conv(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int, mpfq_2_64_src_vec, unsigned int); /* missing vec_random */ /* missing vec_random2 */ static inline int mpfq_2_64_vec_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline int mpfq_2_64_vec_is_zero(mpfq_2_64_dst_field, mpfq_2_64_src_vec, unsigned int); static inline mpfq_2_64_dst_vec mpfq_2_64_vec_subvec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, int); static inline mpfq_2_64_src_vec mpfq_2_64_vec_subvec_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec, int); static inline mpfq_2_64_dst_elt mpfq_2_64_vec_coeff_ptr(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, int); static inline mpfq_2_64_src_elt mpfq_2_64_vec_coeff_ptr_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec, int); /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ void mpfq_2_64_vec_ur_init(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int); static inline void mpfq_2_64_vec_ur_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_set_vec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, unsigned int); void mpfq_2_64_vec_ur_reinit(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int, unsigned int); void mpfq_2_64_vec_ur_clear(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int); static inline void mpfq_2_64_vec_ur_set(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_elt_ur, unsigned int); static inline void mpfq_2_64_vec_ur_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_add(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_rev(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_scal_mul_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_conv_ur_n(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_conv_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, unsigned int, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_reduce(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_dst_vec_ur, unsigned int); static inline mpfq_2_64_dst_vec_ur mpfq_2_64_vec_ur_subvec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, int); static inline mpfq_2_64_src_vec_ur mpfq_2_64_vec_ur_subvec_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec_ur, int); static inline mpfq_2_64_dst_elt mpfq_2_64_vec_ur_coeff_ptr(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, int); static inline mpfq_2_64_src_elt mpfq_2_64_vec_ur_coeff_ptr_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec_ur, int); /* *Mpfq::defaults::flatdata::code_for_vec_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_64_vec_elt_stride(K, n) ((n)*sizeof(mpfq_2_64_elt)) /* *Mpfq::defaults::flatdata::code_for_vec_ur_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_64_vec_ur_elt_stride(K, n) ((n)*sizeof(mpfq_2_64_elt_ur)) /* Polynomial functions */ static inline void mpfq_2_64_poly_init(mpfq_2_64_dst_field, mpfq_2_64_poly, unsigned int); static inline void mpfq_2_64_poly_clear(mpfq_2_64_dst_field, mpfq_2_64_poly); static inline void mpfq_2_64_poly_set(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_setmonic(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_poly_setcoeff_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, unsigned long, unsigned int); static inline void mpfq_2_64_poly_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_poly, unsigned int); static inline int mpfq_2_64_poly_deg(mpfq_2_64_dst_field, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_add(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, unsigned long); static inline void mpfq_2_64_poly_add_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned long); static inline void mpfq_2_64_poly_sub_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned long); static inline void mpfq_2_64_poly_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_scal_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_elt); static inline void mpfq_2_64_poly_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); int mpfq_2_64_poly_divmod(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_precomp_mod(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_mod_pre(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_gcd(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_xgcd(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); /* missing poly_random */ /* missing poly_random2 */ static inline int mpfq_2_64_poly_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_poly, mpfq_2_64_src_poly); /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ #ifdef __cplusplus } #endif /* Implementations for inlines */ /* *Mpfq::gf2n::field::code_for_field_init */ static inline void mpfq_2_64_field_init(mpfq_2_64_dst_field f) { f->io_type=16; } /* *Mpfq::gf2n::field::code_for_field_setopt */ static inline void mpfq_2_64_field_setopt(mpfq_2_64_dst_field f, unsigned long x MAYBE_UNUSED, void * y) { assert(x == MPFQ_IO_TYPE); f->io_type=((unsigned long*)y)[0]; } /* *Mpfq::defaults::flatdata::code_for_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt)); } /* *Mpfq::gf2n::trivialities::code_for_set_ui */ static inline void mpfq_2_64_set_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_64_elt) - sizeof(unsigned long)); } /* *Mpfq::defaults::flatdata::code_for_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r) { mpfq_2_64_vec_set_zero(K,(mpfq_2_64_dst_vec)r,1); } /* *Mpfq::gf2n::trivialities::code_for_get_ui */ static inline unsigned long mpfq_2_64_get_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { return r[0] & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly */ static inline void mpfq_2_64_set_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, unsigned long x) { r[0] = x; memset(r + 1, 0, sizeof(mpfq_2_64_elt) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly_wide */ static inline void mpfq_2_64_set_uipoly_wide(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, const unsigned long * x, unsigned int n) { unsigned int i; for (i = 0 ; i < n && i < 2 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly */ static inline unsigned long mpfq_2_64_get_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { return r[0]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly_wide */ static inline void mpfq_2_64_get_uipoly_wide(mpfq_2_64_dst_field K MAYBE_UNUSED, unsigned long * r, mpfq_2_64_src_elt x) { unsigned int i; for(i = 0 ; i < 2 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_add */ static inline void mpfq_2_64_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { int i; for(i = 0 ; i < 2 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::trivialities::code_for_mul */ static inline void mpfq_2_64_mul(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { mpfq_2_64_elt_ur t; mpfq_2_64_mul_ur(K, t, s1, s2); mpfq_2_64_reduce(K, r, t); } /* *Mpfq::gf2n::trivialities::code_for_sqr */ static inline void mpfq_2_64_sqr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { mpfq_2_64_elt_ur t; mpfq_2_64_sqr_ur(K, t, s); mpfq_2_64_reduce(K, r, t); } /* *Mpfq::gf2n::linearops::code_for_sqrt */ static inline int mpfq_2_64_sqrt(mpfq_2_64_dst_field K, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { static const unsigned long shuffle_table[256] = { 0, 1, 16, 17, 2, 3, 18, 19, 32, 33, 48, 49, 34, 35, 50, 51, 4, 5, 20, 21, 6, 7, 22, 23, 36, 37, 52, 53, 38, 39, 54, 55, 64, 65, 80, 81, 66, 67, 82, 83, 96, 97, 112, 113, 98, 99, 114, 115, 68, 69, 84, 85, 70, 71, 86, 87, 100, 101, 116, 117, 102, 103, 118, 119, 8, 9, 24, 25, 10, 11, 26, 27, 40, 41, 56, 57, 42, 43, 58, 59, 12, 13, 28, 29, 14, 15, 30, 31, 44, 45, 60, 61, 46, 47, 62, 63, 72, 73, 88, 89, 74, 75, 90, 91, 104, 105, 120, 121, 106, 107, 122, 123, 76, 77, 92, 93, 78, 79, 94, 95, 108, 109, 124, 125, 110, 111, 126, 127, 128, 129, 144, 145, 130, 131, 146, 147, 160, 161, 176, 177, 162, 163, 178, 179, 132, 133, 148, 149, 134, 135, 150, 151, 164, 165, 180, 181, 166, 167, 182, 183, 192, 193, 208, 209, 194, 195, 210, 211, 224, 225, 240, 241, 226, 227, 242, 243, 196, 197, 212, 213, 198, 199, 214, 215, 228, 229, 244, 245, 230, 231, 246, 247, 136, 137, 152, 153, 138, 139, 154, 155, 168, 169, 184, 185, 170, 171, 186, 187, 140, 141, 156, 157, 142, 143, 158, 159, 172, 173, 188, 189, 174, 175, 190, 191, 200, 201, 216, 217, 202, 203, 218, 219, 232, 233, 248, 249, 234, 235, 250, 251, 204, 205, 220, 221, 206, 207, 222, 223, 236, 237, 252, 253, 238, 239, 254, 255, }; mpfq_2_64_elt sqrt_t ={ 0xaUL, 0xffffffffUL, } ; mpfq_2_64_elt odd, even; mpfq_2_64_elt_ur odd_t; unsigned long t; #define EVEN_MASK (((unsigned long)-1)/3UL) #define ODD_MASK ((EVEN_MASK)<<1) unsigned int i; for(i = 0 ; i < 2 ; i++) { even[i] = s[i] & EVEN_MASK; } for(i = 0 ; i < 1 ; i++) { t = even[2*i]; t |= t >> 7; even[i] = shuffle_table[t & 255]; t >>= 16; even[i] |= shuffle_table[t & 255] << 8; t = even[2*i+1]; t |= t >> 7; even[i] |= shuffle_table[t & 255] << 16; t >>= 16; even[i] |= shuffle_table[t & 255] << 24; } memset(even + 1, 0, 1 * sizeof(unsigned long)); for(i = 0 ; i < 2 ; i++) { odd[i] = (s[i] & ODD_MASK) >> 1; } for(i = 0 ; i < 1 ; i++) { t = odd[2*i]; t |= t >> 7; odd[i] = shuffle_table[t & 255]; t >>= 16; odd[i] |= shuffle_table[t & 255] << 8; t = odd[2*i+1]; t |= t >> 7; odd[i] |= shuffle_table[t & 255] << 16; t >>= 16; odd[i] |= shuffle_table[t & 255] << 24; } memset(odd + 1, 0, 1 * sizeof(unsigned long)); mpfq_2_64_mul_ur(K, odd_t, odd, sqrt_t); for(i = 0 ; i < (2+1)/2 ; i++) { odd_t[i] ^= even[i]; } mpfq_2_64_reduce(K, r, odd_t); return 1; } /* *Mpfq::defaults::pow::code_for_pow, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_pow(mpfq_2_64_dst_field k, mpfq_2_64_dst_elt res, mpfq_2_64_src_elt r, unsigned long * x, size_t n) { mpfq_2_64_elt u, a; long i, j, lead; /* it is a signed type */ unsigned long mask; /* get the correct (i,j) position of the most significant bit in x */ for(i = ((long)n)-1; i>=0 && x[i]==0; i--) ; if (i < 0) { /* power zero gets 1 */ mpfq_2_64_set_ui(k, res, 1); return; } j = 32 - 1; mask = (1UL<>=1) ; lead = i*32+j; /* Ensured. */ mpfq_2_64_init(k, &u); mpfq_2_64_init(k, &a); mpfq_2_64_set(k, a, r); for( ; lead > 0; lead--) { if (j-- == 0) { i--; j = 32-1; mask = (1UL<>= 1; } if (x[i]&mask) { mpfq_2_64_sqr(k, u, a); mpfq_2_64_mul(k, a, u, r); } else { mpfq_2_64_sqr(k, a,a); } } mpfq_2_64_set(k, res, a); mpfq_2_64_clear(k, &u); mpfq_2_64_clear(k, &a); } /* *Mpfq::gf2n::trivialities::code_for_add_ui */ static inline void mpfq_2_64_add_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_set(K, r, s); r[0] ^= x & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_mul_ui */ static inline void mpfq_2_64_mul_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { if (x & 1UL) { mpfq_2_64_set(K, r, s); } else { memset(r, 0, sizeof(mpfq_2_64_elt)); } } /* *Mpfq::gf2n::trivialities::code_for_add_uipoly */ static inline void mpfq_2_64_add_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_set(K, r, s); r[0] ^= x; } /* *Mpfq::gf2n::trivialities::code_for_mul_uipoly */ static inline void mpfq_2_64_mul_uipoly(mpfq_2_64_dst_field k, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_elt xx; mpfq_2_64_init(k, &xx); mpfq_2_64_set_uipoly(k, xx, x); mpfq_2_64_mul(k, r, s, xx); mpfq_2_64_clear(k, &xx); } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_64_longshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 32; int i; s %= 32; if (s > 0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i] << s ^ src[i-1] >> (32-s); } dst[m] = src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i]; } dst[m] = src[0]; } for(i = m-1 ; i>= 0 ; i--) { dst[i] = 0UL; } } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_64_longaddshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 32; int i; s %= 32; if (s>0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i] << s ^ src[i-1] >> (32-s); } dst[m] ^= src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i]; } dst[m] ^= src[0]; } } /* *Mpfq::gf2n::inversion::code_for_inv */ static inline int mpfq_2_64_inv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { unsigned long a[3] = { 0x80000000UL, 0xdUL, 0x80000000UL, }; unsigned long b[3]; unsigned long u[3] = { 0, }; unsigned long v[3] = { 1, 0, }; unsigned long x; int ia, ib; int i,d; if (mpfq_2_64_cmp_ui(K, s, 0UL) == 0) return 0; { unsigned long z; z = s[0] << 31; b[0] = z; z = s[0] >> 1 ^ s[1] << 31; b[1] = z; z = s[1] >> 1; b[2] = z; } ib = mpfq_clzlx(b, 3); ia = 0; mpfq_2_64_longshift_left(b,b,3,ib); for(d = ib - ia ; ; ) { if (d == 0) { for(i = 0 ; i < 3 ; i++) v[i] ^= u[i]; b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; if (!x) { memcpy(r,u,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,3); ib += t; d += t; mpfq_2_64_longshift_left(b,b,3,t); } for(;d > 0;) { mpfq_2_64_longaddshift_left(u,v,3,d); a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; if (!x) { memcpy(r,v,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,3); ia += t; d -= t; mpfq_2_64_longshift_left(a,a,3,t); } if (d == 0) { for(i = 0 ; i < 3 ; i++) u[i] ^= v[i]; a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; if (!x) { memcpy(r,v,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,3); ia += t; d -= t; mpfq_2_64_longshift_left(a,a,3,t); } for(;d < 0;) { mpfq_2_64_longaddshift_left(v,u,3,-d); b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; if (!x) { memcpy(r,u,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,3); ib += t; d += t; mpfq_2_64_longshift_left(b,b,3,t); } } } /* *Mpfq::gf2n::linearops::code_for_as_solve */ static inline void mpfq_2_64_as_solve(mpfq_2_64_dst_field K, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { static const mpfq_2_64_elt t[64] = { { 0x278adc02UL, 0x19c9369fUL, }, { 0xb2383ee4UL, 0x84b2b22aUL, }, { 0xb2383ee6UL, 0x84b2b22aUL, }, { 0x95b3e3f6UL, 0x9d7b84b4UL, }, { 0xb2383ee2UL, 0x84b2b22aUL, }, { 0x9213f790UL, 0x37c470b4UL, }, { 0x95b3e3feUL, 0x9d7b84b4UL, }, { 0x105137cUL, 0x1000aUL, }, { 0xb2383ef2UL, 0x84b2b22aUL, }, { 0x8edce1fcUL, 0x368e964aUL, }, { 0x9213f7b0UL, 0x37c470b4UL, }, { 0x278fdf4cUL, 0x19c9368eUL, }, { 0x95b3e3beUL, 0x9d7b84b4UL, }, { 0xbc7d4570UL, 0x2e4da23cUL, }, { 0x10513fcUL, 0x1000aUL, }, { 0xbac24232UL, 0x84f35772UL, }, { 0xb2383ff2UL, 0x84b2b22aUL, }, { 0x9314e4fcUL, 0x37c570baUL, }, { 0x8edce3fcUL, 0x368e964aUL, }, { 0x213cdb0eUL, 0xb377c390UL, }, { 0x9213f3b0UL, 0x37c470b4UL, }, { 0xa99c24f2UL, 0x85ed5a3aUL, }, { 0x278fd74cUL, 0x19c9368eUL, }, { 0x780000eUL, 0xaabff000UL, }, { 0x95b3f3beUL, 0x9d7b84b4UL, }, { 0xb03038f2UL, 0x84b6b3daUL, }, { 0xbc7d6570UL, 0x2e4da23cUL, }, { 0x3494ffcUL, 0x511eaUL, }, { 0x10553fcUL, 0x1000aUL, }, { 0x343c6c0eUL, 0xae0c0220UL, }, { 0xbac2c232UL, 0x84f35772UL, }, { 0x8000000eUL, 0x80000000UL, }, { 0xb2393ff2UL, 0x84b2b22aUL, }, { 0x202bc97eUL, 0xb376c29cUL, }, { 0x9316e4fcUL, 0x37c570baUL, }, { 0x8879e6ceUL, 0x9c306248UL, }, { 0x8ed8e3fcUL, 0x368e964aUL, }, { 0x8e47e70UL, 0x41e42cUL, }, { 0x2134db0eUL, 0xb377c390UL, }, { 0xa60f56ceUL, 0x85b9b108UL, }, { 0x9203f3b0UL, 0x37c470b4UL, }, { 0x21f3cb4cUL, 0x19dd3b6eUL, }, { 0xa9bc24f2UL, 0x85ed5a3aUL, }, { 0x2c428ac0UL, 0x198ddf68UL, }, { 0x27cfd74cUL, 0x19c9368eUL, }, { 0x31ca84b0UL, 0x4b7c684UL, }, { 0x700000eUL, 0xaabff000UL, }, { 0x89ffefbeUL, 0x80406554UL, }, { 0x94b3f3beUL, 0x9d7b84b4UL, }, { 0x32bfa74cUL, 0x18c1354eUL, }, { 0xb23038f2UL, 0x84b6b3daUL, }, { 0xf74627eUL, 0xaaf613ccUL, }, { 0xb87d6570UL, 0x2e4da23cUL, }, { 0xb3342a8cUL, 0x3248b3d6UL, }, { 0xb494ffcUL, 0x511eaUL, }, { 0xe70700eUL, 0xb60813c0UL, }, { 0x110553fcUL, 0x1000aUL, }, { 0x5393ffcUL, 0x1e0d022aUL, }, { 0x143c6c0eUL, 0xae0c0220UL, }, { 0x143c6c00UL, 0xe0c0220UL, }, { 0xfac2c232UL, 0x84f35772UL, }, { 0x48fbfdceUL, 0xc041e559UL, }, { 0xeUL, 0x80000000UL, }, { 0x0UL, 0x0UL, }, }; const mpfq_2_64_elt * ptr = t; unsigned int i,j; memset(r, 0, sizeof(mpfq_2_64_elt)); for(i = 0 ; i < 2 ; i++) { unsigned long a = s[i]; for(j = 0 ; j < 32 && ptr != &t[64]; j++, ptr++) { if (a & 1UL) { mpfq_2_64_add(K, r, r, *ptr); } a >>= 1; } } } /* *Mpfq::gf2n::linearops::code_for_trace */ static inline unsigned long mpfq_2_64_trace(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt s) { return ((s[1]>>31) ^ (s[1]>>29)) & 1; } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt_ur s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_elt, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set_elt(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt s) { memset(r, 0, sizeof(mpfq_2_64_elt_ur)); memcpy(r,s,sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r) { memset(r, 0, sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_set_ui */ static inline void mpfq_2_64_elt_ur_set_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_64_elt_ur) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_add */ static inline void mpfq_2_64_elt_ur_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt_ur s1, mpfq_2_64_src_elt_ur s2) { int i; for(i = 0 ; i < 4 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::mul::code_for_mul_ur */ static inline void mpfq_2_64_mul_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur t, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { gf2x_mul2(t, s1, s2); } /* *Mpfq::gf2n::squaring::code_for_sqr_ur */ static inline void mpfq_2_64_sqr_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur t, mpfq_2_64_src_elt s) { static const unsigned long g[16] = { 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85, }; { unsigned long u; u = g[s[0] & 15]; t[0] = u; u = g[s[0] >> 4 & 15]; t[0] ^= u << 8; u = g[s[0] >> 8 & 15]; t[0] ^= u << 16; u = g[s[0] >> 12 & 15]; t[0] ^= u << 24; u = g[s[0] >> 16 & 15]; t[1] = u; u = g[s[0] >> 20 & 15]; t[1] ^= u << 8; u = g[s[0] >> 24 & 15]; t[1] ^= u << 16; u = g[s[0] >> 28 & 15]; t[1] ^= u << 24; u = g[s[1] & 15]; t[2] = u; u = g[s[1] >> 4 & 15]; t[2] ^= u << 8; u = g[s[1] >> 8 & 15]; t[2] ^= u << 16; u = g[s[1] >> 12 & 15]; t[2] ^= u << 24; u = g[s[1] >> 16 & 15]; t[3] = u; u = g[s[1] >> 20 & 15]; t[3] ^= u << 8; u = g[s[1] >> 24 & 15]; t[3] ^= u << 16; u = g[s[1] >> 28 & 15]; t[3] ^= u << 24; } } /* *Mpfq::gf2n::reduction::code_for_reduce */ static inline void mpfq_2_64_reduce(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_dst_elt_ur t) { { unsigned long s[3]; /* 63 excess bits */ { unsigned long z; z = t[0]; s[0] = z; z = t[1]; s[1] = z; } memset(s + 2, 0, 1 * sizeof(unsigned long)); { unsigned long z; z = t[2]; s[0]^= z << 4; s[0]^= z << 3; s[0]^= z << 1; s[0]^= z; z >>= 28; z^= t[3] << 4; s[1]^= z; z >>= 1; z^= t[3] >> 28 << 31; s[1]^= z; z >>= 2; z^= t[3] >> 29 << 30; s[1]^= z; z >>= 1; s[1]^= z; z >>= 28; s[2]^= z; z >>= 1; s[2]^= z; } /* 3 excess bits */ { unsigned long z; z = s[0]; r[0] = z; z = s[1]; r[1] = z; } { unsigned long z; z = s[2]; r[0]^= z << 4; r[0]^= z << 3; r[0]^= z << 1; r[0]^= z; } } } /* *Mpfq::gf2n::trivialities::code_for_cmp */ static inline int mpfq_2_64_cmp(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt a, mpfq_2_64_src_elt b) { return memcmp(a, b, sizeof(mpfq_2_64_elt)); } /* *Mpfq::gf2n::trivialities::code_for_cmp_ui */ static inline int mpfq_2_64_cmp_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r, unsigned long x) { int i; if (r[0] < (x & 1UL)) return -1; if (r[0] > (x & 1UL)) return 1; for(i = 1 ; i < 2 ; i++) { if (r[i]) return 1; } return 0; } /* *Mpfq::defaults::flatdata::code_for_is_zero, Mpfq::gf2n::trivialities */ static inline int mpfq_2_64_is_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { unsigned int i; for(i = 0 ; i < sizeof(mpfq_2_64_elt)/sizeof(r[0]) ; i++) { if (r[i]) return 0; } return 1; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec r, mpfq_2_64_src_vec s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_setcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_elt x, unsigned int i) { mpfq_2_64_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff_ui, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_setcoeff_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, unsigned long x, unsigned int i) { mpfq_2_64_set_ui(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_getcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt x, mpfq_2_64_src_vec w, unsigned int i) { mpfq_2_64_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_add, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_neg, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_neg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_rev, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_rev(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_64_elt tmp[1]; mpfq_2_64_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_64_set(K, tmp[0], u[i]); mpfq_2_64_set(K, w[i], u[n-1-i]); mpfq_2_64_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_64_set(K, w[nn], u[nn]); mpfq_2_64_clear(K, tmp); } /* *Mpfq::defaults::vec::addsub::code_for_vec_sub, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_sub(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_scal_mul(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_mul(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv */ static inline void mpfq_2_64_vec_conv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n, mpfq_2_64_src_vec v, unsigned int m) { mpfq_2_64_vec_ur tmp; mpfq_2_64_vec_ur_init(K, &tmp, m+n-1); mpfq_2_64_vec_conv_ur(K, tmp, u, n, v, m); mpfq_2_64_vec_reduce(K, w, tmp, m+n-1); mpfq_2_64_vec_ur_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::vec::getset::code_for_vec_cmp, Mpfq::defaults::vec */ static inline int mpfq_2_64_vec_cmp(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) { int ret = mpfq_2_64_cmp(K, u[i], v[i]); if (ret != 0) return ret; } return 0; } /* *Mpfq::defaults::vec::getset::code_for_vec_is_zero, Mpfq::defaults::vec */ static inline int mpfq_2_64_vec_is_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec r, unsigned int n) { unsigned int i; for(i = 0 ; i < n ; i+=1) { if (!mpfq_2_64_is_zero(K,r[i])) return 0; } return 1; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_vec mpfq_2_64_vec_subvec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_vec mpfq_2_64_vec_subvec_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_elt mpfq_2_64_vec_coeff_ptr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_elt mpfq_2_64_vec_coeff_ptr_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_ur_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_set_vec, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_set_vec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_set_elt(K, w[i], u[i]); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_ur_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur r, mpfq_2_64_src_vec_ur s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_setcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_elt_ur x, unsigned int i) { mpfq_2_64_elt_ur_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_getcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur x, mpfq_2_64_src_vec_ur w, unsigned int i) { mpfq_2_64_elt_ur_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_add, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, mpfq_2_64_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_sub, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_sub(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, mpfq_2_64_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_neg, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_neg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_elt_ur_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_rev, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_rev(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_64_elt_ur tmp[1]; mpfq_2_64_elt_ur_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_64_elt_ur_set(K, tmp[0], u[i]); mpfq_2_64_elt_ur_set(K, w[i], u[n-1-i]); mpfq_2_64_elt_ur_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_64_elt_ur_set(K, w[nn], u[nn]); mpfq_2_64_elt_ur_clear(K, tmp); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul_ur, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_scal_mul_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, mpfq_2_64_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_mul_ur(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ /* Triggered by: vec_conv_ur */ static inline void mpfq_2_64_vec_conv_ur_n(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { if (n == 0) return; if (n == 1) { mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); return; } if (n == 2) { // Kara 2 mpfq_2_64_elt t1, t2; mpfq_2_64_init(K, &t1); mpfq_2_64_init(K, &t2); mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); mpfq_2_64_mul_ur(K, w[2], u[1], v[1]); mpfq_2_64_add(K, t1, u[0], u[1]); mpfq_2_64_add(K, t2, v[0], v[1]); mpfq_2_64_mul_ur(K, w[1], t1, t2); mpfq_2_64_elt_ur_sub(K, w[1], w[1], w[0]); mpfq_2_64_elt_ur_sub(K, w[1], w[1], w[2]); mpfq_2_64_clear(K, &t1); mpfq_2_64_clear(K, &t2); return; } if (n == 3) { // do it in 6 mpfq_2_64_elt t1, t2; mpfq_2_64_elt_ur s; mpfq_2_64_init(K, &t1); mpfq_2_64_init(K, &t2); mpfq_2_64_elt_ur_init(K, &s); // a0*b0*(1 - X) mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); mpfq_2_64_elt_ur_neg(K, w[1], w[0]); // a1*b1*(-X + 2*X^2 - X^3) mpfq_2_64_mul_ur(K, w[2], u[1], v[1]); mpfq_2_64_elt_ur_neg(K, w[3], w[2]); mpfq_2_64_elt_ur_add(K, w[2], w[2], w[2]); mpfq_2_64_elt_ur_add(K, w[1], w[1], w[3]); // a2*b2*(-X^3+X^4) mpfq_2_64_mul_ur(K, w[4], u[2], v[2]); mpfq_2_64_elt_ur_sub(K, w[3], w[3], w[4]); // (a0+a1)*(b0+b1)*(X - X^2) mpfq_2_64_add(K, t1, u[0], u[1]); mpfq_2_64_add(K, t2, v[0], v[1]); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[1], w[1], s); mpfq_2_64_elt_ur_sub(K, w[2], w[2], s); // (a1+a2)*(b1+b2)*(X^3 - X^2) mpfq_2_64_add(K, t1, u[1], u[2]); mpfq_2_64_add(K, t2, v[1], v[2]); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[3], w[3], s); mpfq_2_64_elt_ur_sub(K, w[2], w[2], s); // (a0+a1+a2)*(b0+b1+b2)* X^2 mpfq_2_64_add(K, t1, u[0], t1); mpfq_2_64_add(K, t2, v[0], t2); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[2], w[2], s); return; } unsigned int n0, n1; n0 = n / 2; n1 = n - n0; mpfq_2_64_vec_conv_ur_n(K, w, u, v, n0); mpfq_2_64_vec_conv_ur_n(K, w + 2*n0, u + n0, v + n0, n1); mpfq_2_64_elt_ur_set_ui(K, w[2*n0-1], 0); mpfq_2_64_vec tmpu, tmpv; mpfq_2_64_vec_ur tmpw; mpfq_2_64_vec_init(K, &tmpu, n1); mpfq_2_64_vec_init(K, &tmpv, n1); mpfq_2_64_vec_ur_init(K, &tmpw, 2*n1-1); mpfq_2_64_vec_set(K, tmpu, u, n0); if (n1 != n0) mpfq_2_64_set_ui(K, tmpu[n0], 0); mpfq_2_64_vec_add(K, tmpu, tmpu, u+n0, n1); mpfq_2_64_vec_set(K, tmpv, v, n0); if (n1 != n0) mpfq_2_64_set_ui(K, tmpv[n0], 0); mpfq_2_64_vec_add(K, tmpv, tmpv, v+n0, n1); mpfq_2_64_vec_conv_ur_n(K, tmpw, tmpu, tmpv, n1); mpfq_2_64_vec_ur_sub(K, tmpw, tmpw, w, 2*n0-1); mpfq_2_64_vec_ur_sub(K, tmpw, tmpw, w + 2*n0, 2*n1-1); mpfq_2_64_vec_ur_add(K, w + n0, w + n0, tmpw, 2*n1-1); mpfq_2_64_vec_clear(K, &tmpu, n1); mpfq_2_64_vec_clear(K, &tmpv, n1); mpfq_2_64_vec_ur_clear(K, &tmpw, 2*n1-1); return; } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ static inline void mpfq_2_64_vec_conv_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, unsigned int n, mpfq_2_64_src_vec v, unsigned int m) { unsigned int i, j MAYBE_UNUSED, k; mpfq_2_64_elt_ur acc, z; mpfq_2_64_elt_ur_init(K, &acc); mpfq_2_64_elt_ur_init(K, &z); // swap pointers to have n <= m mpfq_2_64_src_vec uu, vv; if (n <= m) { uu = u; vv = v; } else { uu = v; vv = u; unsigned int tmp = n; n = m; m = tmp; } for(k = 0; k < n; ++k) { mpfq_2_64_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i <= k; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } for(k = n; k < m; ++k) { mpfq_2_64_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i < n; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } for(k = m; k < n+m-1; ++k) { mpfq_2_64_mul_ur(K, acc, uu[k-m+1], vv[m-1]); for(i = k-m+2; i < n; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } mpfq_2_64_elt_ur_clear(K, &acc); mpfq_2_64_elt_ur_clear(K, &z); } /* *Mpfq::defaults::vec::mul::code_for_vec_reduce, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_reduce(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_dst_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_reduce(K, w[i], u[i]); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_vec_ur mpfq_2_64_vec_ur_subvec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_vec_ur mpfq_2_64_vec_ur_subvec_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_elt mpfq_2_64_vec_ur_coeff_ptr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_elt mpfq_2_64_vec_ur_coeff_ptr_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::poly::code_for_poly_init */ static inline void mpfq_2_64_poly_init(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_poly p, unsigned int n) { mpfq_2_64_vec_init(k, &(p->c), n); p->alloc=n; p->size=0; } /* *Mpfq::defaults::poly::code_for_poly_clear */ static inline void mpfq_2_64_poly_clear(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_poly p) { mpfq_2_64_vec_clear(k, &(p->c), p->alloc); } /* *Mpfq::defaults::poly::code_for_poly_set */ static inline void mpfq_2_64_poly_set(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u) { if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_64_vec_set(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_setcoeff */ static inline void mpfq_2_64_poly_setcoeff(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_elt x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_64_vec_set_zero(k, mpfq_2_64_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_64_vec_setcoeff(k, w->c, x, i); w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_setcoeff_ui */ static inline void mpfq_2_64_poly_setcoeff_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, unsigned long x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_64_vec_set_zero(k, mpfq_2_64_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, i); w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_getcoeff */ static inline void mpfq_2_64_poly_getcoeff(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_elt x, mpfq_2_64_src_poly w, unsigned int i) { if (w->size < (i+1)) { mpfq_2_64_set_ui(k,x,0); } else { mpfq_2_64_vec_getcoeff(k, x, w->c, i); } } /* *Mpfq::defaults::poly::code_for_poly_deg */ static inline int mpfq_2_64_poly_deg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_poly w) { if (w->size == 0) return -1; int deg = w->size-1; mpfq_2_64_elt temp; mpfq_2_64_init(K, &temp); mpfq_2_64_vec_getcoeff(K, temp, w->c, deg); int comp=mpfq_2_64_cmp_ui(K, temp, 0); while ((deg >= 0) && (comp == 0)){ deg--; if (deg>=0) { mpfq_2_64_vec_getcoeff(K, temp, w->c, deg); comp=mpfq_2_64_cmp_ui(K, temp, 0); } } mpfq_2_64_clear(K, &temp); return deg; } /* *Mpfq::defaults::poly::code_for_poly_add */ static inline void mpfq_2_64_poly_add(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_64_vec_add(k, w->c, u->c, v->c, su); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, su), mpfq_2_64_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_64_vec_add(k, w->c, u->c, v->c, sv); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, sv), mpfq_2_64_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_sub */ static inline void mpfq_2_64_poly_sub(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_64_vec_sub(k, w->c, u->c, v->c, su); mpfq_2_64_vec_neg(k, mpfq_2_64_vec_subvec(k, w->c, su), mpfq_2_64_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_64_vec_sub(k, w->c, u->c, v->c, sv); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, sv), mpfq_2_64_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_set_ui */ static inline void mpfq_2_64_poly_set_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, unsigned long x) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_add_ui */ static inline void mpfq_2_64_poly_add_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_64_poly_deg(k, w); return; } if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, 1), mpfq_2_64_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_64_add_ui(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), mpfq_2_64_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_sub_ui */ static inline void mpfq_2_64_poly_sub_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_elt temp; mpfq_2_64_init(k, &temp); mpfq_2_64_set_ui(k, temp, x); mpfq_2_64_neg(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), temp); w->size = mpfq_2_64_cmp_ui(k, temp, 0); mpfq_2_64_clear(k, &temp); return; } if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, 1), mpfq_2_64_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_64_sub_ui(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), mpfq_2_64_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_neg */ static inline void mpfq_2_64_poly_neg(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u) { if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_64_vec_neg(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_scal_mul */ static inline void mpfq_2_64_poly_scal_mul(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_elt x) { if (mpfq_2_64_cmp_ui(k, x, 0) == 0) { w->size = 0; return; } unsigned int n = u->size; if (w->alloc < n) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, n); w->alloc = n; } mpfq_2_64_vec_scal_mul(k, w->c, u->c, x, n); w->size=n; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_mul */ static inline void mpfq_2_64_poly_mul(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int usize = mpfq_2_64_poly_deg(k, u)+1; unsigned int vsize = mpfq_2_64_poly_deg(k, v)+1; if ((usize == 0) || (vsize == 0)) { w->size = 0; return; } unsigned int wsize = usize + vsize - 1; if (w->alloc < wsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, wsize); w->alloc = wsize; } mpfq_2_64_vec_conv(k, w->c, u->c, usize, v->c, vsize); w->size=wsize; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::polygcd::code_for_poly_gcd, Mpfq::defaults::poly */ static inline void mpfq_2_64_poly_gcd(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly g, mpfq_2_64_src_poly a0, mpfq_2_64_src_poly b0) { mpfq_2_64_poly a,b,q,r; int da0=mpfq_2_64_poly_deg(k,a0), db0=mpfq_2_64_poly_deg(k,b0); if (db0==-1) mpfq_2_64_poly_set(k,g,a0); else { mpfq_2_64_poly_init(k,a,da0+1); mpfq_2_64_poly_init(k,b,db0+1); mpfq_2_64_poly_init(k,q,1); mpfq_2_64_poly_init(k,r,db0); mpfq_2_64_poly_set(k,a,a0); mpfq_2_64_poly_set(k,b,b0); while (mpfq_2_64_poly_deg(k,b)>=0) { mpfq_2_64_poly_divmod(k,q,r,a,b); mpfq_2_64_poly_set(k,a,b); mpfq_2_64_poly_set(k,b,r); } mpfq_2_64_poly_setmonic(k,g,a); mpfq_2_64_poly_clear(k,a); mpfq_2_64_poly_clear(k,b); mpfq_2_64_poly_clear(k,q); mpfq_2_64_poly_clear(k,r); } } /* *Mpfq::defaults::polygcd::code_for_poly_xgcd, Mpfq::defaults::poly */ static inline void mpfq_2_64_poly_xgcd(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly g, mpfq_2_64_dst_poly u0, mpfq_2_64_dst_poly v0, mpfq_2_64_src_poly a0, mpfq_2_64_src_poly b0) { mpfq_2_64_poly a,b,u,v,w,x,q,r; mpfq_2_64_elt c; mpfq_2_64_init(k,&c); mpfq_2_64_set_ui(k,c,0); /* placate gcc */ int da0=mpfq_2_64_poly_deg(k,a0), db0=mpfq_2_64_poly_deg(k,b0), dega; if (db0==-1) { if (da0==-1) { mpfq_2_64_poly_set(k,u0,a0); mpfq_2_64_poly_set(k,v0,b0); mpfq_2_64_poly_set(k,g,a0); } else { mpfq_2_64_poly_getcoeff(k,c,a0,da0); mpfq_2_64_inv(k,c,c); mpfq_2_64_poly_scal_mul(k,g,a0,c); mpfq_2_64_poly_set(k,v0,b0); mpfq_2_64_poly_set(k,u0,b0); mpfq_2_64_poly_setcoeff(k,u0,c,0); } } else { mpfq_2_64_poly_init(k,a,da0+1); mpfq_2_64_poly_init(k,b,db0+1); mpfq_2_64_poly_init(k,q,1); mpfq_2_64_poly_init(k,r,db0); mpfq_2_64_poly_set(k,a,a0); mpfq_2_64_poly_set(k,b,b0); mpfq_2_64_poly_init(k,u,1); mpfq_2_64_poly_init(k,v,1); mpfq_2_64_poly_init(k,w,1); mpfq_2_64_poly_init(k,x,1); mpfq_2_64_poly_setcoeff_ui(k,u,1,0); mpfq_2_64_poly_setcoeff_ui(k,x,1,0); /* u*a_initial + v*b_initial = a */ /* w*a_initial + x*b_initial = b */ while (mpfq_2_64_poly_deg(k,b)>=0) { mpfq_2_64_poly_divmod(k,q,r,a,b); mpfq_2_64_poly_set(k,a,b); /* a,b <- b,a-qb=r */ mpfq_2_64_poly_set(k,b,r); mpfq_2_64_poly_mul(k,r,q,w); mpfq_2_64_poly_sub(k,r,u,r); mpfq_2_64_poly_set(k,u,w); /* u,w <- w,u-qw */ mpfq_2_64_poly_set(k,w,r); mpfq_2_64_poly_mul(k,r,q,x); /* v,x <- x,v-qx */ mpfq_2_64_poly_sub(k,r,v,r); mpfq_2_64_poly_set(k,v,x); mpfq_2_64_poly_set(k,x,r); } dega=mpfq_2_64_poly_deg(k,a); mpfq_2_64_poly_getcoeff(k,c,a,dega); mpfq_2_64_inv(k,c,c); mpfq_2_64_poly_scal_mul(k,g,a,c); mpfq_2_64_poly_scal_mul(k,u0,u,c); mpfq_2_64_poly_scal_mul(k,v0,v,c); mpfq_2_64_poly_clear(k,a); mpfq_2_64_poly_clear(k,b); mpfq_2_64_poly_clear(k,u); mpfq_2_64_poly_clear(k,v); mpfq_2_64_poly_clear(k,w); mpfq_2_64_poly_clear(k,x); mpfq_2_64_poly_clear(k,q); mpfq_2_64_poly_clear(k,r); } mpfq_2_64_clear(k,&c); } /* *Mpfq::defaults::poly::code_for_poly_cmp */ static inline int mpfq_2_64_poly_cmp(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { if (u->size != v->size) return (int)(u->size) - (int)(v->size); else return mpfq_2_64_vec_cmp(k, u->c, v->c, u->size); } #endif /* MPFQ_2_64_H_ */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/x86_64/0000755000327606072450000000000013126452066011730 500000000000000gf2x-1.2/fft/mpfq/x86_64/mpfq_2_128.c0000644000327606072450000002434313125214701013567 00000000000000/* MPFQ generated file -- do not edit */ #include "mpfq_2_128.h" /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^128) */ /* Definition polynomial P = X^128 + X^7 + X^2 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 128, 7, 2, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=128, no_gmp=1, output_path=x86_64, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_128, w=64, } */ /* Functions operating on the field structure */ /* Element allocation functions */ /* Elementary assignment functions */ /* Assignment of random values */ /* Arithmetic operations on elements */ /* missing powz */ /* Operations involving unreduced elements */ /* Comparison functions */ /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ /* *Mpfq::defaults::vec::alloc::code_for_vec_init, Mpfq::defaults::vec */ void mpfq_2_128_vec_init(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n) { unsigned int i; *v = (mpfq_2_128_vec) malloc (n*sizeof(mpfq_2_128_elt)); for(i = 0; i < n; i++) mpfq_2_128_init(K, (*v) + i); } /* *Mpfq::defaults::vec::alloc::code_for_vec_reinit, Mpfq::defaults::vec */ void mpfq_2_128_vec_reinit(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n, unsigned int m) { if (n < m) { // increase size unsigned int i; *v = (mpfq_2_128_vec) realloc (*v, m * sizeof(mpfq_2_128_elt)); for(i = n; i < m; i+=1) mpfq_2_128_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_128_clear(K, (*v) + i); *v = (mpfq_2_128_vec) realloc (*v, m * sizeof(mpfq_2_128_elt)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_clear, Mpfq::defaults::vec */ void mpfq_2_128_vec_clear(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_clear(K, (*v) + i); free(*v); } /* missing vec_random */ /* missing vec_random2 */ /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_init, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_init(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n) { unsigned int i; *v = (mpfq_2_128_vec_ur) malloc (n*sizeof(mpfq_2_128_elt_ur)); for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_init(K, &( (*v)[i])); } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_reinit, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_reinit(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n, unsigned int m) { if (n < m) { // increase size *v = (mpfq_2_128_vec_ur) realloc (*v, m * sizeof(mpfq_2_128_elt_ur)); unsigned int i; for(i = n; i < m; i+=1) mpfq_2_128_elt_ur_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_128_elt_ur_clear(K, (*v) + i); *v = (mpfq_2_128_vec_ur) realloc (*v, m * sizeof(mpfq_2_128_elt_ur)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_clear, Mpfq::defaults::vec */ void mpfq_2_128_vec_ur_clear(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_vec_ur * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_clear(K, &( (*v)[i])); free(*v); } /* Polynomial functions */ /* *Mpfq::defaults::poly::code_for_poly_setmonic */ void mpfq_2_128_poly_setmonic(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p) { long degp = mpfq_2_128_poly_deg(K, p); if (degp == -1) { q->size = 0; return; } if (degp == 0) { mpfq_2_128_elt aux; mpfq_2_128_init(K, &aux); mpfq_2_128_set_ui(K, aux, 1); mpfq_2_128_poly_setcoeff(K, q, aux, 0); mpfq_2_128_clear(K, &aux); q->size = 1; return; } mpfq_2_128_elt lc; /* spurious uninit warning sometimes */ mpfq_2_128_init(K, &lc); mpfq_2_128_poly_getcoeff(K, lc, p, degp); mpfq_2_128_inv(K, lc, lc); mpfq_2_128_poly_setcoeff_ui(K, q, 1, degp); mpfq_2_128_vec_scal_mul(K, q->c, p->c, lc, degp); q->size = degp+1; mpfq_2_128_clear(K, &lc); } /* *Mpfq::defaults::poly::code_for_poly_divmod */ int mpfq_2_128_poly_divmod(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_dst_poly r, mpfq_2_128_src_poly a, mpfq_2_128_src_poly b) { if (b->size == 0) { return 0; } if (a->size == 0) { q->size = 0; r->size = 0; return 1; } int dega = mpfq_2_128_poly_deg(K, a); if (dega<0) { q->size = 0; r->size = 0; return 1; } // Compute deg b and inverse of leading coef int degb = mpfq_2_128_poly_deg(K, b); if (degb<0) { return 0; } if (degb > dega) { q->size=0; mpfq_2_128_poly_set(K, r, a); return 1; } int bmonic; mpfq_2_128_elt ilb; mpfq_2_128_init(K, &ilb); mpfq_2_128_elt temp; mpfq_2_128_init(K, &temp); mpfq_2_128_poly_getcoeff(K, temp, b, degb); if (mpfq_2_128_cmp_ui(K, temp, 1) == 0) { mpfq_2_128_set_ui(K, ilb, 1); bmonic = 1; } else { mpfq_2_128_inv(K, ilb, temp); bmonic = 0; } mpfq_2_128_poly qq, rr; mpfq_2_128_poly_init(K, qq, dega-degb+1); mpfq_2_128_poly_init(K, rr, dega); mpfq_2_128_poly_set(K, rr, a); mpfq_2_128_elt aux, aux2; mpfq_2_128_init(K, &aux); mpfq_2_128_init(K, &aux2); int i; int j; for (i = dega; i >= (int)degb; --i) { mpfq_2_128_poly_getcoeff(K, aux, rr, i); if (!bmonic) mpfq_2_128_mul(K, aux, aux, ilb); mpfq_2_128_poly_setcoeff(K, qq, aux, i-degb); for (j = i-1; j >= (int)(i - degb); --j) { mpfq_2_128_poly_getcoeff(K, temp, b, j-i+degb); mpfq_2_128_mul(K, aux2, aux, temp); mpfq_2_128_poly_getcoeff(K, temp, rr, j); mpfq_2_128_sub(K, temp, temp, aux2); mpfq_2_128_poly_setcoeff(K, rr, temp, j); } } rr->size = degb; int degr = mpfq_2_128_poly_deg(K, rr); rr->size = degr+1; if (q != NULL) mpfq_2_128_poly_set(K, q, qq); if (r != NULL) mpfq_2_128_poly_set(K, r, rr); mpfq_2_128_clear(K, &temp); mpfq_2_128_clear(K, &ilb); mpfq_2_128_clear(K, &aux); mpfq_2_128_clear(K, &aux2); mpfq_2_128_poly_clear(K, rr); mpfq_2_128_poly_clear(K, qq); return 1; } static void mpfq_2_128_poly_preinv(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned int); /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ /* Triggered by: poly_precomp_mod */ static void mpfq_2_128_poly_preinv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p, unsigned int n) { // Compute the inverse of p(x) modulo x^n // Newton iteration: x_{n+1} = x_n + x_n(1 - a*x_n) // Requires p(0) = 1 // Assume p != q (no alias) mpfq_2_128_elt temp; /* spurious uninit warning sometimes */ mpfq_2_128_init(K, &temp); mpfq_2_128_poly_getcoeff(K, temp, p, 0);//Should be in the assert assert( mpfq_2_128_cmp_ui(K, temp, 1) == 0); assert (p != q); int m; if (n <= 2) { mpfq_2_128_poly_setcoeff_ui(K, q, 1, 0); q->size = 1; m = 1; if (n == 1) return; } else { // n >= 3: recursive call at prec m = ceil(n/2) m = 1 + ((n-1)/2); mpfq_2_128_poly_preinv(K, q, p, m); } // enlarge q if necessary if (q->alloc < n) { mpfq_2_128_vec_reinit(K, &(q->c), q->alloc, n); q->alloc = n; } // refine value mpfq_2_128_vec tmp; mpfq_2_128_vec_init(K, &tmp, m+n-1); mpfq_2_128_vec_conv(K, tmp, p->c, MIN(n, p->size), q->c, m); int nn = MIN(n, MIN(n, p->size) + m -1); mpfq_2_128_vec_neg(K, tmp, tmp, nn); mpfq_2_128_vec_getcoeff(K, temp, tmp, 0); mpfq_2_128_add_ui(K, temp, temp, 1); mpfq_2_128_vec_setcoeff(K, tmp, temp, 0); mpfq_2_128_vec_conv(K, tmp, q->c, m, tmp, nn); mpfq_2_128_vec_set(K, mpfq_2_128_vec_subvec(K, q->c, m), mpfq_2_128_vec_subvec(K, tmp, m), n-m); q->size = n; mpfq_2_128_clear(K, &temp); mpfq_2_128_vec_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ void mpfq_2_128_poly_precomp_mod(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly q, mpfq_2_128_src_poly p) { assert(p != q); int N = mpfq_2_128_poly_deg(K, p); mpfq_2_128_poly rp; mpfq_2_128_poly_init(K, rp, N+1); mpfq_2_128_vec_rev(K, rp->c, p->c, N+1); rp->size = N+1; mpfq_2_128_poly_preinv(K, q, rp, N); mpfq_2_128_poly_clear(K, rp); } /* *Mpfq::defaults::poly::code_for_poly_mod_pre */ void mpfq_2_128_poly_mod_pre(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_poly r, mpfq_2_128_src_poly q, mpfq_2_128_src_poly p, mpfq_2_128_src_poly irp) { int N = mpfq_2_128_poly_deg(K, p); int degq = mpfq_2_128_poly_deg(K, q); if (degq < N) { mpfq_2_128_poly_set(K, r, q); return; } int m = degq - N; assert (degq <= 2*N-2); mpfq_2_128_poly revq; mpfq_2_128_poly_init(K, revq, MAX(degq+1, m+1)); mpfq_2_128_vec_rev(K, revq->c, q->c, degq+1); revq->size = q->size; mpfq_2_128_poly_mul(K, revq, revq, irp); mpfq_2_128_vec_rev(K, revq->c, revq->c, m+1); revq->size = m+1; mpfq_2_128_poly_mul(K, revq, revq, p); mpfq_2_128_poly_sub(K, r, q, revq); r->size = mpfq_2_128_poly_deg(K, r)+1; mpfq_2_128_poly_clear(K, revq); } /* missing poly_random */ /* missing poly_random2 */ /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/x86_64/mpfq_2_128.h0000644000327606072450000020740513125214702013577 00000000000000#ifndef MPFQ_2_128_H_ #define MPFQ_2_128_H_ /* MPFQ generated file -- do not edit */ #include "gf2x.h" #include "gf2x/gf2x-small.h" #include "mpfq.h" #include "mpfq_gf2n_common.h" #include #include #include #include #include #include #include #include #include "assert.h" #ifdef MPFQ_LAST_GENERATED_TAG #undef MPFQ_LAST_GENERATED_TAG #endif #define MPFQ_LAST_GENERATED_TAG 2_128 /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^128) */ /* Definition polynomial P = X^128 + X^7 + X^2 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 128, 7, 2, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=128, no_gmp=1, output_path=x86_64, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_128, w=64, } */ typedef mpfq_2_field mpfq_2_128_field; typedef mpfq_2_dst_field mpfq_2_128_dst_field; typedef unsigned long mpfq_2_128_elt[2]; typedef unsigned long * mpfq_2_128_dst_elt; typedef const unsigned long * mpfq_2_128_src_elt; typedef unsigned long mpfq_2_128_elt_ur[4]; typedef unsigned long * mpfq_2_128_dst_elt_ur; typedef const unsigned long * mpfq_2_128_src_elt_ur; typedef mpfq_2_128_elt * mpfq_2_128_vec; typedef mpfq_2_128_elt * mpfq_2_128_dst_vec; typedef mpfq_2_128_elt * mpfq_2_128_src_vec; typedef mpfq_2_128_elt_ur * mpfq_2_128_vec_ur; typedef mpfq_2_128_elt_ur * mpfq_2_128_dst_vec_ur; typedef mpfq_2_128_elt_ur * mpfq_2_128_src_vec_ur; typedef struct { mpfq_2_128_vec c; unsigned int alloc; unsigned int size; } mpfq_2_128_poly_struct; typedef mpfq_2_128_poly_struct mpfq_2_128_poly [1]; typedef mpfq_2_128_poly_struct * mpfq_2_128_dst_poly; typedef mpfq_2_128_poly_struct * mpfq_2_128_src_poly; #ifdef __cplusplus extern "C" { #endif /* *Mpfq::defaults::code_for_impl_name */ #define mpfq_2_128_impl_name() "2_128" /* *Mpfq::gf2n::field::code_for_impl_max_characteristic_bits */ #define mpfq_2_128_impl_max_characteristic_bits() 2 /* *Mpfq::gf2n::field::code_for_impl_max_degree */ #define mpfq_2_128_impl_max_degree() 1 /* Functions operating on the field structure */ /* *Mpfq::gf2n::field::code_for_field_characteristic_bits */ #define mpfq_2_128_field_characteristic_bits(f) 1 /* *Mpfq::gf2n::field::code_for_field_degree */ #define mpfq_2_128_field_degree(f) 128 static inline void mpfq_2_128_field_init(mpfq_2_128_dst_field); /* *Mpfq::gf2n::field::code_for_field_clear */ #define mpfq_2_128_field_clear(K) /**/ /* *Mpfq::gf2n::field::code_for_field_specify */ #define mpfq_2_128_field_specify(k, dummy, vp) /**/ static inline void mpfq_2_128_field_setopt(mpfq_2_128_dst_field, unsigned long, void *); /* Element allocation functions */ /* *Mpfq::defaults::flatdata::code_for_init, Mpfq::gf2n::trivialities */ #define mpfq_2_128_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_128_clear(f, px) /**/ /* Elementary assignment functions */ static inline void mpfq_2_128_set(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, unsigned long); static inline void mpfq_2_128_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_elt); static inline unsigned long mpfq_2_128_get_ui(mpfq_2_128_dst_field, mpfq_2_128_src_elt); static inline void mpfq_2_128_set_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, unsigned long); static inline void mpfq_2_128_set_uipoly_wide(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, const unsigned long *, unsigned int); static inline unsigned long mpfq_2_128_get_uipoly(mpfq_2_128_dst_field, mpfq_2_128_src_elt); static inline void mpfq_2_128_get_uipoly_wide(mpfq_2_128_dst_field, unsigned long *, mpfq_2_128_src_elt); /* Assignment of random values */ /* Arithmetic operations on elements */ static inline void mpfq_2_128_add(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, mpfq_2_128_src_elt); /* *Mpfq::gf2n::trivialities::code_for_sub */ #define mpfq_2_128_sub(K, r, s1, s2) mpfq_2_128_add(K,r,s1,s2) /* *Mpfq::gf2n::trivialities::code_for_neg */ #define mpfq_2_128_neg(K, r, s) mpfq_2_128_set(K,r,s) static inline void mpfq_2_128_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_sqr(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); /* *Mpfq::gf2n::trivialities::code_for_is_sqr */ #define mpfq_2_128_is_sqr(f, p) 1 static inline int mpfq_2_128_sqrt(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_pow(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long *, size_t); /* missing powz */ /* *Mpfq::gf2n::trivialities::code_for_frobenius */ #define mpfq_2_128_frobenius(K, r, s) mpfq_2_128_sqr(K,r,s) static inline void mpfq_2_128_add_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_ui */ #define mpfq_2_128_sub_ui(K, r, s1, s2) mpfq_2_128_add_ui(K,r,s1,s2) static inline void mpfq_2_128_mul_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); static inline void mpfq_2_128_add_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_uipoly */ #define mpfq_2_128_sub_uipoly(K, r, s1, s2) mpfq_2_128_add_uipoly(K,r,s1,s2) static inline void mpfq_2_128_mul_uipoly(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt, unsigned long); static inline void mpfq_2_128_longshift_left(unsigned long *, const unsigned long *, int, int); static inline void mpfq_2_128_longaddshift_left(unsigned long *, const unsigned long *, int, int); static inline int mpfq_2_128_inv(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_as_solve(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_elt); static inline unsigned long mpfq_2_128_trace(mpfq_2_128_dst_field, mpfq_2_128_src_elt); /* Operations involving unreduced elements */ /* *Mpfq::defaults::flatdata::code_for_elt_ur_init, Mpfq::gf2n::trivialities */ #define mpfq_2_128_elt_ur_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_elt_ur_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_128_elt_ur_clear(f, px) /**/ static inline void mpfq_2_128_elt_ur_set(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt_ur); static inline void mpfq_2_128_elt_ur_set_elt(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt); static inline void mpfq_2_128_elt_ur_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur); static inline void mpfq_2_128_elt_ur_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, unsigned long); static inline void mpfq_2_128_elt_ur_add(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt_ur, mpfq_2_128_src_elt_ur); /* *Mpfq::gf2n::trivialities::code_for_elt_ur_neg */ #define mpfq_2_128_elt_ur_neg(K, r, s) mpfq_2_128_elt_ur_set(K,r,s) /* *Mpfq::gf2n::trivialities::code_for_elt_ur_sub */ #define mpfq_2_128_elt_ur_sub(K, r, s1, s2) mpfq_2_128_elt_ur_add(K,r,s1,s2) static inline void mpfq_2_128_mul_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline void mpfq_2_128_sqr_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_elt); static inline void mpfq_2_128_reduce(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_dst_elt_ur); /* Comparison functions */ static inline int mpfq_2_128_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_elt, mpfq_2_128_src_elt); static inline int mpfq_2_128_cmp_ui(mpfq_2_128_dst_field, mpfq_2_128_src_elt, unsigned long); static inline int mpfq_2_128_is_zero(mpfq_2_128_dst_field, mpfq_2_128_src_elt); /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ void mpfq_2_128_vec_init(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int); void mpfq_2_128_vec_reinit(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int, unsigned int); void mpfq_2_128_vec_clear(mpfq_2_128_dst_field, mpfq_2_128_vec *, unsigned int); static inline void mpfq_2_128_vec_set(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, unsigned int); static inline void mpfq_2_128_vec_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_setcoeff_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, unsigned long, unsigned int); static inline void mpfq_2_128_vec_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_add(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_rev(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_scal_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_conv(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_src_vec, unsigned int, mpfq_2_128_src_vec, unsigned int); /* missing vec_random */ /* missing vec_random2 */ static inline int mpfq_2_128_vec_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline int mpfq_2_128_vec_is_zero(mpfq_2_128_dst_field, mpfq_2_128_src_vec, unsigned int); static inline mpfq_2_128_dst_vec mpfq_2_128_vec_subvec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, int); static inline mpfq_2_128_src_vec mpfq_2_128_vec_subvec_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec, int); static inline mpfq_2_128_dst_elt mpfq_2_128_vec_coeff_ptr(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, int); static inline mpfq_2_128_src_elt mpfq_2_128_vec_coeff_ptr_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec, int); /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ void mpfq_2_128_vec_ur_init(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int); static inline void mpfq_2_128_vec_ur_set_zero(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_set_vec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, unsigned int); void mpfq_2_128_vec_ur_reinit(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int, unsigned int); void mpfq_2_128_vec_ur_clear(mpfq_2_128_dst_field, mpfq_2_128_vec_ur *, unsigned int); static inline void mpfq_2_128_vec_ur_set(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_elt_ur, unsigned int); static inline void mpfq_2_128_vec_ur_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_add(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_ur_rev(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec_ur, unsigned int); static inline void mpfq_2_128_vec_scal_mul_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_vec_conv_ur_n(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_conv_ur(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, mpfq_2_128_src_vec, unsigned int, mpfq_2_128_src_vec, unsigned int); static inline void mpfq_2_128_vec_reduce(mpfq_2_128_dst_field, mpfq_2_128_dst_vec, mpfq_2_128_dst_vec_ur, unsigned int); static inline mpfq_2_128_dst_vec_ur mpfq_2_128_vec_ur_subvec(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, int); static inline mpfq_2_128_src_vec_ur mpfq_2_128_vec_ur_subvec_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec_ur, int); static inline mpfq_2_128_dst_elt mpfq_2_128_vec_ur_coeff_ptr(mpfq_2_128_dst_field, mpfq_2_128_dst_vec_ur, int); static inline mpfq_2_128_src_elt mpfq_2_128_vec_ur_coeff_ptr_const(mpfq_2_128_dst_field, mpfq_2_128_src_vec_ur, int); /* *Mpfq::defaults::flatdata::code_for_vec_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_128_vec_elt_stride(K, n) ((n)*sizeof(mpfq_2_128_elt)) /* *Mpfq::defaults::flatdata::code_for_vec_ur_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_128_vec_ur_elt_stride(K, n) ((n)*sizeof(mpfq_2_128_elt_ur)) /* Polynomial functions */ static inline void mpfq_2_128_poly_init(mpfq_2_128_dst_field, mpfq_2_128_poly, unsigned int); static inline void mpfq_2_128_poly_clear(mpfq_2_128_dst_field, mpfq_2_128_poly); static inline void mpfq_2_128_poly_set(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_setmonic(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_setcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_elt, unsigned int); static inline void mpfq_2_128_poly_setcoeff_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, unsigned long, unsigned int); static inline void mpfq_2_128_poly_getcoeff(mpfq_2_128_dst_field, mpfq_2_128_dst_elt, mpfq_2_128_src_poly, unsigned int); static inline int mpfq_2_128_poly_deg(mpfq_2_128_dst_field, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_add(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_sub(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_set_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, unsigned long); static inline void mpfq_2_128_poly_add_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned long); static inline void mpfq_2_128_poly_sub_ui(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, unsigned long); static inline void mpfq_2_128_poly_neg(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_scal_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_elt); static inline void mpfq_2_128_poly_mul(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); int mpfq_2_128_poly_divmod(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_precomp_mod(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly); void mpfq_2_128_poly_mod_pre(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_gcd(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); static inline void mpfq_2_128_poly_xgcd(mpfq_2_128_dst_field, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_dst_poly, mpfq_2_128_src_poly, mpfq_2_128_src_poly); /* missing poly_random */ /* missing poly_random2 */ static inline int mpfq_2_128_poly_cmp(mpfq_2_128_dst_field, mpfq_2_128_src_poly, mpfq_2_128_src_poly); /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ #ifdef __cplusplus } #endif /* Implementations for inlines */ /* *Mpfq::gf2n::field::code_for_field_init */ static inline void mpfq_2_128_field_init(mpfq_2_128_dst_field f) { f->io_type=16; } /* *Mpfq::gf2n::field::code_for_field_setopt */ static inline void mpfq_2_128_field_setopt(mpfq_2_128_dst_field f, unsigned long x MAYBE_UNUSED, void * y) { assert(x == MPFQ_IO_TYPE); f->io_type=((unsigned long*)y)[0]; } /* *Mpfq::defaults::flatdata::code_for_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt)); } /* *Mpfq::gf2n::trivialities::code_for_set_ui */ static inline void mpfq_2_128_set_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_128_elt) - sizeof(unsigned long)); } /* *Mpfq::defaults::flatdata::code_for_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r) { mpfq_2_128_vec_set_zero(K,(mpfq_2_128_dst_vec)r,1); } /* *Mpfq::gf2n::trivialities::code_for_get_ui */ static inline unsigned long mpfq_2_128_get_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { return r[0] & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly */ static inline void mpfq_2_128_set_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, unsigned long x) { r[0] = x; memset(r + 1, 0, sizeof(mpfq_2_128_elt) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly_wide */ static inline void mpfq_2_128_set_uipoly_wide(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, const unsigned long * x, unsigned int n) { unsigned int i; for (i = 0 ; i < n && i < 2 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly */ static inline unsigned long mpfq_2_128_get_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { return r[0]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly_wide */ static inline void mpfq_2_128_get_uipoly_wide(mpfq_2_128_dst_field K MAYBE_UNUSED, unsigned long * r, mpfq_2_128_src_elt x) { unsigned int i; for(i = 0 ; i < 2 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_add */ static inline void mpfq_2_128_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { int i; for(i = 0 ; i < 2 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::trivialities::code_for_mul */ static inline void mpfq_2_128_mul(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { mpfq_2_128_elt_ur t; mpfq_2_128_mul_ur(K, t, s1, s2); mpfq_2_128_reduce(K, r, t); } /* *Mpfq::gf2n::trivialities::code_for_sqr */ static inline void mpfq_2_128_sqr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { mpfq_2_128_elt_ur t; mpfq_2_128_sqr_ur(K, t, s); mpfq_2_128_reduce(K, r, t); } /* *Mpfq::gf2n::linearops::code_for_sqrt */ static inline int mpfq_2_128_sqrt(mpfq_2_128_dst_field K, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { static const unsigned long shuffle_table[256] = { 0, 1, 16, 17, 2, 3, 18, 19, 32, 33, 48, 49, 34, 35, 50, 51, 4, 5, 20, 21, 6, 7, 22, 23, 36, 37, 52, 53, 38, 39, 54, 55, 64, 65, 80, 81, 66, 67, 82, 83, 96, 97, 112, 113, 98, 99, 114, 115, 68, 69, 84, 85, 70, 71, 86, 87, 100, 101, 116, 117, 102, 103, 118, 119, 8, 9, 24, 25, 10, 11, 26, 27, 40, 41, 56, 57, 42, 43, 58, 59, 12, 13, 28, 29, 14, 15, 30, 31, 44, 45, 60, 61, 46, 47, 62, 63, 72, 73, 88, 89, 74, 75, 90, 91, 104, 105, 120, 121, 106, 107, 122, 123, 76, 77, 92, 93, 78, 79, 94, 95, 108, 109, 124, 125, 110, 111, 126, 127, 128, 129, 144, 145, 130, 131, 146, 147, 160, 161, 176, 177, 162, 163, 178, 179, 132, 133, 148, 149, 134, 135, 150, 151, 164, 165, 180, 181, 166, 167, 182, 183, 192, 193, 208, 209, 194, 195, 210, 211, 224, 225, 240, 241, 226, 227, 242, 243, 196, 197, 212, 213, 198, 199, 214, 215, 228, 229, 244, 245, 230, 231, 246, 247, 136, 137, 152, 153, 138, 139, 154, 155, 168, 169, 184, 185, 170, 171, 186, 187, 140, 141, 156, 157, 142, 143, 158, 159, 172, 173, 188, 189, 174, 175, 190, 191, 200, 201, 216, 217, 202, 203, 218, 219, 232, 233, 248, 249, 234, 235, 250, 251, 204, 205, 220, 221, 206, 207, 222, 223, 236, 237, 252, 253, 238, 239, 254, 255, }; mpfq_2_128_elt sqrt_t ={ 0x6db6db6db6db6da4UL, 0x2492492492492492UL, } ; mpfq_2_128_elt odd, even; mpfq_2_128_elt_ur odd_t; unsigned long t; #define EVEN_MASK (((unsigned long)-1)/3UL) #define ODD_MASK ((EVEN_MASK)<<1) unsigned int i; for(i = 0 ; i < 2 ; i++) { even[i] = s[i] & EVEN_MASK; } for(i = 0 ; i < 1 ; i++) { t = even[2*i]; t |= t >> 7; even[i] = shuffle_table[t & 255]; t >>= 16; even[i] |= shuffle_table[t & 255] << 8; t >>= 16; even[i] |= shuffle_table[t & 255] << 16; t >>= 16; even[i] |= shuffle_table[t & 255] << 24; t = even[2*i+1]; t |= t >> 7; even[i] |= shuffle_table[t & 255] << 32; t >>= 16; even[i] |= shuffle_table[t & 255] << 40; t >>= 16; even[i] |= shuffle_table[t & 255] << 48; t >>= 16; even[i] |= shuffle_table[t & 255] << 56; } memset(even + 1, 0, 1 * sizeof(unsigned long)); for(i = 0 ; i < 2 ; i++) { odd[i] = (s[i] & ODD_MASK) >> 1; } for(i = 0 ; i < 1 ; i++) { t = odd[2*i]; t |= t >> 7; odd[i] = shuffle_table[t & 255]; t >>= 16; odd[i] |= shuffle_table[t & 255] << 8; t >>= 16; odd[i] |= shuffle_table[t & 255] << 16; t >>= 16; odd[i] |= shuffle_table[t & 255] << 24; t = odd[2*i+1]; t |= t >> 7; odd[i] |= shuffle_table[t & 255] << 32; t >>= 16; odd[i] |= shuffle_table[t & 255] << 40; t >>= 16; odd[i] |= shuffle_table[t & 255] << 48; t >>= 16; odd[i] |= shuffle_table[t & 255] << 56; } memset(odd + 1, 0, 1 * sizeof(unsigned long)); mpfq_2_128_mul_ur(K, odd_t, odd, sqrt_t); for(i = 0 ; i < (2+1)/2 ; i++) { odd_t[i] ^= even[i]; } mpfq_2_128_reduce(K, r, odd_t); return 1; } /* *Mpfq::defaults::pow::code_for_pow, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_pow(mpfq_2_128_dst_field k, mpfq_2_128_dst_elt res, mpfq_2_128_src_elt r, unsigned long * x, size_t n) { mpfq_2_128_elt u, a; long i, j, lead; /* it is a signed type */ unsigned long mask; /* get the correct (i,j) position of the most significant bit in x */ for(i = ((long)n)-1; i>=0 && x[i]==0; i--) ; if (i < 0) { /* power zero gets 1 */ mpfq_2_128_set_ui(k, res, 1); return; } j = 64 - 1; mask = (1UL<>=1) ; lead = i*64+j; /* Ensured. */ mpfq_2_128_init(k, &u); mpfq_2_128_init(k, &a); mpfq_2_128_set(k, a, r); for( ; lead > 0; lead--) { if (j-- == 0) { i--; j = 64-1; mask = (1UL<>= 1; } if (x[i]&mask) { mpfq_2_128_sqr(k, u, a); mpfq_2_128_mul(k, a, u, r); } else { mpfq_2_128_sqr(k, a,a); } } mpfq_2_128_set(k, res, a); mpfq_2_128_clear(k, &u); mpfq_2_128_clear(k, &a); } /* *Mpfq::gf2n::trivialities::code_for_add_ui */ static inline void mpfq_2_128_add_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_set(K, r, s); r[0] ^= x & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_mul_ui */ static inline void mpfq_2_128_mul_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { if (x & 1UL) { mpfq_2_128_set(K, r, s); } else { memset(r, 0, sizeof(mpfq_2_128_elt)); } } /* *Mpfq::gf2n::trivialities::code_for_add_uipoly */ static inline void mpfq_2_128_add_uipoly(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_set(K, r, s); r[0] ^= x; } /* *Mpfq::gf2n::trivialities::code_for_mul_uipoly */ static inline void mpfq_2_128_mul_uipoly(mpfq_2_128_dst_field k, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s, unsigned long x) { mpfq_2_128_elt xx; mpfq_2_128_init(k, &xx); mpfq_2_128_set_uipoly(k, xx, x); mpfq_2_128_mul(k, r, s, xx); mpfq_2_128_clear(k, &xx); } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_128_longshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 64; int i; s %= 64; if (s > 0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i] << s ^ src[i-1] >> (64-s); } dst[m] = src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i]; } dst[m] = src[0]; } for(i = m-1 ; i>= 0 ; i--) { dst[i] = 0UL; } } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_128_longaddshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 64; int i; s %= 64; if (s>0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i] << s ^ src[i-1] >> (64-s); } dst[m] ^= src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i]; } dst[m] ^= src[0]; } } /* *Mpfq::gf2n::inversion::code_for_inv */ static inline int mpfq_2_128_inv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { unsigned long a[3] = { 0x8000000000000000UL, 0x43UL, 0x8000000000000000UL, }; unsigned long b[3]; unsigned long u[3] = { 0, }; unsigned long v[3] = { 1, 0, }; unsigned long x; int ia, ib; int i,d; if (mpfq_2_128_cmp_ui(K, s, 0UL) == 0) return 0; { unsigned long z; z = s[0] << 63; b[0] = z; z = s[0] >> 1 ^ s[1] << 63; b[1] = z; z = s[1] >> 1; b[2] = z; } ib = mpfq_clzlx(b, 3); ia = 0; mpfq_2_128_longshift_left(b,b,3,ib); for(d = ib - ia ; ; ) { if (d == 0) { for(i = 0 ; i < 3 ; i++) v[i] ^= u[i]; b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; if (!x) { memcpy(r,u,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,3); ib += t; d += t; mpfq_2_128_longshift_left(b,b,3,t); } for(;d > 0;) { mpfq_2_128_longaddshift_left(u,v,3,d); a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; if (!x) { memcpy(r,v,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,3); ia += t; d -= t; mpfq_2_128_longshift_left(a,a,3,t); } if (d == 0) { for(i = 0 ; i < 3 ; i++) u[i] ^= v[i]; a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; a[2] ^= b[2]; x |= a[2]; if (!x) { memcpy(r,v,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,3); ia += t; d -= t; mpfq_2_128_longshift_left(a,a,3,t); } for(;d < 0;) { mpfq_2_128_longaddshift_left(v,u,3,-d); b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; b[2] ^= a[2]; x |= b[2]; if (!x) { memcpy(r,u,2 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,3); ib += t; d += t; mpfq_2_128_longshift_left(b,b,3,t); } } } /* *Mpfq::gf2n::linearops::code_for_as_solve */ static inline void mpfq_2_128_as_solve(mpfq_2_128_dst_field K, mpfq_2_128_dst_elt r, mpfq_2_128_src_elt s) { static const mpfq_2_128_elt t[128] = { { 0x676aac9fa4b20b08UL, 0x295ac0b1f4731af9UL, }, { 0x929959af766af404UL, 0xe5da5595ee970b89UL, }, { 0x929959af766af406UL, 0xe5da5595ee970b89UL, }, { 0x7783f7333404a20cUL, 0x4e9826c74350bfe6UL, }, { 0x929959af766af402UL, 0xe5da5595ee970b89UL, }, { 0x7dc714cb83074e6aUL, 0x2aaea79ad7da34b0UL, }, { 0x7783f7333404a204UL, 0x4e9826c74350bfe6UL, }, { 0xf5f3f531d2d9fe18UL, 0xcc8095241ae41171UL, }, { 0x929959af766af412UL, 0xe5da5595ee970b89UL, }, { 0x77cb862e8ac85b44UL, 0x4e983687d159ce96UL, }, { 0x7dc714cb83074e4aUL, 0x2aaea79ad7da34b0UL, }, { 0xf73fcb3c06aaff56UL, 0xaae2ab6aaf144aafUL, }, { 0x7783f7333404a244UL, 0x4e9826c74350bfe6UL, }, { 0x893fe9ca40603f62UL, 0xe62f327ccd5792ddUL, }, { 0xf5f3f531d2d9fe98UL, 0xcc8095241ae41171UL, }, { 0xe1336bc7d453b626UL, 0xab52f0323f47c90bUL, }, { 0x929959af766af512UL, 0xe5da5595ee970b89UL, }, { 0x79a6a089abf4573aUL, 0x2abe34bad75338b4UL, }, { 0x77cb862e8ac85944UL, 0x4e983687d159ce96UL, }, { 0x1a9cbef8232562fcUL, 0x1e8ccb9dcc72f2eUL, }, { 0x7dc714cb83074a4aUL, 0x2aaea79ad7da34b0UL, }, { 0xce869b24a80e48cUL, 0x2442c3221f3dc1aUL, }, { 0xf73fcb3c06aaf756UL, 0xaae2ab6aaf144aafUL, }, { 0xeb3ff936dd9aa228UL, 0xcf64612f39c4323dUL, }, { 0x7783f7333404b244UL, 0x4e9826c74350bfe6UL, }, { 0xf0d5382a57572458UL, 0xcc911696880d4909UL, }, { 0x893fe9ca40601f62UL, 0xe62f327ccd5792ddUL, }, { 0x697f6478e5db2834UL, 0x4d7cd7cc29d28cf2UL, }, { 0xf5f3f531d2d9be98UL, 0xcc8095241ae41171UL, }, { 0xfc0956ca1a5b86a4UL, 0xccc99127569146a7UL, }, { 0xe1336bc7d4533626UL, 0xab52f0323f47c90bUL, }, { 0x14f5986b001eeb82UL, 0x65cece94dacd5b1cUL, }, { 0x929959af766bf512UL, 0xe5da5595ee970b89UL, }, { 0x6fe27169c7c3e73aUL, 0x2b0e7fa2d509ca74UL, }, { 0x79a6a089abf6573aUL, 0x2abe34bad75338b4UL, }, { 0x11d3553885980142UL, 0x65df4d2648241324UL, }, { 0x77cb862e8acc5944UL, 0x4e983687d159ce96UL, }, { 0xef6fd21d2af671a4UL, 0xcf74f70e70ef2af7UL, }, { 0x1a9cbef8232d62fcUL, 0x1e8ccb9dcc72f2eUL, }, { 0xf91a9d8499490f58UL, 0xcec4b9173b16cdf9UL, }, { 0x7dc714cb83174a4aUL, 0x2aaea79ad7da34b0UL, }, { 0x99a6cf206b513bdcUL, 0x83f16f99175f6247UL, }, { 0xce869b24aa0e48cUL, 0x2442c3221f3dc1aUL, }, { 0x1b9e27ebe84671c0UL, 0x3f562a96a2aa908UL, }, { 0xf73fcb3c06eaf756UL, 0xaae2ab6aaf144aafUL, }, { 0xfcd6d526cddeebd4UL, 0xccc9c07ae11bcce3UL, }, { 0xeb3ff936dd1aa228UL, 0xcf64612f39c4323dUL, }, { 0xe461dfebe8467196UL, 0xa95fc803c09556f7UL, }, { 0x7783f7333504b244UL, 0x4e9826c74350bfe6UL, }, { 0x7b20ee03c15c7384UL, 0x4cdc1ab0f0ab5b2eUL, }, { 0xf0d5382a55572458UL, 0xcc911696880d4909UL, }, { 0xfb48c8c7fe68cf6aUL, 0xaaba68961da11d79UL, }, { 0x893fe9ca44601f62UL, 0xe62f327ccd5792ddUL, }, { 0x938b5c70638d3beeUL, 0xe5db5416ee209847UL, }, { 0x697f6478eddb2834UL, 0x4d7cd7cc29d28cf2UL, }, { 0xb49fa26a7e512ceUL, 0x6437818b95e2e76eUL, }, { 0xf5f3f531c2d9be98UL, 0xcc8095241ae41171UL, }, { 0x7868a299022ddf34UL, 0x4cd9020746184ba2UL, }, { 0xfc0956ca3a5b86a4UL, 0xccc99127569146a7UL, }, { 0x8f1d24e407e8e76cUL, 0x824171dcefbe4a8bUL, }, { 0xe1336bc794533626UL, 0xab52f0323f47c90bUL, }, { 0x88711e202cdc3b5eUL, 0xe62e22af1f6bf32bUL, }, { 0x14f5986b801eeb82UL, 0x65cece94dacd5b1cUL, }, { 0x9aadb85427b54520UL, 0x83f4672b23a92e49UL, }, { 0x929959ae766bf512UL, 0xe5da5595ee970b89UL, }, { 0x48711dbeccf94cUL, 0x104092097172UL, }, { 0x6fe2716bc7c3e73aUL, 0x2b0e7fa2d509ca74UL, }, { 0x99d6b267d0d7976cUL, 0x81edd40a7a7437cbUL, }, { 0x79a6a08dabf6573aUL, 0x2abe34bad75338b4UL, }, { 0x84dd884d1a5d4462UL, 0xe46a1e8deccdf96dUL, }, { 0x11d3553085980142UL, 0x65df4d2648241324UL, }, { 0x8ab1aeeb3a605920UL, 0x804c1cb1eac70f69UL, }, { 0x77cb863e8acc5944UL, 0x4e983687d159ce96UL, }, { 0xe04514377dbd55aaUL, 0xa94f4b3252499e01UL, }, { 0xef6fd23d2af671a4UL, 0xcf74f70e70ef2af7UL, }, { 0x978a93f3f56f619eUL, 0xe7d77da5831189d3UL, }, { 0x1a9cbeb8232d62fcUL, 0x1e8ccb9dcc72f2eUL, }, { 0x7a5109eab0a16ef4UL, 0x4cdd0f362b68e52aUL, }, { 0xf91a9d0499490f58UL, 0xcec4b9173b16cdf9UL, }, { 0x8830781e88d05912UL, 0xe4329c3d7bf23369UL, }, { 0x7dc715cb83174a4aUL, 0x2aaea79ad7da34b0UL, }, { 0x8618bcbfcff334e0UL, 0x8208208259738741UL, }, { 0x99a6cd206b513bdcUL, 0x83f16f99175f6247UL, }, { 0x6297e291f4adcc3aUL, 0x294b124ed1181a84UL, }, { 0xce86db24aa0e48cUL, 0x2442c3221f3dc1aUL, }, { 0x9b696b666550119eUL, 0xe78fff4114466493UL, }, { 0x1b9e2febe84671c0UL, 0x3f562a96a2aa908UL, }, { 0xeb568d9e63d55a14UL, 0xcd78dbfd54a1436bUL, }, { 0xf73fdb3c06eaf756UL, 0xaae2ab6aaf144aafUL, }, { 0xfacabbbeed722b64UL, 0xccdd4e7b1ce38d0fUL, }, { 0xfcd6f526cddeebd4UL, 0xccc9c07ae11bcce3UL, }, { 0x1fb4754fa43bbf3cUL, 0x3e5e1ccb1bf89c6UL, }, { 0xeb3fb936dd1aa228UL, 0xcf64612f39c4323dUL, }, { 0x926f68f4172caea2UL, 0xe5da00893461b455UL, }, { 0xe4615febe8467196UL, 0xa95fc803c09556f7UL, }, { 0x981cf1dccb9d1fd2UL, 0xe78ae2a77b3e87b1UL, }, { 0x7782f7333504b244UL, 0x4e9826c74350bfe6UL, }, { 0x6fd777b6c15f72c6UL, 0x2912d4222a675b0aUL, }, { 0x7b22ee03c15c7384UL, 0x4cdc1ab0f0ab5b2eUL, }, { 0x96f8740f85956fd2UL, 0xe7d6682e58d237f1UL, }, { 0xf0d1382a55572458UL, 0xcc911696880d4909UL, }, { 0xe46143c933474626UL, 0xab4366b0764a0b4bUL, }, { 0xfb40c8c7fe68cf6aUL, 0xaaba68961da11d79UL, }, { 0x97849bb7f7de0d9eUL, 0xe7d77d718378aeb3UL, }, { 0x892fe9ca44601f62UL, 0xe62f327ccd5792ddUL, }, { 0xd13f9bd382e380eUL, 0x64231d9efb5729d6UL, }, { 0x93ab5c70638d3beeUL, 0xe5db5416ee209847UL, }, { 0x959811bd9a557220UL, 0x81b51ab7a5fe1499UL, }, { 0x693f6478eddb2834UL, 0x4d7cd7cc29d28cf2UL, }, { 0x678a4ee975a08406UL, 0x295ab4bb43072c12UL, }, { 0xbc9fa26a7e512ceUL, 0x6437818b95e2e76eUL, }, { 0xef9e1acd25989a26UL, 0xab0eead38eb165ebUL, }, { 0xf4f3f531c2d9be98UL, 0xcc8095241ae41171UL, }, { 0x10185b9b29b00000UL, 0x3ba7996db230c00UL, }, { 0x7a68a299022ddf34UL, 0x4cd9020746184ba2UL, }, { 0x8261f45338765990UL, 0x8210932010890d05UL, }, { 0xf80956ca3a5b86a4UL, 0xccc99127569146a7UL, }, { 0x7f14722e3db361faUL, 0x2a88e0fbb92f0c2cUL, }, { 0x871d24e407e8e76cUL, 0x824171dcefbe4a8bUL, }, { 0x6fb067f47d17578aUL, 0x29b11e87b8989fd8UL, }, { 0xf1336bc794533626UL, 0xab52f0323f47c90bUL, }, { 0xdb7ed8c3891e6faUL, 0x38b21c09fae1613cUL, }, { 0xa8711e202cdc3b5eUL, 0xe62e22af1f6bf32bUL, }, { 0xa8711e202cdc3b6cUL, 0x862e22af1f6bf32bUL, }, { 0x54f5986b801eeb82UL, 0x65cece94dacd5b1cUL, }, { 0xb1ef36f7c270bdacUL, 0x8e8cbdc6770aef73UL, }, { 0x1aadb85427b54520UL, 0x83f4672b23a92e49UL, }, { 0x0UL, 0x0UL, }, }; const mpfq_2_128_elt * ptr = t; unsigned int i,j; memset(r, 0, sizeof(mpfq_2_128_elt)); for(i = 0 ; i < 2 ; i++) { unsigned long a = s[i]; for(j = 0 ; j < 64 && ptr != &t[128]; j++, ptr++) { if (a & 1UL) { mpfq_2_128_add(K, r, r, *ptr); } a >>= 1; } } } /* *Mpfq::gf2n::linearops::code_for_trace */ static inline unsigned long mpfq_2_128_trace(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt s) { return ((s[1]>>63) ^ (s[1]>>57)) & 1; } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt_ur s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_elt, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set_elt(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt s) { memset(r, 0, sizeof(mpfq_2_128_elt_ur)); memcpy(r,s,sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_elt_ur_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r) { memset(r, 0, sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_set_ui */ static inline void mpfq_2_128_elt_ur_set_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_128_elt_ur) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_add */ static inline void mpfq_2_128_elt_ur_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur r, mpfq_2_128_src_elt_ur s1, mpfq_2_128_src_elt_ur s2) { int i; for(i = 0 ; i < 4 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::mul::code_for_mul_ur */ static inline void mpfq_2_128_mul_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur t, mpfq_2_128_src_elt s1, mpfq_2_128_src_elt s2) { gf2x_mul2(t, s1, s2); } /* *Mpfq::gf2n::squaring::code_for_sqr_ur */ static inline void mpfq_2_128_sqr_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur t, mpfq_2_128_src_elt s) { static const unsigned long g[16] = { 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85, }; { unsigned long u; u = g[s[0] & 15]; t[0] = u; u = g[s[0] >> 4 & 15]; t[0] ^= u << 8; u = g[s[0] >> 8 & 15]; t[0] ^= u << 16; u = g[s[0] >> 12 & 15]; t[0] ^= u << 24; u = g[s[0] >> 16 & 15]; t[0] ^= u << 32; u = g[s[0] >> 20 & 15]; t[0] ^= u << 40; u = g[s[0] >> 24 & 15]; t[0] ^= u << 48; u = g[s[0] >> 28 & 15]; t[0] ^= u << 56; u = g[s[0] >> 32 & 15]; t[1] = u; u = g[s[0] >> 36 & 15]; t[1] ^= u << 8; u = g[s[0] >> 40 & 15]; t[1] ^= u << 16; u = g[s[0] >> 44 & 15]; t[1] ^= u << 24; u = g[s[0] >> 48 & 15]; t[1] ^= u << 32; u = g[s[0] >> 52 & 15]; t[1] ^= u << 40; u = g[s[0] >> 56 & 15]; t[1] ^= u << 48; u = g[s[0] >> 60 & 15]; t[1] ^= u << 56; u = g[s[1] & 15]; t[2] = u; u = g[s[1] >> 4 & 15]; t[2] ^= u << 8; u = g[s[1] >> 8 & 15]; t[2] ^= u << 16; u = g[s[1] >> 12 & 15]; t[2] ^= u << 24; u = g[s[1] >> 16 & 15]; t[2] ^= u << 32; u = g[s[1] >> 20 & 15]; t[2] ^= u << 40; u = g[s[1] >> 24 & 15]; t[2] ^= u << 48; u = g[s[1] >> 28 & 15]; t[2] ^= u << 56; u = g[s[1] >> 32 & 15]; t[3] = u; u = g[s[1] >> 36 & 15]; t[3] ^= u << 8; u = g[s[1] >> 40 & 15]; t[3] ^= u << 16; u = g[s[1] >> 44 & 15]; t[3] ^= u << 24; u = g[s[1] >> 48 & 15]; t[3] ^= u << 32; u = g[s[1] >> 52 & 15]; t[3] ^= u << 40; u = g[s[1] >> 56 & 15]; t[3] ^= u << 48; u = g[s[1] >> 60 & 15]; t[3] ^= u << 56; } } /* *Mpfq::gf2n::reduction::code_for_reduce */ static inline void mpfq_2_128_reduce(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt r, mpfq_2_128_dst_elt_ur t) { { unsigned long z; z = t[3]; /* t[2],t[1] += z * X^128 = z * (X^7 + X^2 + X + 1) */ t[1] ^= (z << 7) ^ (z << 2) ^ (z << 1) ^ z; t[2] ^= (z >> 57) ^ (z >> 62) ^ (z >> 63); /* t[1],t[0] += z * X^128 = z * (X^7 + X^2 + X + 1) */ z = t[2]; r[0] = t[0] ^ (z << 7) ^ (z << 2) ^ (z << 1) ^ z; r[1] = t[1] ^ (z >> 57) ^ (z >> 62) ^ (z >> 63); } } /* *Mpfq::gf2n::trivialities::code_for_cmp */ static inline int mpfq_2_128_cmp(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt a, mpfq_2_128_src_elt b) { return memcmp(a, b, sizeof(mpfq_2_128_elt)); } /* *Mpfq::gf2n::trivialities::code_for_cmp_ui */ static inline int mpfq_2_128_cmp_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r, unsigned long x) { int i; if (r[0] < (x & 1UL)) return -1; if (r[0] > (x & 1UL)) return 1; for(i = 1 ; i < 2 ; i++) { if (r[i]) return 1; } return 0; } /* *Mpfq::defaults::flatdata::code_for_is_zero, Mpfq::gf2n::trivialities */ static inline int mpfq_2_128_is_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_elt r) { unsigned int i; for(i = 0 ; i < sizeof(mpfq_2_128_elt)/sizeof(r[0]) ; i++) { if (r[i]) return 0; } return 1; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec r, mpfq_2_128_src_vec s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_128_elt)); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_setcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_elt x, unsigned int i) { mpfq_2_128_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff_ui, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_setcoeff_ui(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, unsigned long x, unsigned int i) { mpfq_2_128_set_ui(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_getcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt x, mpfq_2_128_src_vec w, unsigned int i) { mpfq_2_128_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_add, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_neg, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_neg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_rev, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_rev(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_128_elt tmp[1]; mpfq_2_128_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_128_set(K, tmp[0], u[i]); mpfq_2_128_set(K, w[i], u[n-1-i]); mpfq_2_128_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_128_set(K, w[nn], u[nn]); mpfq_2_128_clear(K, tmp); } /* *Mpfq::defaults::vec::addsub::code_for_vec_sub, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_sub(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_scal_mul(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, mpfq_2_128_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_mul(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv */ static inline void mpfq_2_128_vec_conv(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_src_vec u, unsigned int n, mpfq_2_128_src_vec v, unsigned int m) { mpfq_2_128_vec_ur tmp; mpfq_2_128_vec_ur_init(K, &tmp, m+n-1); mpfq_2_128_vec_conv_ur(K, tmp, u, n, v, m); mpfq_2_128_vec_reduce(K, w, tmp, m+n-1); mpfq_2_128_vec_ur_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::vec::getset::code_for_vec_cmp, Mpfq::defaults::vec */ static inline int mpfq_2_128_vec_cmp(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) { int ret = mpfq_2_128_cmp(K, u[i], v[i]); if (ret != 0) return ret; } return 0; } /* *Mpfq::defaults::vec::getset::code_for_vec_is_zero, Mpfq::defaults::vec */ static inline int mpfq_2_128_vec_is_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec r, unsigned int n) { unsigned int i; for(i = 0 ; i < n ; i+=1) { if (!mpfq_2_128_is_zero(K,r[i])) return 0; } return 1; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_vec mpfq_2_128_vec_subvec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_vec mpfq_2_128_vec_subvec_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_elt mpfq_2_128_vec_coeff_ptr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_elt mpfq_2_128_vec_coeff_ptr_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_ur_set_zero(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_set_vec, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_set_vec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_set_elt(K, w[i], u[i]); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_128_vec_ur_set(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur r, mpfq_2_128_src_vec_ur s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_128_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_setcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_elt_ur x, unsigned int i) { mpfq_2_128_elt_ur_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_getcoeff(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_elt_ur x, mpfq_2_128_src_vec_ur w, unsigned int i) { mpfq_2_128_elt_ur_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_add, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_add(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, mpfq_2_128_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_sub, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_sub(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, mpfq_2_128_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_elt_ur_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_neg, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_neg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_128_elt_ur_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_rev, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_ur_rev(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec_ur u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_128_elt_ur tmp[1]; mpfq_2_128_elt_ur_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_128_elt_ur_set(K, tmp[0], u[i]); mpfq_2_128_elt_ur_set(K, w[i], u[n-1-i]); mpfq_2_128_elt_ur_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_128_elt_ur_set(K, w[nn], u[nn]); mpfq_2_128_elt_ur_clear(K, tmp); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul_ur, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_scal_mul_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, mpfq_2_128_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_mul_ur(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ /* Triggered by: vec_conv_ur */ static inline void mpfq_2_128_vec_conv_ur_n(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, mpfq_2_128_src_vec v, unsigned int n) { if (n == 0) return; if (n == 1) { mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); return; } if (n == 2) { // Kara 2 mpfq_2_128_elt t1, t2; mpfq_2_128_init(K, &t1); mpfq_2_128_init(K, &t2); mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); mpfq_2_128_mul_ur(K, w[2], u[1], v[1]); mpfq_2_128_add(K, t1, u[0], u[1]); mpfq_2_128_add(K, t2, v[0], v[1]); mpfq_2_128_mul_ur(K, w[1], t1, t2); mpfq_2_128_elt_ur_sub(K, w[1], w[1], w[0]); mpfq_2_128_elt_ur_sub(K, w[1], w[1], w[2]); mpfq_2_128_clear(K, &t1); mpfq_2_128_clear(K, &t2); return; } if (n == 3) { // do it in 6 mpfq_2_128_elt t1, t2; mpfq_2_128_elt_ur s; mpfq_2_128_init(K, &t1); mpfq_2_128_init(K, &t2); mpfq_2_128_elt_ur_init(K, &s); // a0*b0*(1 - X) mpfq_2_128_mul_ur(K, w[0], u[0], v[0]); mpfq_2_128_elt_ur_neg(K, w[1], w[0]); // a1*b1*(-X + 2*X^2 - X^3) mpfq_2_128_mul_ur(K, w[2], u[1], v[1]); mpfq_2_128_elt_ur_neg(K, w[3], w[2]); mpfq_2_128_elt_ur_add(K, w[2], w[2], w[2]); mpfq_2_128_elt_ur_add(K, w[1], w[1], w[3]); // a2*b2*(-X^3+X^4) mpfq_2_128_mul_ur(K, w[4], u[2], v[2]); mpfq_2_128_elt_ur_sub(K, w[3], w[3], w[4]); // (a0+a1)*(b0+b1)*(X - X^2) mpfq_2_128_add(K, t1, u[0], u[1]); mpfq_2_128_add(K, t2, v[0], v[1]); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[1], w[1], s); mpfq_2_128_elt_ur_sub(K, w[2], w[2], s); // (a1+a2)*(b1+b2)*(X^3 - X^2) mpfq_2_128_add(K, t1, u[1], u[2]); mpfq_2_128_add(K, t2, v[1], v[2]); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[3], w[3], s); mpfq_2_128_elt_ur_sub(K, w[2], w[2], s); // (a0+a1+a2)*(b0+b1+b2)* X^2 mpfq_2_128_add(K, t1, u[0], t1); mpfq_2_128_add(K, t2, v[0], t2); mpfq_2_128_mul_ur(K, s, t1, t2); mpfq_2_128_elt_ur_add(K, w[2], w[2], s); return; } unsigned int n0, n1; n0 = n / 2; n1 = n - n0; mpfq_2_128_vec_conv_ur_n(K, w, u, v, n0); mpfq_2_128_vec_conv_ur_n(K, w + 2*n0, u + n0, v + n0, n1); mpfq_2_128_elt_ur_set_ui(K, w[2*n0-1], 0); mpfq_2_128_vec tmpu, tmpv; mpfq_2_128_vec_ur tmpw; mpfq_2_128_vec_init(K, &tmpu, n1); mpfq_2_128_vec_init(K, &tmpv, n1); mpfq_2_128_vec_ur_init(K, &tmpw, 2*n1-1); mpfq_2_128_vec_set(K, tmpu, u, n0); if (n1 != n0) mpfq_2_128_set_ui(K, tmpu[n0], 0); mpfq_2_128_vec_add(K, tmpu, tmpu, u+n0, n1); mpfq_2_128_vec_set(K, tmpv, v, n0); if (n1 != n0) mpfq_2_128_set_ui(K, tmpv[n0], 0); mpfq_2_128_vec_add(K, tmpv, tmpv, v+n0, n1); mpfq_2_128_vec_conv_ur_n(K, tmpw, tmpu, tmpv, n1); mpfq_2_128_vec_ur_sub(K, tmpw, tmpw, w, 2*n0-1); mpfq_2_128_vec_ur_sub(K, tmpw, tmpw, w + 2*n0, 2*n1-1); mpfq_2_128_vec_ur_add(K, w + n0, w + n0, tmpw, 2*n1-1); mpfq_2_128_vec_clear(K, &tmpu, n1); mpfq_2_128_vec_clear(K, &tmpv, n1); mpfq_2_128_vec_ur_clear(K, &tmpw, 2*n1-1); return; } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ static inline void mpfq_2_128_vec_conv_ur(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur w, mpfq_2_128_src_vec u, unsigned int n, mpfq_2_128_src_vec v, unsigned int m) { unsigned int i, j MAYBE_UNUSED, k; mpfq_2_128_elt_ur acc, z; mpfq_2_128_elt_ur_init(K, &acc); mpfq_2_128_elt_ur_init(K, &z); // swap pointers to have n <= m mpfq_2_128_src_vec uu, vv; if (n <= m) { uu = u; vv = v; } else { uu = v; vv = u; unsigned int tmp = n; n = m; m = tmp; } for(k = 0; k < n; ++k) { mpfq_2_128_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i <= k; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } for(k = n; k < m; ++k) { mpfq_2_128_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i < n; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } for(k = m; k < n+m-1; ++k) { mpfq_2_128_mul_ur(K, acc, uu[k-m+1], vv[m-1]); for(i = k-m+2; i < n; ++i) { mpfq_2_128_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_128_elt_ur_add(K, acc, acc, z); } mpfq_2_128_elt_ur_set(K, w[k], acc); } mpfq_2_128_elt_ur_clear(K, &acc); mpfq_2_128_elt_ur_clear(K, &z); } /* *Mpfq::defaults::vec::mul::code_for_vec_reduce, Mpfq::defaults::vec */ static inline void mpfq_2_128_vec_reduce(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec w, mpfq_2_128_dst_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_128_reduce(K, w[i], u[i]); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_vec_ur mpfq_2_128_vec_ur_subvec(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_vec_ur mpfq_2_128_vec_ur_subvec_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_128_dst_elt mpfq_2_128_vec_ur_coeff_ptr(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_dst_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_128_src_elt mpfq_2_128_vec_ur_coeff_ptr_const(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::poly::code_for_poly_init */ static inline void mpfq_2_128_poly_init(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_poly p, unsigned int n) { mpfq_2_128_vec_init(k, &(p->c), n); p->alloc=n; p->size=0; } /* *Mpfq::defaults::poly::code_for_poly_clear */ static inline void mpfq_2_128_poly_clear(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_poly p) { mpfq_2_128_vec_clear(k, &(p->c), p->alloc); } /* *Mpfq::defaults::poly::code_for_poly_set */ static inline void mpfq_2_128_poly_set(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u) { if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_128_vec_set(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_setcoeff */ static inline void mpfq_2_128_poly_setcoeff(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_elt x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_128_vec_set_zero(k, mpfq_2_128_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_128_vec_setcoeff(k, w->c, x, i); w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_setcoeff_ui */ static inline void mpfq_2_128_poly_setcoeff_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, unsigned long x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_128_vec_set_zero(k, mpfq_2_128_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, i); w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_getcoeff */ static inline void mpfq_2_128_poly_getcoeff(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_elt x, mpfq_2_128_src_poly w, unsigned int i) { if (w->size < (i+1)) { mpfq_2_128_set_ui(k,x,0); } else { mpfq_2_128_vec_getcoeff(k, x, w->c, i); } } /* *Mpfq::defaults::poly::code_for_poly_deg */ static inline int mpfq_2_128_poly_deg(mpfq_2_128_dst_field K MAYBE_UNUSED, mpfq_2_128_src_poly w) { if (w->size == 0) return -1; int deg = w->size-1; mpfq_2_128_elt temp; mpfq_2_128_init(K, &temp); mpfq_2_128_vec_getcoeff(K, temp, w->c, deg); int comp=mpfq_2_128_cmp_ui(K, temp, 0); while ((deg >= 0) && (comp == 0)){ deg--; if (deg>=0) { mpfq_2_128_vec_getcoeff(K, temp, w->c, deg); comp=mpfq_2_128_cmp_ui(K, temp, 0); } } mpfq_2_128_clear(K, &temp); return deg; } /* *Mpfq::defaults::poly::code_for_poly_add */ static inline void mpfq_2_128_poly_add(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_128_vec_add(k, w->c, u->c, v->c, su); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, su), mpfq_2_128_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_128_vec_add(k, w->c, u->c, v->c, sv); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, sv), mpfq_2_128_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_sub */ static inline void mpfq_2_128_poly_sub(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_128_vec_sub(k, w->c, u->c, v->c, su); mpfq_2_128_vec_neg(k, mpfq_2_128_vec_subvec(k, w->c, su), mpfq_2_128_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_128_vec_sub(k, w->c, u->c, v->c, sv); mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, sv), mpfq_2_128_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_set_ui */ static inline void mpfq_2_128_poly_set_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, unsigned long x) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_add_ui */ static inline void mpfq_2_128_poly_add_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_128_poly_deg(k, w); return; } if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, 1), mpfq_2_128_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_128_add_ui(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), mpfq_2_128_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_sub_ui */ static inline void mpfq_2_128_poly_sub_ui(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_128_elt temp; mpfq_2_128_init(k, &temp); mpfq_2_128_set_ui(k, temp, x); mpfq_2_128_neg(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), temp); w->size = mpfq_2_128_cmp_ui(k, temp, 0); mpfq_2_128_clear(k, &temp); return; } if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_128_vec_set(k, mpfq_2_128_vec_subvec(k, w->c, 1), mpfq_2_128_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_128_sub_ui(k, mpfq_2_128_vec_coeff_ptr(k, w->c, 0), mpfq_2_128_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_neg */ static inline void mpfq_2_128_poly_neg(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u) { if (w->alloc < u->size) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_128_vec_neg(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_scal_mul */ static inline void mpfq_2_128_poly_scal_mul(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_elt x) { if (mpfq_2_128_cmp_ui(k, x, 0) == 0) { w->size = 0; return; } unsigned int n = u->size; if (w->alloc < n) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, n); w->alloc = n; } mpfq_2_128_vec_scal_mul(k, w->c, u->c, x, n); w->size=n; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_mul */ static inline void mpfq_2_128_poly_mul(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly w, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { unsigned int usize = mpfq_2_128_poly_deg(k, u)+1; unsigned int vsize = mpfq_2_128_poly_deg(k, v)+1; if ((usize == 0) || (vsize == 0)) { w->size = 0; return; } unsigned int wsize = usize + vsize - 1; if (w->alloc < wsize) { mpfq_2_128_vec_reinit(k, &(w->c), w->alloc, wsize); w->alloc = wsize; } mpfq_2_128_vec_conv(k, w->c, u->c, usize, v->c, vsize); w->size=wsize; w->size = 1 + mpfq_2_128_poly_deg(k, w); } /* *Mpfq::defaults::polygcd::code_for_poly_gcd, Mpfq::defaults::poly */ static inline void mpfq_2_128_poly_gcd(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly g, mpfq_2_128_src_poly a0, mpfq_2_128_src_poly b0) { mpfq_2_128_poly a,b,q,r; int da0=mpfq_2_128_poly_deg(k,a0), db0=mpfq_2_128_poly_deg(k,b0); if (db0==-1) mpfq_2_128_poly_set(k,g,a0); else { mpfq_2_128_poly_init(k,a,da0+1); mpfq_2_128_poly_init(k,b,db0+1); mpfq_2_128_poly_init(k,q,1); mpfq_2_128_poly_init(k,r,db0); mpfq_2_128_poly_set(k,a,a0); mpfq_2_128_poly_set(k,b,b0); while (mpfq_2_128_poly_deg(k,b)>=0) { mpfq_2_128_poly_divmod(k,q,r,a,b); mpfq_2_128_poly_set(k,a,b); mpfq_2_128_poly_set(k,b,r); } mpfq_2_128_poly_setmonic(k,g,a); mpfq_2_128_poly_clear(k,a); mpfq_2_128_poly_clear(k,b); mpfq_2_128_poly_clear(k,q); mpfq_2_128_poly_clear(k,r); } } /* *Mpfq::defaults::polygcd::code_for_poly_xgcd, Mpfq::defaults::poly */ static inline void mpfq_2_128_poly_xgcd(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_dst_poly g, mpfq_2_128_dst_poly u0, mpfq_2_128_dst_poly v0, mpfq_2_128_src_poly a0, mpfq_2_128_src_poly b0) { mpfq_2_128_poly a,b,u,v,w,x,q,r; mpfq_2_128_elt c; mpfq_2_128_init(k,&c); mpfq_2_128_set_ui(k,c,0); /* placate gcc */ int da0=mpfq_2_128_poly_deg(k,a0), db0=mpfq_2_128_poly_deg(k,b0), dega; if (db0==-1) { if (da0==-1) { mpfq_2_128_poly_set(k,u0,a0); mpfq_2_128_poly_set(k,v0,b0); mpfq_2_128_poly_set(k,g,a0); } else { mpfq_2_128_poly_getcoeff(k,c,a0,da0); mpfq_2_128_inv(k,c,c); mpfq_2_128_poly_scal_mul(k,g,a0,c); mpfq_2_128_poly_set(k,v0,b0); mpfq_2_128_poly_set(k,u0,b0); mpfq_2_128_poly_setcoeff(k,u0,c,0); } } else { mpfq_2_128_poly_init(k,a,da0+1); mpfq_2_128_poly_init(k,b,db0+1); mpfq_2_128_poly_init(k,q,1); mpfq_2_128_poly_init(k,r,db0); mpfq_2_128_poly_set(k,a,a0); mpfq_2_128_poly_set(k,b,b0); mpfq_2_128_poly_init(k,u,1); mpfq_2_128_poly_init(k,v,1); mpfq_2_128_poly_init(k,w,1); mpfq_2_128_poly_init(k,x,1); mpfq_2_128_poly_setcoeff_ui(k,u,1,0); mpfq_2_128_poly_setcoeff_ui(k,x,1,0); /* u*a_initial + v*b_initial = a */ /* w*a_initial + x*b_initial = b */ while (mpfq_2_128_poly_deg(k,b)>=0) { mpfq_2_128_poly_divmod(k,q,r,a,b); mpfq_2_128_poly_set(k,a,b); /* a,b <- b,a-qb=r */ mpfq_2_128_poly_set(k,b,r); mpfq_2_128_poly_mul(k,r,q,w); mpfq_2_128_poly_sub(k,r,u,r); mpfq_2_128_poly_set(k,u,w); /* u,w <- w,u-qw */ mpfq_2_128_poly_set(k,w,r); mpfq_2_128_poly_mul(k,r,q,x); /* v,x <- x,v-qx */ mpfq_2_128_poly_sub(k,r,v,r); mpfq_2_128_poly_set(k,v,x); mpfq_2_128_poly_set(k,x,r); } dega=mpfq_2_128_poly_deg(k,a); mpfq_2_128_poly_getcoeff(k,c,a,dega); mpfq_2_128_inv(k,c,c); mpfq_2_128_poly_scal_mul(k,g,a,c); mpfq_2_128_poly_scal_mul(k,u0,u,c); mpfq_2_128_poly_scal_mul(k,v0,v,c); mpfq_2_128_poly_clear(k,a); mpfq_2_128_poly_clear(k,b); mpfq_2_128_poly_clear(k,u); mpfq_2_128_poly_clear(k,v); mpfq_2_128_poly_clear(k,w); mpfq_2_128_poly_clear(k,x); mpfq_2_128_poly_clear(k,q); mpfq_2_128_poly_clear(k,r); } mpfq_2_128_clear(k,&c); } /* *Mpfq::defaults::poly::code_for_poly_cmp */ static inline int mpfq_2_128_poly_cmp(mpfq_2_128_dst_field k MAYBE_UNUSED, mpfq_2_128_src_poly u, mpfq_2_128_src_poly v) { if (u->size != v->size) return (int)(u->size) - (int)(v->size); else return mpfq_2_128_vec_cmp(k, u->c, v->c, u->size); } #endif /* MPFQ_2_128_H_ */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/x86_64/mpfq_2_64.c0000644000327606072450000002410513125214701013502 00000000000000/* MPFQ generated file -- do not edit */ #include "mpfq_2_64.h" /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^64) */ /* Definition polynomial P = X^64 + X^4 + X^3 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 64, 4, 3, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=64, no_gmp=1, output_path=x86_64, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_64, w=64, } */ /* Functions operating on the field structure */ /* Element allocation functions */ /* Elementary assignment functions */ /* Assignment of random values */ /* Arithmetic operations on elements */ /* missing powz */ /* Operations involving unreduced elements */ /* Comparison functions */ /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ /* *Mpfq::defaults::vec::alloc::code_for_vec_init, Mpfq::defaults::vec */ void mpfq_2_64_vec_init(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n) { unsigned int i; *v = (mpfq_2_64_vec) malloc (n*sizeof(mpfq_2_64_elt)); for(i = 0; i < n; i++) mpfq_2_64_init(K, (*v) + i); } /* *Mpfq::defaults::vec::alloc::code_for_vec_reinit, Mpfq::defaults::vec */ void mpfq_2_64_vec_reinit(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n, unsigned int m) { if (n < m) { // increase size unsigned int i; *v = (mpfq_2_64_vec) realloc (*v, m * sizeof(mpfq_2_64_elt)); for(i = n; i < m; i+=1) mpfq_2_64_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_64_clear(K, (*v) + i); *v = (mpfq_2_64_vec) realloc (*v, m * sizeof(mpfq_2_64_elt)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_clear, Mpfq::defaults::vec */ void mpfq_2_64_vec_clear(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_clear(K, (*v) + i); free(*v); } /* missing vec_random */ /* missing vec_random2 */ /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_init, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_init(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n) { unsigned int i; *v = (mpfq_2_64_vec_ur) malloc (n*sizeof(mpfq_2_64_elt_ur)); for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_init(K, &( (*v)[i])); } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_reinit, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_reinit(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n, unsigned int m) { if (n < m) { // increase size *v = (mpfq_2_64_vec_ur) realloc (*v, m * sizeof(mpfq_2_64_elt_ur)); unsigned int i; for(i = n; i < m; i+=1) mpfq_2_64_elt_ur_init(K, (*v) + i); } else if (m < n) { // decrease size unsigned int i; for(i = m; i < n; i+=1) mpfq_2_64_elt_ur_clear(K, (*v) + i); *v = (mpfq_2_64_vec_ur) realloc (*v, m * sizeof(mpfq_2_64_elt_ur)); } } /* *Mpfq::defaults::vec::alloc::code_for_vec_ur_clear, Mpfq::defaults::vec */ void mpfq_2_64_vec_ur_clear(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_vec_ur * v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_clear(K, &( (*v)[i])); free(*v); } /* Polynomial functions */ /* *Mpfq::defaults::poly::code_for_poly_setmonic */ void mpfq_2_64_poly_setmonic(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p) { long degp = mpfq_2_64_poly_deg(K, p); if (degp == -1) { q->size = 0; return; } if (degp == 0) { mpfq_2_64_elt aux; mpfq_2_64_init(K, &aux); mpfq_2_64_set_ui(K, aux, 1); mpfq_2_64_poly_setcoeff(K, q, aux, 0); mpfq_2_64_clear(K, &aux); q->size = 1; return; } mpfq_2_64_elt lc; /* spurious uninit warning sometimes */ mpfq_2_64_init(K, &lc); mpfq_2_64_poly_getcoeff(K, lc, p, degp); mpfq_2_64_inv(K, lc, lc); mpfq_2_64_poly_setcoeff_ui(K, q, 1, degp); mpfq_2_64_vec_scal_mul(K, q->c, p->c, lc, degp); q->size = degp+1; mpfq_2_64_clear(K, &lc); } /* *Mpfq::defaults::poly::code_for_poly_divmod */ int mpfq_2_64_poly_divmod(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_dst_poly r, mpfq_2_64_src_poly a, mpfq_2_64_src_poly b) { if (b->size == 0) { return 0; } if (a->size == 0) { q->size = 0; r->size = 0; return 1; } int dega = mpfq_2_64_poly_deg(K, a); if (dega<0) { q->size = 0; r->size = 0; return 1; } // Compute deg b and inverse of leading coef int degb = mpfq_2_64_poly_deg(K, b); if (degb<0) { return 0; } if (degb > dega) { q->size=0; mpfq_2_64_poly_set(K, r, a); return 1; } int bmonic; mpfq_2_64_elt ilb; mpfq_2_64_init(K, &ilb); mpfq_2_64_elt temp; mpfq_2_64_init(K, &temp); mpfq_2_64_poly_getcoeff(K, temp, b, degb); if (mpfq_2_64_cmp_ui(K, temp, 1) == 0) { mpfq_2_64_set_ui(K, ilb, 1); bmonic = 1; } else { mpfq_2_64_inv(K, ilb, temp); bmonic = 0; } mpfq_2_64_poly qq, rr; mpfq_2_64_poly_init(K, qq, dega-degb+1); mpfq_2_64_poly_init(K, rr, dega); mpfq_2_64_poly_set(K, rr, a); mpfq_2_64_elt aux, aux2; mpfq_2_64_init(K, &aux); mpfq_2_64_init(K, &aux2); int i; int j; for (i = dega; i >= (int)degb; --i) { mpfq_2_64_poly_getcoeff(K, aux, rr, i); if (!bmonic) mpfq_2_64_mul(K, aux, aux, ilb); mpfq_2_64_poly_setcoeff(K, qq, aux, i-degb); for (j = i-1; j >= (int)(i - degb); --j) { mpfq_2_64_poly_getcoeff(K, temp, b, j-i+degb); mpfq_2_64_mul(K, aux2, aux, temp); mpfq_2_64_poly_getcoeff(K, temp, rr, j); mpfq_2_64_sub(K, temp, temp, aux2); mpfq_2_64_poly_setcoeff(K, rr, temp, j); } } rr->size = degb; int degr = mpfq_2_64_poly_deg(K, rr); rr->size = degr+1; if (q != NULL) mpfq_2_64_poly_set(K, q, qq); if (r != NULL) mpfq_2_64_poly_set(K, r, rr); mpfq_2_64_clear(K, &temp); mpfq_2_64_clear(K, &ilb); mpfq_2_64_clear(K, &aux); mpfq_2_64_clear(K, &aux2); mpfq_2_64_poly_clear(K, rr); mpfq_2_64_poly_clear(K, qq); return 1; } static void mpfq_2_64_poly_preinv(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned int); /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ /* Triggered by: poly_precomp_mod */ static void mpfq_2_64_poly_preinv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p, unsigned int n) { // Compute the inverse of p(x) modulo x^n // Newton iteration: x_{n+1} = x_n + x_n(1 - a*x_n) // Requires p(0) = 1 // Assume p != q (no alias) mpfq_2_64_elt temp; /* spurious uninit warning sometimes */ mpfq_2_64_init(K, &temp); mpfq_2_64_poly_getcoeff(K, temp, p, 0);//Should be in the assert assert( mpfq_2_64_cmp_ui(K, temp, 1) == 0); assert (p != q); int m; if (n <= 2) { mpfq_2_64_poly_setcoeff_ui(K, q, 1, 0); q->size = 1; m = 1; if (n == 1) return; } else { // n >= 3: recursive call at prec m = ceil(n/2) m = 1 + ((n-1)/2); mpfq_2_64_poly_preinv(K, q, p, m); } // enlarge q if necessary if (q->alloc < n) { mpfq_2_64_vec_reinit(K, &(q->c), q->alloc, n); q->alloc = n; } // refine value mpfq_2_64_vec tmp; mpfq_2_64_vec_init(K, &tmp, m+n-1); mpfq_2_64_vec_conv(K, tmp, p->c, MIN(n, p->size), q->c, m); int nn = MIN(n, MIN(n, p->size) + m -1); mpfq_2_64_vec_neg(K, tmp, tmp, nn); mpfq_2_64_vec_getcoeff(K, temp, tmp, 0); mpfq_2_64_add_ui(K, temp, temp, 1); mpfq_2_64_vec_setcoeff(K, tmp, temp, 0); mpfq_2_64_vec_conv(K, tmp, q->c, m, tmp, nn); mpfq_2_64_vec_set(K, mpfq_2_64_vec_subvec(K, q->c, m), mpfq_2_64_vec_subvec(K, tmp, m), n-m); q->size = n; mpfq_2_64_clear(K, &temp); mpfq_2_64_vec_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::poly::code_for_poly_precomp_mod */ void mpfq_2_64_poly_precomp_mod(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly q, mpfq_2_64_src_poly p) { assert(p != q); int N = mpfq_2_64_poly_deg(K, p); mpfq_2_64_poly rp; mpfq_2_64_poly_init(K, rp, N+1); mpfq_2_64_vec_rev(K, rp->c, p->c, N+1); rp->size = N+1; mpfq_2_64_poly_preinv(K, q, rp, N); mpfq_2_64_poly_clear(K, rp); } /* *Mpfq::defaults::poly::code_for_poly_mod_pre */ void mpfq_2_64_poly_mod_pre(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_poly r, mpfq_2_64_src_poly q, mpfq_2_64_src_poly p, mpfq_2_64_src_poly irp) { int N = mpfq_2_64_poly_deg(K, p); int degq = mpfq_2_64_poly_deg(K, q); if (degq < N) { mpfq_2_64_poly_set(K, r, q); return; } int m = degq - N; assert (degq <= 2*N-2); mpfq_2_64_poly revq; mpfq_2_64_poly_init(K, revq, MAX(degq+1, m+1)); mpfq_2_64_vec_rev(K, revq->c, q->c, degq+1); revq->size = q->size; mpfq_2_64_poly_mul(K, revq, revq, irp); mpfq_2_64_vec_rev(K, revq->c, revq->c, m+1); revq->size = m+1; mpfq_2_64_poly_mul(K, revq, revq, p); mpfq_2_64_poly_sub(K, r, q, revq); r->size = mpfq_2_64_poly_deg(K, r)+1; mpfq_2_64_poly_clear(K, revq); } /* missing poly_random */ /* missing poly_random2 */ /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/x86_64/mpfq_2_64.h0000644000327606072450000016771513125214702013527 00000000000000#ifndef MPFQ_2_64_H_ #define MPFQ_2_64_H_ /* MPFQ generated file -- do not edit */ #include "gf2x.h" #include "gf2x/gf2x-small.h" #include "mpfq.h" #include "mpfq_gf2n_common.h" #include #include #include #include #include #include #include #include #include "assert.h" #ifdef MPFQ_LAST_GENERATED_TAG #undef MPFQ_LAST_GENERATED_TAG #endif #define MPFQ_LAST_GENERATED_TAG 2_64 /* Active handler: Mpfq::defaults */ /* Active handler: Mpfq::defaults::vec */ /* Active handler: Mpfq::gf2n::field */ /* Automatically generated code for GF(2^64) */ /* Definition polynomial P = X^64 + X^4 + X^3 + X + 1 */ /* Active handler: Mpfq::gf2n::trivialities */ /* Active handler: Mpfq::gf2n::io */ /* Active handler: Mpfq::gf2n::linearops */ /* Active handler: Mpfq::gf2n::inversion */ /* Active handler: Mpfq::gf2n::reduction */ /* Active handler: Mpfq::gf2n::mul */ /* Active handler: Mpfq::defaults::poly */ /* Options used:{ coeffs=[ 64, 4, 3, 1, 0, ], helper=/tmp/mpfq-cado/gf2n/helper/helper, n=64, no_gmp=1, output_path=x86_64, slice=4, table=/tmp/mpfq-cado/gf2x/wizard.table, tag=2_64, w=64, } */ typedef mpfq_2_field mpfq_2_64_field; typedef mpfq_2_dst_field mpfq_2_64_dst_field; typedef unsigned long mpfq_2_64_elt[1]; typedef unsigned long * mpfq_2_64_dst_elt; typedef const unsigned long * mpfq_2_64_src_elt; typedef unsigned long mpfq_2_64_elt_ur[2]; typedef unsigned long * mpfq_2_64_dst_elt_ur; typedef const unsigned long * mpfq_2_64_src_elt_ur; typedef mpfq_2_64_elt * mpfq_2_64_vec; typedef mpfq_2_64_elt * mpfq_2_64_dst_vec; typedef mpfq_2_64_elt * mpfq_2_64_src_vec; typedef mpfq_2_64_elt_ur * mpfq_2_64_vec_ur; typedef mpfq_2_64_elt_ur * mpfq_2_64_dst_vec_ur; typedef mpfq_2_64_elt_ur * mpfq_2_64_src_vec_ur; typedef struct { mpfq_2_64_vec c; unsigned int alloc; unsigned int size; } mpfq_2_64_poly_struct; typedef mpfq_2_64_poly_struct mpfq_2_64_poly [1]; typedef mpfq_2_64_poly_struct * mpfq_2_64_dst_poly; typedef mpfq_2_64_poly_struct * mpfq_2_64_src_poly; #ifdef __cplusplus extern "C" { #endif /* *Mpfq::defaults::code_for_impl_name */ #define mpfq_2_64_impl_name() "2_64" /* *Mpfq::gf2n::field::code_for_impl_max_characteristic_bits */ #define mpfq_2_64_impl_max_characteristic_bits() 2 /* *Mpfq::gf2n::field::code_for_impl_max_degree */ #define mpfq_2_64_impl_max_degree() 1 /* Functions operating on the field structure */ /* *Mpfq::gf2n::field::code_for_field_characteristic_bits */ #define mpfq_2_64_field_characteristic_bits(f) 1 /* *Mpfq::gf2n::field::code_for_field_degree */ #define mpfq_2_64_field_degree(f) 64 static inline void mpfq_2_64_field_init(mpfq_2_64_dst_field); /* *Mpfq::gf2n::field::code_for_field_clear */ #define mpfq_2_64_field_clear(K) /**/ /* *Mpfq::gf2n::field::code_for_field_specify */ #define mpfq_2_64_field_specify(k, dummy, vp) /**/ static inline void mpfq_2_64_field_setopt(mpfq_2_64_dst_field, unsigned long, void *); /* Element allocation functions */ /* *Mpfq::defaults::flatdata::code_for_init, Mpfq::gf2n::trivialities */ #define mpfq_2_64_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_64_clear(f, px) /**/ /* Elementary assignment functions */ static inline void mpfq_2_64_set(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, unsigned long); static inline void mpfq_2_64_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_elt); static inline unsigned long mpfq_2_64_get_ui(mpfq_2_64_dst_field, mpfq_2_64_src_elt); static inline void mpfq_2_64_set_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, unsigned long); static inline void mpfq_2_64_set_uipoly_wide(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, const unsigned long *, unsigned int); static inline unsigned long mpfq_2_64_get_uipoly(mpfq_2_64_dst_field, mpfq_2_64_src_elt); static inline void mpfq_2_64_get_uipoly_wide(mpfq_2_64_dst_field, unsigned long *, mpfq_2_64_src_elt); /* Assignment of random values */ /* Arithmetic operations on elements */ static inline void mpfq_2_64_add(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, mpfq_2_64_src_elt); /* *Mpfq::gf2n::trivialities::code_for_sub */ #define mpfq_2_64_sub(K, r, s1, s2) mpfq_2_64_add(K,r,s1,s2) /* *Mpfq::gf2n::trivialities::code_for_neg */ #define mpfq_2_64_neg(K, r, s) mpfq_2_64_set(K,r,s) static inline void mpfq_2_64_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_sqr(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); /* *Mpfq::gf2n::trivialities::code_for_is_sqr */ #define mpfq_2_64_is_sqr(f, p) 1 static inline int mpfq_2_64_sqrt(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_pow(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long *, size_t); /* missing powz */ /* *Mpfq::gf2n::trivialities::code_for_frobenius */ #define mpfq_2_64_frobenius(K, r, s) mpfq_2_64_sqr(K,r,s) static inline void mpfq_2_64_add_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_ui */ #define mpfq_2_64_sub_ui(K, r, s1, s2) mpfq_2_64_add_ui(K,r,s1,s2) static inline void mpfq_2_64_mul_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); static inline void mpfq_2_64_add_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); /* *Mpfq::gf2n::trivialities::code_for_sub_uipoly */ #define mpfq_2_64_sub_uipoly(K, r, s1, s2) mpfq_2_64_add_uipoly(K,r,s1,s2) static inline void mpfq_2_64_mul_uipoly(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt, unsigned long); static inline void mpfq_2_64_longshift_left(unsigned long *, const unsigned long *, int, int); static inline void mpfq_2_64_longaddshift_left(unsigned long *, const unsigned long *, int, int); static inline int mpfq_2_64_inv(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_as_solve(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_elt); static inline unsigned long mpfq_2_64_trace(mpfq_2_64_dst_field, mpfq_2_64_src_elt); /* Operations involving unreduced elements */ /* *Mpfq::defaults::flatdata::code_for_elt_ur_init, Mpfq::gf2n::trivialities */ #define mpfq_2_64_elt_ur_init(f, px) /**/ /* *Mpfq::defaults::flatdata::code_for_elt_ur_clear, Mpfq::gf2n::trivialities */ #define mpfq_2_64_elt_ur_clear(f, px) /**/ static inline void mpfq_2_64_elt_ur_set(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt_ur); static inline void mpfq_2_64_elt_ur_set_elt(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt); static inline void mpfq_2_64_elt_ur_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur); static inline void mpfq_2_64_elt_ur_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, unsigned long); static inline void mpfq_2_64_elt_ur_add(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt_ur, mpfq_2_64_src_elt_ur); /* *Mpfq::gf2n::trivialities::code_for_elt_ur_neg */ #define mpfq_2_64_elt_ur_neg(K, r, s) mpfq_2_64_elt_ur_set(K,r,s) /* *Mpfq::gf2n::trivialities::code_for_elt_ur_sub */ #define mpfq_2_64_elt_ur_sub(K, r, s1, s2) mpfq_2_64_elt_ur_add(K,r,s1,s2) static inline void mpfq_2_64_mul_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline void mpfq_2_64_sqr_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_elt); static inline void mpfq_2_64_reduce(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_dst_elt_ur); /* Comparison functions */ static inline int mpfq_2_64_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_elt, mpfq_2_64_src_elt); static inline int mpfq_2_64_cmp_ui(mpfq_2_64_dst_field, mpfq_2_64_src_elt, unsigned long); static inline int mpfq_2_64_is_zero(mpfq_2_64_dst_field, mpfq_2_64_src_elt); /* Input/output functions */ /* missing fprint */ /* missing print */ /* missing scan */ /* Vector functions */ void mpfq_2_64_vec_init(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int); void mpfq_2_64_vec_reinit(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int, unsigned int); void mpfq_2_64_vec_clear(mpfq_2_64_dst_field, mpfq_2_64_vec *, unsigned int); static inline void mpfq_2_64_vec_set(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, unsigned int); static inline void mpfq_2_64_vec_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_setcoeff_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, unsigned long, unsigned int); static inline void mpfq_2_64_vec_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_add(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_rev(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_scal_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_conv(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_src_vec, unsigned int, mpfq_2_64_src_vec, unsigned int); /* missing vec_random */ /* missing vec_random2 */ static inline int mpfq_2_64_vec_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline int mpfq_2_64_vec_is_zero(mpfq_2_64_dst_field, mpfq_2_64_src_vec, unsigned int); static inline mpfq_2_64_dst_vec mpfq_2_64_vec_subvec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, int); static inline mpfq_2_64_src_vec mpfq_2_64_vec_subvec_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec, int); static inline mpfq_2_64_dst_elt mpfq_2_64_vec_coeff_ptr(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, int); static inline mpfq_2_64_src_elt mpfq_2_64_vec_coeff_ptr_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec, int); /* missing vec_asprint */ /* missing vec_fprint */ /* missing vec_print */ /* missing vec_sscan */ /* missing vec_fscan */ /* missing vec_scan */ void mpfq_2_64_vec_ur_init(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int); static inline void mpfq_2_64_vec_ur_set_zero(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_set_vec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, unsigned int); void mpfq_2_64_vec_ur_reinit(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int, unsigned int); void mpfq_2_64_vec_ur_clear(mpfq_2_64_dst_field, mpfq_2_64_vec_ur *, unsigned int); static inline void mpfq_2_64_vec_ur_set(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_elt_ur, unsigned int); static inline void mpfq_2_64_vec_ur_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_add(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_ur_rev(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec_ur, unsigned int); static inline void mpfq_2_64_vec_scal_mul_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_vec_conv_ur_n(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_conv_ur(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, mpfq_2_64_src_vec, unsigned int, mpfq_2_64_src_vec, unsigned int); static inline void mpfq_2_64_vec_reduce(mpfq_2_64_dst_field, mpfq_2_64_dst_vec, mpfq_2_64_dst_vec_ur, unsigned int); static inline mpfq_2_64_dst_vec_ur mpfq_2_64_vec_ur_subvec(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, int); static inline mpfq_2_64_src_vec_ur mpfq_2_64_vec_ur_subvec_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec_ur, int); static inline mpfq_2_64_dst_elt mpfq_2_64_vec_ur_coeff_ptr(mpfq_2_64_dst_field, mpfq_2_64_dst_vec_ur, int); static inline mpfq_2_64_src_elt mpfq_2_64_vec_ur_coeff_ptr_const(mpfq_2_64_dst_field, mpfq_2_64_src_vec_ur, int); /* *Mpfq::defaults::flatdata::code_for_vec_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_64_vec_elt_stride(K, n) ((n)*sizeof(mpfq_2_64_elt)) /* *Mpfq::defaults::flatdata::code_for_vec_ur_elt_stride, Mpfq::gf2n::trivialities */ #define mpfq_2_64_vec_ur_elt_stride(K, n) ((n)*sizeof(mpfq_2_64_elt_ur)) /* Polynomial functions */ static inline void mpfq_2_64_poly_init(mpfq_2_64_dst_field, mpfq_2_64_poly, unsigned int); static inline void mpfq_2_64_poly_clear(mpfq_2_64_dst_field, mpfq_2_64_poly); static inline void mpfq_2_64_poly_set(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_setmonic(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_setcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_elt, unsigned int); static inline void mpfq_2_64_poly_setcoeff_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, unsigned long, unsigned int); static inline void mpfq_2_64_poly_getcoeff(mpfq_2_64_dst_field, mpfq_2_64_dst_elt, mpfq_2_64_src_poly, unsigned int); static inline int mpfq_2_64_poly_deg(mpfq_2_64_dst_field, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_add(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_sub(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_set_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, unsigned long); static inline void mpfq_2_64_poly_add_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned long); static inline void mpfq_2_64_poly_sub_ui(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, unsigned long); static inline void mpfq_2_64_poly_neg(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_scal_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_elt); static inline void mpfq_2_64_poly_mul(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); int mpfq_2_64_poly_divmod(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_precomp_mod(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly); void mpfq_2_64_poly_mod_pre(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_gcd(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); static inline void mpfq_2_64_poly_xgcd(mpfq_2_64_dst_field, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_dst_poly, mpfq_2_64_src_poly, mpfq_2_64_src_poly); /* missing poly_random */ /* missing poly_random2 */ static inline int mpfq_2_64_poly_cmp(mpfq_2_64_dst_field, mpfq_2_64_src_poly, mpfq_2_64_src_poly); /* missing poly_asprint */ /* missing poly_fprint */ /* missing poly_print */ /* missing poly_sscan */ /* missing poly_fscan */ /* missing poly_scan */ #ifdef __cplusplus } #endif /* Implementations for inlines */ /* *Mpfq::gf2n::field::code_for_field_init */ static inline void mpfq_2_64_field_init(mpfq_2_64_dst_field f) { f->io_type=16; } /* *Mpfq::gf2n::field::code_for_field_setopt */ static inline void mpfq_2_64_field_setopt(mpfq_2_64_dst_field f, unsigned long x MAYBE_UNUSED, void * y) { assert(x == MPFQ_IO_TYPE); f->io_type=((unsigned long*)y)[0]; } /* *Mpfq::defaults::flatdata::code_for_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt)); } /* *Mpfq::gf2n::trivialities::code_for_set_ui */ static inline void mpfq_2_64_set_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, unsigned long x) { r[0] = x & 1UL; } /* *Mpfq::defaults::flatdata::code_for_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r) { mpfq_2_64_vec_set_zero(K,(mpfq_2_64_dst_vec)r,1); } /* *Mpfq::gf2n::trivialities::code_for_get_ui */ static inline unsigned long mpfq_2_64_get_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { return r[0] & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly */ static inline void mpfq_2_64_set_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, unsigned long x) { r[0] = x; } /* *Mpfq::gf2n::trivialities::code_for_set_uipoly_wide */ static inline void mpfq_2_64_set_uipoly_wide(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, const unsigned long * x, unsigned int n) { r[0] = MPFQ_LIKELY(n > 0) ? (x[0]) : 0; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly */ static inline unsigned long mpfq_2_64_get_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { return r[0]; } /* *Mpfq::gf2n::trivialities::code_for_get_uipoly_wide */ static inline void mpfq_2_64_get_uipoly_wide(mpfq_2_64_dst_field K MAYBE_UNUSED, unsigned long * r, mpfq_2_64_src_elt x) { unsigned int i; for(i = 0 ; i < 1 ; i++) r[i] = x[i]; } /* *Mpfq::gf2n::trivialities::code_for_add */ static inline void mpfq_2_64_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { r[0] = s1[0] ^ s2[0]; } /* *Mpfq::gf2n::trivialities::code_for_mul */ static inline void mpfq_2_64_mul(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { mpfq_2_64_elt_ur t; mpfq_2_64_mul_ur(K, t, s1, s2); mpfq_2_64_reduce(K, r, t); } /* *Mpfq::gf2n::trivialities::code_for_sqr */ static inline void mpfq_2_64_sqr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { mpfq_2_64_elt_ur t; mpfq_2_64_sqr_ur(K, t, s); mpfq_2_64_reduce(K, r, t); } /* *Mpfq::gf2n::linearops::code_for_sqrt */ static inline int mpfq_2_64_sqrt(mpfq_2_64_dst_field K, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { static const unsigned long shuffle_table[256] = { 0, 1, 16, 17, 2, 3, 18, 19, 32, 33, 48, 49, 34, 35, 50, 51, 4, 5, 20, 21, 6, 7, 22, 23, 36, 37, 52, 53, 38, 39, 54, 55, 64, 65, 80, 81, 66, 67, 82, 83, 96, 97, 112, 113, 98, 99, 114, 115, 68, 69, 84, 85, 70, 71, 86, 87, 100, 101, 116, 117, 102, 103, 118, 119, 8, 9, 24, 25, 10, 11, 26, 27, 40, 41, 56, 57, 42, 43, 58, 59, 12, 13, 28, 29, 14, 15, 30, 31, 44, 45, 60, 61, 46, 47, 62, 63, 72, 73, 88, 89, 74, 75, 90, 91, 104, 105, 120, 121, 106, 107, 122, 123, 76, 77, 92, 93, 78, 79, 94, 95, 108, 109, 124, 125, 110, 111, 126, 127, 128, 129, 144, 145, 130, 131, 146, 147, 160, 161, 176, 177, 162, 163, 178, 179, 132, 133, 148, 149, 134, 135, 150, 151, 164, 165, 180, 181, 166, 167, 182, 183, 192, 193, 208, 209, 194, 195, 210, 211, 224, 225, 240, 241, 226, 227, 242, 243, 196, 197, 212, 213, 198, 199, 214, 215, 228, 229, 244, 245, 230, 231, 246, 247, 136, 137, 152, 153, 138, 139, 154, 155, 168, 169, 184, 185, 170, 171, 186, 187, 140, 141, 156, 157, 142, 143, 158, 159, 172, 173, 188, 189, 174, 175, 190, 191, 200, 201, 216, 217, 202, 203, 218, 219, 232, 233, 248, 249, 234, 235, 250, 251, 204, 205, 220, 221, 206, 207, 222, 223, 236, 237, 252, 253, 238, 239, 254, 255, }; mpfq_2_64_elt sqrt_t ={ 0xffffffff0000000aUL, } ; mpfq_2_64_elt odd, even; mpfq_2_64_elt_ur odd_t; unsigned long t; #define EVEN_MASK (((unsigned long)-1)/3UL) #define ODD_MASK ((EVEN_MASK)<<1) unsigned int i; for(i = 0 ; i < 1 ; i++) { even[i] = s[i] & EVEN_MASK; } t = even[0]; t |= t >> 7; even[0] = shuffle_table[t & 255]; t >>= 16; even[0] |= shuffle_table[t & 255] << 8; t >>= 16; even[0] |= shuffle_table[t & 255] << 16; t >>= 16; even[0] |= shuffle_table[t & 255] << 24; for(i = 0 ; i < 1 ; i++) { odd[i] = (s[i] & ODD_MASK) >> 1; } t = odd[0]; t |= t >> 7; odd[0] = shuffle_table[t & 255]; t >>= 16; odd[0] |= shuffle_table[t & 255] << 8; t >>= 16; odd[0] |= shuffle_table[t & 255] << 16; t >>= 16; odd[0] |= shuffle_table[t & 255] << 24; mpfq_2_64_mul_ur(K, odd_t, odd, sqrt_t); for(i = 0 ; i < (1+1)/2 ; i++) { odd_t[i] ^= even[i]; } mpfq_2_64_reduce(K, r, odd_t); return 1; } /* *Mpfq::defaults::pow::code_for_pow, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_pow(mpfq_2_64_dst_field k, mpfq_2_64_dst_elt res, mpfq_2_64_src_elt r, unsigned long * x, size_t n) { mpfq_2_64_elt u, a; long i, j, lead; /* it is a signed type */ unsigned long mask; /* get the correct (i,j) position of the most significant bit in x */ for(i = ((long)n)-1; i>=0 && x[i]==0; i--) ; if (i < 0) { /* power zero gets 1 */ mpfq_2_64_set_ui(k, res, 1); return; } j = 64 - 1; mask = (1UL<>=1) ; lead = i*64+j; /* Ensured. */ mpfq_2_64_init(k, &u); mpfq_2_64_init(k, &a); mpfq_2_64_set(k, a, r); for( ; lead > 0; lead--) { if (j-- == 0) { i--; j = 64-1; mask = (1UL<>= 1; } if (x[i]&mask) { mpfq_2_64_sqr(k, u, a); mpfq_2_64_mul(k, a, u, r); } else { mpfq_2_64_sqr(k, a,a); } } mpfq_2_64_set(k, res, a); mpfq_2_64_clear(k, &u); mpfq_2_64_clear(k, &a); } /* *Mpfq::gf2n::trivialities::code_for_add_ui */ static inline void mpfq_2_64_add_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_set(K, r, s); r[0] ^= x & 1UL; } /* *Mpfq::gf2n::trivialities::code_for_mul_ui */ static inline void mpfq_2_64_mul_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { if (x & 1UL) { mpfq_2_64_set(K, r, s); } else { memset(r, 0, sizeof(mpfq_2_64_elt)); } } /* *Mpfq::gf2n::trivialities::code_for_add_uipoly */ static inline void mpfq_2_64_add_uipoly(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_set(K, r, s); r[0] ^= x; } /* *Mpfq::gf2n::trivialities::code_for_mul_uipoly */ static inline void mpfq_2_64_mul_uipoly(mpfq_2_64_dst_field k, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s, unsigned long x) { mpfq_2_64_elt xx; mpfq_2_64_init(k, &xx); mpfq_2_64_set_uipoly(k, xx, x); mpfq_2_64_mul(k, r, s, xx); mpfq_2_64_clear(k, &xx); } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_64_longshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 64; int i; s %= 64; if (s > 0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i] << s ^ src[i-1] >> (64-s); } dst[m] = src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] = src[i]; } dst[m] = src[0]; } for(i = m-1 ; i>= 0 ; i--) { dst[i] = 0UL; } } /* *Mpfq::gf2n::inversion::code_for_inv */ /* Triggered by: inv */ static inline void mpfq_2_64_longaddshift_left(unsigned long * dst, const unsigned long * src, int n, int s) { int m = s / 64; int i; s %= 64; if (s>0) { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i] << s ^ src[i-1] >> (64-s); } dst[m] ^= src[0] << s; } else { for(i = n-m-1 ; i > 0 ; i--) { dst[m+i] ^= src[i]; } dst[m] ^= src[0]; } } /* *Mpfq::gf2n::inversion::code_for_inv */ static inline int mpfq_2_64_inv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { unsigned long a[2] = { 0x8000000000000000UL, 0x800000000000000dUL, }; unsigned long b[2]; unsigned long u[2] = { 0, }; unsigned long v[2] = { 1, 0, }; unsigned long x; int ia, ib; int i,d; if (mpfq_2_64_cmp_ui(K, s, 0UL) == 0) return 0; { unsigned long z; z = s[0] << 63; b[0] = z; z = s[0] >> 1; b[1] = z; } ib = mpfq_clzlx(b, 2); ia = 0; mpfq_2_64_longshift_left(b,b,2,ib); for(d = ib - ia ; ; ) { if (d == 0) { for(i = 0 ; i < 2 ; i++) v[i] ^= u[i]; b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; if (!x) { memcpy(r,u,1 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,2); ib += t; d += t; mpfq_2_64_longshift_left(b,b,2,t); } for(;d > 0;) { mpfq_2_64_longaddshift_left(u,v,2,d); a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; if (!x) { memcpy(r,v,1 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,2); ia += t; d -= t; mpfq_2_64_longshift_left(a,a,2,t); } if (d == 0) { for(i = 0 ; i < 2 ; i++) u[i] ^= v[i]; a[0] ^= b[0]; x = a[0]; a[1] ^= b[1]; x |= a[1]; if (!x) { memcpy(r,v,1 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(a,2); ia += t; d -= t; mpfq_2_64_longshift_left(a,a,2,t); } for(;d < 0;) { mpfq_2_64_longaddshift_left(v,u,2,-d); b[0] ^= a[0]; x = b[0]; b[1] ^= a[1]; x |= b[1]; if (!x) { memcpy(r,u,1 * sizeof(unsigned long)); return 1; } unsigned long t = mpfq_clzlx(b,2); ib += t; d += t; mpfq_2_64_longshift_left(b,b,2,t); } } } /* *Mpfq::gf2n::linearops::code_for_as_solve */ static inline void mpfq_2_64_as_solve(mpfq_2_64_dst_field K, mpfq_2_64_dst_elt r, mpfq_2_64_src_elt s) { static const mpfq_2_64_elt t[64] = { { 0x19c9369f278adc02UL, }, { 0x84b2b22ab2383ee4UL, }, { 0x84b2b22ab2383ee6UL, }, { 0x9d7b84b495b3e3f6UL, }, { 0x84b2b22ab2383ee2UL, }, { 0x37c470b49213f790UL, }, { 0x9d7b84b495b3e3feUL, }, { 0x1000a0105137cUL, }, { 0x84b2b22ab2383ef2UL, }, { 0x368e964a8edce1fcUL, }, { 0x37c470b49213f7b0UL, }, { 0x19c9368e278fdf4cUL, }, { 0x9d7b84b495b3e3beUL, }, { 0x2e4da23cbc7d4570UL, }, { 0x1000a010513fcUL, }, { 0x84f35772bac24232UL, }, { 0x84b2b22ab2383ff2UL, }, { 0x37c570ba9314e4fcUL, }, { 0x368e964a8edce3fcUL, }, { 0xb377c390213cdb0eUL, }, { 0x37c470b49213f3b0UL, }, { 0x85ed5a3aa99c24f2UL, }, { 0x19c9368e278fd74cUL, }, { 0xaabff0000780000eUL, }, { 0x9d7b84b495b3f3beUL, }, { 0x84b6b3dab03038f2UL, }, { 0x2e4da23cbc7d6570UL, }, { 0x511ea03494ffcUL, }, { 0x1000a010553fcUL, }, { 0xae0c0220343c6c0eUL, }, { 0x84f35772bac2c232UL, }, { 0x800000008000000eUL, }, { 0x84b2b22ab2393ff2UL, }, { 0xb376c29c202bc97eUL, }, { 0x37c570ba9316e4fcUL, }, { 0x9c3062488879e6ceUL, }, { 0x368e964a8ed8e3fcUL, }, { 0x41e42c08e47e70UL, }, { 0xb377c3902134db0eUL, }, { 0x85b9b108a60f56ceUL, }, { 0x37c470b49203f3b0UL, }, { 0x19dd3b6e21f3cb4cUL, }, { 0x85ed5a3aa9bc24f2UL, }, { 0x198ddf682c428ac0UL, }, { 0x19c9368e27cfd74cUL, }, { 0x4b7c68431ca84b0UL, }, { 0xaabff0000700000eUL, }, { 0x8040655489ffefbeUL, }, { 0x9d7b84b494b3f3beUL, }, { 0x18c1354e32bfa74cUL, }, { 0x84b6b3dab23038f2UL, }, { 0xaaf613cc0f74627eUL, }, { 0x2e4da23cb87d6570UL, }, { 0x3248b3d6b3342a8cUL, }, { 0x511ea0b494ffcUL, }, { 0xb60813c00e70700eUL, }, { 0x1000a110553fcUL, }, { 0x1e0d022a05393ffcUL, }, { 0xae0c0220143c6c0eUL, }, { 0xe0c0220143c6c00UL, }, { 0x84f35772fac2c232UL, }, { 0xc041e55948fbfdceUL, }, { 0x800000000000000eUL, }, { 0x0UL, }, }; const mpfq_2_64_elt * ptr = t; unsigned int i,j; memset(r, 0, sizeof(mpfq_2_64_elt)); for(i = 0 ; i < 1 ; i++) { unsigned long a = s[i]; for(j = 0 ; j < 64 && ptr != &t[64]; j++, ptr++) { if (a & 1UL) { mpfq_2_64_add(K, r, r, *ptr); } a >>= 1; } } } /* *Mpfq::gf2n::linearops::code_for_trace */ static inline unsigned long mpfq_2_64_trace(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt s) { return ((s[0]>>63) ^ (s[0]>>61)) & 1; } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt_ur s) { if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_elt, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set_elt(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt s) { memset(r, 0, sizeof(mpfq_2_64_elt_ur)); memcpy(r,s,sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::flatdata::code_for_elt_ur_set_zero, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_elt_ur_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r) { memset(r, 0, sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_set_ui */ static inline void mpfq_2_64_elt_ur_set_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, unsigned long x) { r[0] = x & 1UL; memset(r + 1, 0, sizeof(mpfq_2_64_elt_ur) - sizeof(unsigned long)); } /* *Mpfq::gf2n::trivialities::code_for_elt_ur_add */ static inline void mpfq_2_64_elt_ur_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur r, mpfq_2_64_src_elt_ur s1, mpfq_2_64_src_elt_ur s2) { int i; for(i = 0 ; i < 2 ; i++) r[i] = s1[i] ^ s2[i]; } /* *Mpfq::gf2n::mul::code_for_mul_ur */ static inline void mpfq_2_64_mul_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur t, mpfq_2_64_src_elt s1, mpfq_2_64_src_elt s2) { gf2x_mul1(t, s1[0], s2[0]); } /* *Mpfq::gf2n::squaring::code_for_sqr_ur */ static inline void mpfq_2_64_sqr_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur t, mpfq_2_64_src_elt s) { static const unsigned long g[16] = { 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85, }; { unsigned long u; u = g[s[0] & 15]; t[0] = u; u = g[s[0] >> 4 & 15]; t[0] ^= u << 8; u = g[s[0] >> 8 & 15]; t[0] ^= u << 16; u = g[s[0] >> 12 & 15]; t[0] ^= u << 24; u = g[s[0] >> 16 & 15]; t[0] ^= u << 32; u = g[s[0] >> 20 & 15]; t[0] ^= u << 40; u = g[s[0] >> 24 & 15]; t[0] ^= u << 48; u = g[s[0] >> 28 & 15]; t[0] ^= u << 56; u = g[s[0] >> 32 & 15]; t[1] = u; u = g[s[0] >> 36 & 15]; t[1] ^= u << 8; u = g[s[0] >> 40 & 15]; t[1] ^= u << 16; u = g[s[0] >> 44 & 15]; t[1] ^= u << 24; u = g[s[0] >> 48 & 15]; t[1] ^= u << 32; u = g[s[0] >> 52 & 15]; t[1] ^= u << 40; u = g[s[0] >> 56 & 15]; t[1] ^= u << 48; u = g[s[0] >> 60 & 15]; t[1] ^= u << 56; } } /* *Mpfq::gf2n::reduction::code_for_reduce */ static inline void mpfq_2_64_reduce(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt r, mpfq_2_64_dst_elt_ur t) { { unsigned long s[2]; /* 63 excess bits */ { unsigned long z; z = t[0]; s[0] = z; } memset(s + 1, 0, 1 * sizeof(unsigned long)); { unsigned long z; z = t[1]; s[0]^= z << 4; s[0]^= z << 3; s[0]^= z << 1; s[0]^= z; z >>= 60; s[1]^= z; z >>= 1; s[1]^= z; } /* 3 excess bits */ { unsigned long z; z = s[0]; r[0] = z; } { unsigned long z; z = s[1]; r[0]^= z << 4; r[0]^= z << 3; r[0]^= z << 1; r[0]^= z; } } } /* *Mpfq::gf2n::trivialities::code_for_cmp */ static inline int mpfq_2_64_cmp(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt a, mpfq_2_64_src_elt b) { return memcmp(a, b, sizeof(mpfq_2_64_elt)); } /* *Mpfq::gf2n::trivialities::code_for_cmp_ui */ static inline int mpfq_2_64_cmp_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r, unsigned long x) { if (r[0] < (x & 1UL)) return -1; if (r[0] > (x & 1UL)) return 1; return 0; } /* *Mpfq::defaults::flatdata::code_for_is_zero, Mpfq::gf2n::trivialities */ static inline int mpfq_2_64_is_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_elt r) { unsigned int i; for(i = 0 ; i < sizeof(mpfq_2_64_elt)/sizeof(r[0]) ; i++) { if (r[i]) return 0; } return 1; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec r, mpfq_2_64_src_vec s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_64_elt)); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_setcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_elt x, unsigned int i) { mpfq_2_64_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_setcoeff_ui, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_setcoeff_ui(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, unsigned long x, unsigned int i) { mpfq_2_64_set_ui(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_getcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt x, mpfq_2_64_src_vec w, unsigned int i) { mpfq_2_64_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_add, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_neg, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_neg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_rev, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_rev(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_64_elt tmp[1]; mpfq_2_64_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_64_set(K, tmp[0], u[i]); mpfq_2_64_set(K, w[i], u[n-1-i]); mpfq_2_64_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_64_set(K, w[nn], u[nn]); mpfq_2_64_clear(K, tmp); } /* *Mpfq::defaults::vec::addsub::code_for_vec_sub, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_sub(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_scal_mul(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, mpfq_2_64_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_mul(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv */ static inline void mpfq_2_64_vec_conv(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_src_vec u, unsigned int n, mpfq_2_64_src_vec v, unsigned int m) { mpfq_2_64_vec_ur tmp; mpfq_2_64_vec_ur_init(K, &tmp, m+n-1); mpfq_2_64_vec_conv_ur(K, tmp, u, n, v, m); mpfq_2_64_vec_reduce(K, w, tmp, m+n-1); mpfq_2_64_vec_ur_clear(K, &tmp, m+n-1); } /* *Mpfq::defaults::vec::getset::code_for_vec_cmp, Mpfq::defaults::vec */ static inline int mpfq_2_64_vec_cmp(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) { int ret = mpfq_2_64_cmp(K, u[i], v[i]); if (ret != 0) return ret; } return 0; } /* *Mpfq::defaults::vec::getset::code_for_vec_is_zero, Mpfq::defaults::vec */ static inline int mpfq_2_64_vec_is_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec r, unsigned int n) { unsigned int i; for(i = 0 ; i < n ; i+=1) { if (!mpfq_2_64_is_zero(K,r[i])) return 0; } return 1; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_vec mpfq_2_64_vec_subvec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_vec mpfq_2_64_vec_subvec_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_elt mpfq_2_64_vec_coeff_ptr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_elt mpfq_2_64_vec_coeff_ptr_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec v, int i) { return v[i]; } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set_zero, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_ur_set_zero(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur r, unsigned int n) { memset(r, 0, n*sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_set_vec, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_set_vec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_set_elt(K, w[i], u[i]); } /* *Mpfq::defaults::vec::flatdata::code_for_vec_ur_set, Mpfq::defaults::flatdata, Mpfq::gf2n::trivialities */ static inline void mpfq_2_64_vec_ur_set(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur r, mpfq_2_64_src_vec_ur s, unsigned int n) { if (r != s) memmove(r, s, n*sizeof(mpfq_2_64_elt_ur)); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_setcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_setcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_elt_ur x, unsigned int i) { mpfq_2_64_elt_ur_set(K, w[i], x); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_getcoeff, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_getcoeff(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_elt_ur x, mpfq_2_64_src_vec_ur w, unsigned int i) { mpfq_2_64_elt_ur_set(K, x, w[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_add, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_add(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, mpfq_2_64_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_add(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_sub, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_sub(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, mpfq_2_64_src_vec_ur v, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_elt_ur_sub(K, w[i], u[i], v[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_neg, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_neg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; ++i) mpfq_2_64_elt_ur_neg(K, w[i], u[i]); } /* *Mpfq::defaults::vec::addsub::code_for_vec_ur_rev, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_ur_rev(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec_ur u, unsigned int n) { unsigned int nn = n >> 1; mpfq_2_64_elt_ur tmp[1]; mpfq_2_64_elt_ur_init(K, tmp); unsigned int i; for(i = 0; i < nn; ++i) { mpfq_2_64_elt_ur_set(K, tmp[0], u[i]); mpfq_2_64_elt_ur_set(K, w[i], u[n-1-i]); mpfq_2_64_elt_ur_set(K, w[n-1-i], tmp[0]); } if (n & 1) mpfq_2_64_elt_ur_set(K, w[nn], u[nn]); mpfq_2_64_elt_ur_clear(K, tmp); } /* *Mpfq::defaults::vec::mul::code_for_vec_scal_mul_ur, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_scal_mul_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, mpfq_2_64_src_elt x, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_mul_ur(K, w[i], u[i], x); } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ /* Triggered by: vec_conv_ur */ static inline void mpfq_2_64_vec_conv_ur_n(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, mpfq_2_64_src_vec v, unsigned int n) { if (n == 0) return; if (n == 1) { mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); return; } if (n == 2) { // Kara 2 mpfq_2_64_elt t1, t2; mpfq_2_64_init(K, &t1); mpfq_2_64_init(K, &t2); mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); mpfq_2_64_mul_ur(K, w[2], u[1], v[1]); mpfq_2_64_add(K, t1, u[0], u[1]); mpfq_2_64_add(K, t2, v[0], v[1]); mpfq_2_64_mul_ur(K, w[1], t1, t2); mpfq_2_64_elt_ur_sub(K, w[1], w[1], w[0]); mpfq_2_64_elt_ur_sub(K, w[1], w[1], w[2]); mpfq_2_64_clear(K, &t1); mpfq_2_64_clear(K, &t2); return; } if (n == 3) { // do it in 6 mpfq_2_64_elt t1, t2; mpfq_2_64_elt_ur s; mpfq_2_64_init(K, &t1); mpfq_2_64_init(K, &t2); mpfq_2_64_elt_ur_init(K, &s); // a0*b0*(1 - X) mpfq_2_64_mul_ur(K, w[0], u[0], v[0]); mpfq_2_64_elt_ur_neg(K, w[1], w[0]); // a1*b1*(-X + 2*X^2 - X^3) mpfq_2_64_mul_ur(K, w[2], u[1], v[1]); mpfq_2_64_elt_ur_neg(K, w[3], w[2]); mpfq_2_64_elt_ur_add(K, w[2], w[2], w[2]); mpfq_2_64_elt_ur_add(K, w[1], w[1], w[3]); // a2*b2*(-X^3+X^4) mpfq_2_64_mul_ur(K, w[4], u[2], v[2]); mpfq_2_64_elt_ur_sub(K, w[3], w[3], w[4]); // (a0+a1)*(b0+b1)*(X - X^2) mpfq_2_64_add(K, t1, u[0], u[1]); mpfq_2_64_add(K, t2, v[0], v[1]); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[1], w[1], s); mpfq_2_64_elt_ur_sub(K, w[2], w[2], s); // (a1+a2)*(b1+b2)*(X^3 - X^2) mpfq_2_64_add(K, t1, u[1], u[2]); mpfq_2_64_add(K, t2, v[1], v[2]); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[3], w[3], s); mpfq_2_64_elt_ur_sub(K, w[2], w[2], s); // (a0+a1+a2)*(b0+b1+b2)* X^2 mpfq_2_64_add(K, t1, u[0], t1); mpfq_2_64_add(K, t2, v[0], t2); mpfq_2_64_mul_ur(K, s, t1, t2); mpfq_2_64_elt_ur_add(K, w[2], w[2], s); return; } unsigned int n0, n1; n0 = n / 2; n1 = n - n0; mpfq_2_64_vec_conv_ur_n(K, w, u, v, n0); mpfq_2_64_vec_conv_ur_n(K, w + 2*n0, u + n0, v + n0, n1); mpfq_2_64_elt_ur_set_ui(K, w[2*n0-1], 0); mpfq_2_64_vec tmpu, tmpv; mpfq_2_64_vec_ur tmpw; mpfq_2_64_vec_init(K, &tmpu, n1); mpfq_2_64_vec_init(K, &tmpv, n1); mpfq_2_64_vec_ur_init(K, &tmpw, 2*n1-1); mpfq_2_64_vec_set(K, tmpu, u, n0); if (n1 != n0) mpfq_2_64_set_ui(K, tmpu[n0], 0); mpfq_2_64_vec_add(K, tmpu, tmpu, u+n0, n1); mpfq_2_64_vec_set(K, tmpv, v, n0); if (n1 != n0) mpfq_2_64_set_ui(K, tmpv[n0], 0); mpfq_2_64_vec_add(K, tmpv, tmpv, v+n0, n1); mpfq_2_64_vec_conv_ur_n(K, tmpw, tmpu, tmpv, n1); mpfq_2_64_vec_ur_sub(K, tmpw, tmpw, w, 2*n0-1); mpfq_2_64_vec_ur_sub(K, tmpw, tmpw, w + 2*n0, 2*n1-1); mpfq_2_64_vec_ur_add(K, w + n0, w + n0, tmpw, 2*n1-1); mpfq_2_64_vec_clear(K, &tmpu, n1); mpfq_2_64_vec_clear(K, &tmpv, n1); mpfq_2_64_vec_ur_clear(K, &tmpw, 2*n1-1); return; } /* *Mpfq::defaults::vec::conv::code_for_vec_conv_ur */ static inline void mpfq_2_64_vec_conv_ur(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur w, mpfq_2_64_src_vec u, unsigned int n, mpfq_2_64_src_vec v, unsigned int m) { unsigned int i, j MAYBE_UNUSED, k; mpfq_2_64_elt_ur acc, z; mpfq_2_64_elt_ur_init(K, &acc); mpfq_2_64_elt_ur_init(K, &z); // swap pointers to have n <= m mpfq_2_64_src_vec uu, vv; if (n <= m) { uu = u; vv = v; } else { uu = v; vv = u; unsigned int tmp = n; n = m; m = tmp; } for(k = 0; k < n; ++k) { mpfq_2_64_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i <= k; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } for(k = n; k < m; ++k) { mpfq_2_64_mul_ur(K, acc, uu[0], vv[k]); for(i = 1; i < n; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } for(k = m; k < n+m-1; ++k) { mpfq_2_64_mul_ur(K, acc, uu[k-m+1], vv[m-1]); for(i = k-m+2; i < n; ++i) { mpfq_2_64_mul_ur(K, z, uu[i], vv[k-i]); mpfq_2_64_elt_ur_add(K, acc, acc, z); } mpfq_2_64_elt_ur_set(K, w[k], acc); } mpfq_2_64_elt_ur_clear(K, &acc); mpfq_2_64_elt_ur_clear(K, &z); } /* *Mpfq::defaults::vec::mul::code_for_vec_reduce, Mpfq::defaults::vec */ static inline void mpfq_2_64_vec_reduce(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec w, mpfq_2_64_dst_vec_ur u, unsigned int n) { unsigned int i; for(i = 0; i < n; i+=1) mpfq_2_64_reduce(K, w[i], u[i]); } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_vec_ur mpfq_2_64_vec_ur_subvec(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_subvec_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_vec_ur mpfq_2_64_vec_ur_subvec_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec_ur v, int i) { return v+i; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr, Mpfq::defaults::vec */ static inline mpfq_2_64_dst_elt mpfq_2_64_vec_ur_coeff_ptr(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_dst_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::vec::getset::code_for_vec_ur_coeff_ptr_const, Mpfq::defaults::vec */ static inline mpfq_2_64_src_elt mpfq_2_64_vec_ur_coeff_ptr_const(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_vec_ur v, int i) { return v[i]; } /* *Mpfq::defaults::poly::code_for_poly_init */ static inline void mpfq_2_64_poly_init(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_poly p, unsigned int n) { mpfq_2_64_vec_init(k, &(p->c), n); p->alloc=n; p->size=0; } /* *Mpfq::defaults::poly::code_for_poly_clear */ static inline void mpfq_2_64_poly_clear(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_poly p) { mpfq_2_64_vec_clear(k, &(p->c), p->alloc); } /* *Mpfq::defaults::poly::code_for_poly_set */ static inline void mpfq_2_64_poly_set(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u) { if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_64_vec_set(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_setcoeff */ static inline void mpfq_2_64_poly_setcoeff(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_elt x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_64_vec_set_zero(k, mpfq_2_64_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_64_vec_setcoeff(k, w->c, x, i); w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_setcoeff_ui */ static inline void mpfq_2_64_poly_setcoeff_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, unsigned long x, unsigned int i) { if (w->alloc < (i+1)) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, i+1); w->alloc = i+1; } if (w->size < (i+1)) { mpfq_2_64_vec_set_zero(k, mpfq_2_64_vec_subvec(k, w->c, w->size), (i - w->size)); w->size = i+1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, i); w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_getcoeff */ static inline void mpfq_2_64_poly_getcoeff(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_elt x, mpfq_2_64_src_poly w, unsigned int i) { if (w->size < (i+1)) { mpfq_2_64_set_ui(k,x,0); } else { mpfq_2_64_vec_getcoeff(k, x, w->c, i); } } /* *Mpfq::defaults::poly::code_for_poly_deg */ static inline int mpfq_2_64_poly_deg(mpfq_2_64_dst_field K MAYBE_UNUSED, mpfq_2_64_src_poly w) { if (w->size == 0) return -1; int deg = w->size-1; mpfq_2_64_elt temp; mpfq_2_64_init(K, &temp); mpfq_2_64_vec_getcoeff(K, temp, w->c, deg); int comp=mpfq_2_64_cmp_ui(K, temp, 0); while ((deg >= 0) && (comp == 0)){ deg--; if (deg>=0) { mpfq_2_64_vec_getcoeff(K, temp, w->c, deg); comp=mpfq_2_64_cmp_ui(K, temp, 0); } } mpfq_2_64_clear(K, &temp); return deg; } /* *Mpfq::defaults::poly::code_for_poly_add */ static inline void mpfq_2_64_poly_add(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_64_vec_add(k, w->c, u->c, v->c, su); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, su), mpfq_2_64_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_64_vec_add(k, w->c, u->c, v->c, sv); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, sv), mpfq_2_64_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_sub */ static inline void mpfq_2_64_poly_sub(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int su = u->size; unsigned int sv = v->size; unsigned int maxsize = MAX(su, sv); if (w->alloc < maxsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, maxsize); w->alloc = maxsize; } w->size = maxsize; if (!maxsize) return; if (su <= sv) { mpfq_2_64_vec_sub(k, w->c, u->c, v->c, su); mpfq_2_64_vec_neg(k, mpfq_2_64_vec_subvec(k, w->c, su), mpfq_2_64_vec_subvec_const(k, v->c, su), sv-su); } else { mpfq_2_64_vec_sub(k, w->c, u->c, v->c, sv); mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, sv), mpfq_2_64_vec_subvec_const(k, u->c, sv), su-sv); } w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_set_ui */ static inline void mpfq_2_64_poly_set_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, unsigned long x) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_add_ui */ static inline void mpfq_2_64_poly_add_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_vec_setcoeff_ui(k, w->c, x, 0); w->size = 1; w->size = 1 + mpfq_2_64_poly_deg(k, w); return; } if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, 1), mpfq_2_64_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_64_add_ui(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), mpfq_2_64_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_sub_ui */ static inline void mpfq_2_64_poly_sub_ui(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, unsigned long x) { if (u->size == 0) { if (x == 0) { w->size = 0; return; } if (w->alloc == 0) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, 1); w->alloc = 1; } mpfq_2_64_elt temp; mpfq_2_64_init(k, &temp); mpfq_2_64_set_ui(k, temp, x); mpfq_2_64_neg(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), temp); w->size = mpfq_2_64_cmp_ui(k, temp, 0); mpfq_2_64_clear(k, &temp); return; } if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } w->size=u->size; mpfq_2_64_vec_set(k, mpfq_2_64_vec_subvec(k, w->c, 1), mpfq_2_64_vec_subvec_const(k, u->c, 1), u->size - 1); mpfq_2_64_sub_ui(k, mpfq_2_64_vec_coeff_ptr(k, w->c, 0), mpfq_2_64_vec_coeff_ptr_const(k, u->c, 0), x); } /* *Mpfq::defaults::poly::code_for_poly_neg */ static inline void mpfq_2_64_poly_neg(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u) { if (w->alloc < u->size) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, u->size); w->alloc = u->size; } mpfq_2_64_vec_neg(k, w->c, u->c, u->size); w->size = u->size; } /* *Mpfq::defaults::poly::code_for_poly_scal_mul */ static inline void mpfq_2_64_poly_scal_mul(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_elt x) { if (mpfq_2_64_cmp_ui(k, x, 0) == 0) { w->size = 0; return; } unsigned int n = u->size; if (w->alloc < n) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, n); w->alloc = n; } mpfq_2_64_vec_scal_mul(k, w->c, u->c, x, n); w->size=n; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::poly::code_for_poly_mul */ static inline void mpfq_2_64_poly_mul(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly w, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { unsigned int usize = mpfq_2_64_poly_deg(k, u)+1; unsigned int vsize = mpfq_2_64_poly_deg(k, v)+1; if ((usize == 0) || (vsize == 0)) { w->size = 0; return; } unsigned int wsize = usize + vsize - 1; if (w->alloc < wsize) { mpfq_2_64_vec_reinit(k, &(w->c), w->alloc, wsize); w->alloc = wsize; } mpfq_2_64_vec_conv(k, w->c, u->c, usize, v->c, vsize); w->size=wsize; w->size = 1 + mpfq_2_64_poly_deg(k, w); } /* *Mpfq::defaults::polygcd::code_for_poly_gcd, Mpfq::defaults::poly */ static inline void mpfq_2_64_poly_gcd(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly g, mpfq_2_64_src_poly a0, mpfq_2_64_src_poly b0) { mpfq_2_64_poly a,b,q,r; int da0=mpfq_2_64_poly_deg(k,a0), db0=mpfq_2_64_poly_deg(k,b0); if (db0==-1) mpfq_2_64_poly_set(k,g,a0); else { mpfq_2_64_poly_init(k,a,da0+1); mpfq_2_64_poly_init(k,b,db0+1); mpfq_2_64_poly_init(k,q,1); mpfq_2_64_poly_init(k,r,db0); mpfq_2_64_poly_set(k,a,a0); mpfq_2_64_poly_set(k,b,b0); while (mpfq_2_64_poly_deg(k,b)>=0) { mpfq_2_64_poly_divmod(k,q,r,a,b); mpfq_2_64_poly_set(k,a,b); mpfq_2_64_poly_set(k,b,r); } mpfq_2_64_poly_setmonic(k,g,a); mpfq_2_64_poly_clear(k,a); mpfq_2_64_poly_clear(k,b); mpfq_2_64_poly_clear(k,q); mpfq_2_64_poly_clear(k,r); } } /* *Mpfq::defaults::polygcd::code_for_poly_xgcd, Mpfq::defaults::poly */ static inline void mpfq_2_64_poly_xgcd(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_dst_poly g, mpfq_2_64_dst_poly u0, mpfq_2_64_dst_poly v0, mpfq_2_64_src_poly a0, mpfq_2_64_src_poly b0) { mpfq_2_64_poly a,b,u,v,w,x,q,r; mpfq_2_64_elt c; mpfq_2_64_init(k,&c); mpfq_2_64_set_ui(k,c,0); /* placate gcc */ int da0=mpfq_2_64_poly_deg(k,a0), db0=mpfq_2_64_poly_deg(k,b0), dega; if (db0==-1) { if (da0==-1) { mpfq_2_64_poly_set(k,u0,a0); mpfq_2_64_poly_set(k,v0,b0); mpfq_2_64_poly_set(k,g,a0); } else { mpfq_2_64_poly_getcoeff(k,c,a0,da0); mpfq_2_64_inv(k,c,c); mpfq_2_64_poly_scal_mul(k,g,a0,c); mpfq_2_64_poly_set(k,v0,b0); mpfq_2_64_poly_set(k,u0,b0); mpfq_2_64_poly_setcoeff(k,u0,c,0); } } else { mpfq_2_64_poly_init(k,a,da0+1); mpfq_2_64_poly_init(k,b,db0+1); mpfq_2_64_poly_init(k,q,1); mpfq_2_64_poly_init(k,r,db0); mpfq_2_64_poly_set(k,a,a0); mpfq_2_64_poly_set(k,b,b0); mpfq_2_64_poly_init(k,u,1); mpfq_2_64_poly_init(k,v,1); mpfq_2_64_poly_init(k,w,1); mpfq_2_64_poly_init(k,x,1); mpfq_2_64_poly_setcoeff_ui(k,u,1,0); mpfq_2_64_poly_setcoeff_ui(k,x,1,0); /* u*a_initial + v*b_initial = a */ /* w*a_initial + x*b_initial = b */ while (mpfq_2_64_poly_deg(k,b)>=0) { mpfq_2_64_poly_divmod(k,q,r,a,b); mpfq_2_64_poly_set(k,a,b); /* a,b <- b,a-qb=r */ mpfq_2_64_poly_set(k,b,r); mpfq_2_64_poly_mul(k,r,q,w); mpfq_2_64_poly_sub(k,r,u,r); mpfq_2_64_poly_set(k,u,w); /* u,w <- w,u-qw */ mpfq_2_64_poly_set(k,w,r); mpfq_2_64_poly_mul(k,r,q,x); /* v,x <- x,v-qx */ mpfq_2_64_poly_sub(k,r,v,r); mpfq_2_64_poly_set(k,v,x); mpfq_2_64_poly_set(k,x,r); } dega=mpfq_2_64_poly_deg(k,a); mpfq_2_64_poly_getcoeff(k,c,a,dega); mpfq_2_64_inv(k,c,c); mpfq_2_64_poly_scal_mul(k,g,a,c); mpfq_2_64_poly_scal_mul(k,u0,u,c); mpfq_2_64_poly_scal_mul(k,v0,v,c); mpfq_2_64_poly_clear(k,a); mpfq_2_64_poly_clear(k,b); mpfq_2_64_poly_clear(k,u); mpfq_2_64_poly_clear(k,v); mpfq_2_64_poly_clear(k,w); mpfq_2_64_poly_clear(k,x); mpfq_2_64_poly_clear(k,q); mpfq_2_64_poly_clear(k,r); } mpfq_2_64_clear(k,&c); } /* *Mpfq::defaults::poly::code_for_poly_cmp */ static inline int mpfq_2_64_poly_cmp(mpfq_2_64_dst_field k MAYBE_UNUSED, mpfq_2_64_src_poly u, mpfq_2_64_src_poly v) { if (u->size != v->size) return (int)(u->size) - (int)(v->size); else return mpfq_2_64_vec_cmp(k, u->c, v->c, u->size); } #endif /* MPFQ_2_64_H_ */ /* vim:set ft=cpp: */ gf2x-1.2/fft/mpfq/README.mpfq0000644000327606072450000000036213125145550012531 00000000000000 Note: this directory contains a variant of the mpfq library, adapted for use within gf2x. For mpfq itself, look here: https://gforge.inria.fr/projects/mpfq/ The scripts to update this source code are in the git repository of gf2x. gf2x-1.2/fft/mpfq/mpfq.h0000644000327606072450000001524113125214702012021 00000000000000#ifndef MPFQ_H_ #define MPFQ_H_ /* This header contains common declarations used by mpfq modules */ /* we always include stdio.h, otherwise our inclusion of gmp.h might * prevent gmp's I/O functions to ever be exposed... */ #include #include #include #ifndef GF2X_WORDSIZE #error "This file has been modified for use within gf2x. Please arrange so that gf2x-small.h is included before this file" #endif #ifdef __cplusplus extern "C" { #endif /*** Constants for field_specify ***/ #define MPFQ_DONE 0 /* At the end of the variadic option functions */ // #define MPFQ_PRIME_MPN 1 /* mp_limb_t *, size depending on implementation. Prefer MPFQ_PRIME_MPZ */ #define MPFQ_POLYNOMIAL 2 /* this expects an mpfq polynomial */ #define MPFQ_DEGREE 3 /* int */ #define MPFQ_IO_TYPE 4 /* for setopt */ #define MPFQ_GROUPSIZE 5 /* int (SIMD group size) */ // #define MPFQ_PRIME_MPZ 6 /* mpz_t */ #define MPFQ_MANDATORY_TAG 7 /* force the tag to be this one ; this is * of course pointless for the low-level * implementation, but * mpfq_vbase_oo_field_init_byfeatures * uses it. */ #define LEXGE2(X,Y,A,B) (X>A || (X == A && Y >= B)) #define LEXGE3(X,Y,Z,A,B,C) (X>A || (X == A && LEXGE2(Y,Z,B,C))) #define LEXLE2(X,Y,A,B) LEXGE2(A,B,X,Y) #define LEXLE3(X,Y,Z,A,B,C) LEXGE3(A,B,C,X,Y,Z) #ifndef GNUC_VERSION #ifndef __GNUC__ #define GNUC_VERSION(X,Y,Z) 0 #else #define GNUC_VERSION(X,Y,Z) \ (__GNUC__ == X && __GNUC_MINOR__ == Y && __GNUC_PATCHLEVEL__ == Z) #endif #endif #ifndef GNUC_VERSION_ATLEAST #ifndef __GNUC__ #define GNUC_VERSION_ATLEAST(X,Y,Z) 0 #else #define GNUC_VERSION_ATLEAST(X,Y,Z) \ LEXGE3(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__,X,Y,Z) #endif #endif #ifndef GNUC_VERSION_ATMOST #ifndef __GNUC__ #define GNUC_VERSION_ATMOST(X,Y,Z) 0 #else #define GNUC_VERSION_ATMOST(X,Y,Z) \ LEXLE3(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__,X,Y,Z) #endif #endif /* typedef unsigned long ulong; */ #ifndef MAX #define MAX(h,i) ((h) > (i) ? (h) : (i)) #endif #ifndef MIN #define MIN(l,o) ((l) < (o) ? (l) : (o)) #endif #ifndef __cplusplus #ifndef max #define max(a,b) ((a) > (b) ? (a) : (b)) #endif #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif #endif /* __cplusplus */ #ifndef ABS #define ABS(x) ((x) >= 0 ? (x) : -(x)) #endif #if GNUC_VERSION_ATLEAST(3,4,0) /* according to * http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Variable-Attributes.html#Variable%20Attributes * the 'unused' attribute already existed in 3.1.1 ; however the rules * for its usage remained quirky until 3.4.0, so we prefer to stick to * the more modern way of using the unused attribute, and recommend * setting the -Wno-unused flag for pre-3.4 versions of gcc */ #ifndef MAYBE_UNUSED #define MAYBE_UNUSED __attribute__((unused)) #endif #endif #if GNUC_VERSION_ATLEAST(3,1,0) /* apparently */ #ifndef MPFQ_EXPECT #define MPFQ_EXPECT(x,val) __builtin_expect(x,val) #endif #endif #if GNUC_VERSION_ATLEAST(3,4,0) #define mpfq_clzl(x) __builtin_clzl(x) #define mpfq_ctzl(x) __builtin_ctzl(x) #define mpfq_parityl(x) __builtin_parityl(x) #else /* provide slow fallbacks */ static inline int mpfq_clzl(unsigned long x) { static const int t[4] = { 2, 1, 0, 0 }; int a = 0; int res; #if (GF2X_WORDSIZE == 64) if (x >> 32) { a += 32; x >>= 32; } #endif if (x >> 16) { a += 16; x >>= 16; } if (x >> 8) { a += 8; x >>= 8; } if (x >> 4) { a += 4; x >>= 4; } if (x >> 2) { a += 2; x >>= 2; } res = GF2X_WORDSIZE - 2 - a + t[x]; return res; } static inline int mpfq_ctzl(unsigned long x) { return GF2X_WORDSIZE - mpfq_clzl(x & - x); } static inline int mpfq_parityl(unsigned long x) { static const int t[4] = { 0, 1, 1, 0, }; #if (GF2X_WORDSIZE == 64) x ^= (x >> 32); #endif x ^= (x >> 16); x ^= (x >> 8); x ^= (x >> 4); x ^= (x >> 2); return t[x & 3UL]; } #endif #ifndef MAYBE_UNUSED #define MAYBE_UNUSED /**/ #endif #ifndef MPFQ_EXPECT #define MPFQ_EXPECT(x,val) (x) #endif #ifndef MPFQ_UNLIKELY #define MPFQ_UNLIKELY(x) MPFQ_EXPECT(x, 0) #endif #ifndef MPFQ_LIKELY #define MPFQ_LIKELY(x) MPFQ_EXPECT(x, 1) #endif static inline int mpfq_clzlx(unsigned long * x, int n) { int r = 0; for( ; n > 0 && MPFQ_UNLIKELY(!x[n-1]) ; --n) r+=GF2X_WORDSIZE; if (n == 0) return r; r += mpfq_clzl(x[n-1]); return r; } static inline int mpfq_ctzlx(unsigned long * x, int n) { int r = 0; for( ; n > 0 && MPFQ_UNLIKELY(!*x) ; --n,++x) r+=GF2X_WORDSIZE; if (n == 0) return r; r += mpfq_ctzl(*x); return r; } /*** Some useful macros ***/ /* use these only for the large malloc()s, please */ static inline void * mpfq_malloc_check(size_t s) { void * r = malloc(s); #ifdef MPFQ_TRACK_MALLOC if (s>>28) { fprintf(stderr, "MALLOC(%.1f)\n", s/1048576.); } #endif if (!r) { fprintf(stderr, "malloc(%zu) failed\n", s); abort(); } return r; } static inline void * mpfq_realloc_check(void * p, size_t os, size_t s) { void * r = realloc(p, s); #ifdef MPFQ_TRACK_MALLOC if (s>>28) { fprintf(stderr, "REALLOC(%.1f, %.1f)\n", os/1048576., s/1048576.); } #endif if (s && !r) { fprintf(stderr, "realloc(%zu, %zu) failed\n", os, s); abort(); } return r; } static inline void mpfq_free(void * p, size_t s MAYBE_UNUSED) { #ifdef MPFQ_TRACK_MALLOC if (s>>28) { fprintf(stderr, "FREE(%.1f)\n", s/1048576.); } #endif free(p); } static inline void malloc_failed() { fprintf(stderr, "malloc() failed\n"); abort(); } #if 0 /* Given the fact that copies are always very small, we're probably * better off giving the compiler the opportunity to optimize all this * away. */ /* dst and src known to not overlap, except possibly if dst == src */ static inline void mpfq_copy(mp_limb_t * dst, const mp_limb_t * src, mp_size_t n) { // if (dst != src) mpn_copyi(dst, src, n); for( ; n-- ; ) *dst++ = *src++; } /* dst and src possibly overlap, copy increasingly so that src >= dst is ok */ static inline void mpfq_copyi(mp_limb_t * dst, const mp_limb_t * src, mp_size_t n) { // mpn_copyi(dst, src, n); for( ; n-- ; ) *dst++ = *src++; } /* dst and src possibly overlap, copy decreasingly so that src <= dst is ok */ static inline void mpfq_copyd(mp_limb_t * dst, const mp_limb_t * src, mp_size_t n) { // mpn_copyd(dst, src, n); for(dst += n, src += n ; n-- ; ) *--dst = *--src; } static inline void mpfq_zero(mp_limb_t * dst, mp_size_t n) { // mpn_zero(dst, 0, n); for( ; n-- ; ) *dst++ = 0; } #endif #ifdef __cplusplus } #endif #endif /* MPFQ_H_ */ gf2x-1.2/fft/mpfq/mpfq_gf2n_common.h0000644000327606072450000000555213125214701014310 00000000000000#ifndef MPFQ_GF2N_COMMON_H_ #define MPFQ_GF2N_COMMON_H_ #include "mpfq.h" #ifdef __cplusplus extern "C" { #endif // type for small field char 2 typedef struct { int io_type; } mpfq_2_field_struct; typedef mpfq_2_field_struct mpfq_2_field[1]; typedef mpfq_2_field_struct * mpfq_2_dst_field; #if GNUC_VERSION(4,3,0) || GNUC_VERSION(4,3,1) #warning "Your GCC version is buggy. Binary fields may fail randomly" #endif /* include some helpers for SSE intrinsics */ #ifdef __SSE2__ /* maybe a configure-time check would be better */ #include #include #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _mpfq_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _mpfq_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _mpfq_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _mpfq_mm_cvtsi64_m64((int64_t) (lo)), \ _mpfq_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _mpfq_mm_set1_epi64(u) _mm_set1_epi64( _mpfq_mm_cvtsi64_m64((int64_t) (u))) /* _m128i from 2 int64_t CONSTANTS (and try to get suffix right) */ #define _mpfq_mm_setr_epi64_c(lo, hi) \ _mm_setr_epi64( \ _mpfq_mm_cvtsi64_m64(INT64_C(lo)), \ _mpfq_mm_cvtsi64_m64(INT64_C(hi)) \ ) /* _m128i from 1 int64_t CONSTANT (and try to get suffix right) */ #define _mpfq_mm_set1_epi64_c(u) _mm_set1_epi64( _mpfq_mm_cvtsi64_m64(INT64_C(u))) /* and same for 32-bits (which, for some, have SSE-2) */ #define _mpfq_mm_setr_epi32(a0, a1, a2, a3) \ _mm_setr_epi32( \ (int32_t) (a0), \ (int32_t) (a1), \ (int32_t) (a2), \ (int32_t) (a3) \ ) #define _mpfq_mm_set1_epi32(u) _mm_set1_epi32( (int32_t) (u)) #define _mpfq_mm_setr_epi32_c(a0, a1, a2, a3) \ _mm_setr_epi32( \ (INT32_C(a0)), \ (INT32_C(a1)), \ (INT32_C(a2)), \ (INT32_C(a3)) \ ) #define _mpfq_mm_set1_epi32_c(u) _mm_set1_epi32(INT32_C(u)) #endif /* __SSE2__ */ #ifdef __cplusplus } #endif #endif /* MPFQ_GF2N_COMMON_H_ */ gf2x-1.2/fft/mpfq/mpfq_name_K.h0000644000327606072450000003126013125214676013304 00000000000000#ifndef MPFQ_NAME_K_H_ #define MPFQ_NAME_K_H_ /* Automatically generated file. * * This header file is just wrap-up code for accessing a global finite * field with convenient aliases. * * Note that this file is automatically generated from the mpfq api, and * is therefore guaranteed to contain all the api functions usable in the * current api_extensions. */ #ifndef MPFQ_LAST_GENERATED_TAG #error "Please include an mpfq-generated header first" #endif /* cpp has its infelicities. Yes the extra step is needed */ #ifndef MPFQ_CONCAT4 #define MPFQ_CONCAT4(X,Y,Z,T) X ## Y ## Z ## T #endif #ifndef MPFQ_CREATE_FUNCTION_NAME #define MPFQ_CREATE_FUNCTION_NAME(TAG,NAME) MPFQ_CONCAT4(mpfq_,TAG,_,NAME) #endif #define Kcommon_name_(X) MPFQ_CREATE_FUNCTION_NAME(MPFQ_LAST_GENERATED_TAG,X) #define Kfield Kcommon_name_(field) #define Kdst_field Kcommon_name_(dst_field) #define Kelt Kcommon_name_(elt) #define Kdst_elt Kcommon_name_(dst_elt) #define Ksrc_elt Kcommon_name_(src_elt) #define Kelt_ur Kcommon_name_(elt_ur) #define Kdst_elt_ur Kcommon_name_(dst_elt_ur) #define Ksrc_elt_ur Kcommon_name_(src_elt_ur) #define Kvec Kcommon_name_(vec) #define Kdst_vec Kcommon_name_(dst_vec) #define Ksrc_vec Kcommon_name_(src_vec) #define Kvec_ur Kcommon_name_(vec_ur) #define Kdst_vec_ur Kcommon_name_(dst_vec_ur) #define Ksrc_vec_ur Kcommon_name_(src_vec_ur) #define Kpoly Kcommon_name_(poly) #define Kdst_poly Kcommon_name_(dst_poly) #define Ksrc_poly Kcommon_name_(src_poly) #define Kimpl_name() Kcommon_name_(impl_name) () #define Kimpl_max_characteristic_bits() Kcommon_name_(impl_max_characteristic_bits) () #define Kimpl_max_degree() Kcommon_name_(impl_max_degree) () #define Kfield_characteristic(a0) Kcommon_name_(field_characteristic) (K,a0) #define Kfield_characteristic_bits() Kcommon_name_(field_characteristic_bits) (K) #define Kfield_degree() Kcommon_name_(field_degree) (K) #define Kfield_init() Kcommon_name_(field_init) (K) #define Kfield_clear() Kcommon_name_(field_clear) (K) #define Kfield_specify(a0,a1) Kcommon_name_(field_specify) (K,a0,a1) #define Kfield_setopt(a0,a1) Kcommon_name_(field_setopt) (K,a0,a1) #define Kinit(a0) Kcommon_name_(init) (K,a0) #define Kclear(a0) Kcommon_name_(clear) (K,a0) #define Kset(a0,a1) Kcommon_name_(set) (K,a0,a1) #define Kset_ui(a0,a1) Kcommon_name_(set_ui) (K,a0,a1) #define Kset_zero(a0) Kcommon_name_(set_zero) (K,a0) #define Kget_ui(a0) Kcommon_name_(get_ui) (K,a0) #define Kset_mpn(a0,a1,a2) Kcommon_name_(set_mpn) (K,a0,a1,a2) #define Kset_mpz(a0,a1) Kcommon_name_(set_mpz) (K,a0,a1) #define Kget_mpn(a0,a1) Kcommon_name_(get_mpn) (K,a0,a1) #define Kget_mpz(a0,a1) Kcommon_name_(get_mpz) (K,a0,a1) #define Kset_uipoly(a0,a1) Kcommon_name_(set_uipoly) (K,a0,a1) #define Kset_uipoly_wide(a0,a1,a2) Kcommon_name_(set_uipoly_wide) (K,a0,a1,a2) #define Kget_uipoly(a0) Kcommon_name_(get_uipoly) (K,a0) #define Kget_uipoly_wide(a0,a1) Kcommon_name_(get_uipoly_wide) (K,a0,a1) #define Krandom(a0,a1) Kcommon_name_(random) (K,a0,a1) #define Krandom2(a0,a1) Kcommon_name_(random2) (K,a0,a1) #define Kadd(a0,a1,a2) Kcommon_name_(add) (K,a0,a1,a2) #define Ksub(a0,a1,a2) Kcommon_name_(sub) (K,a0,a1,a2) #define Kneg(a0,a1) Kcommon_name_(neg) (K,a0,a1) #define Kmul(a0,a1,a2) Kcommon_name_(mul) (K,a0,a1,a2) #define Ksqr(a0,a1) Kcommon_name_(sqr) (K,a0,a1) #define Kis_sqr(a0) Kcommon_name_(is_sqr) (K,a0) #define Ksqrt(a0,a1) Kcommon_name_(sqrt) (K,a0,a1) #define Kpow(a0,a1,a2,a3) Kcommon_name_(pow) (K,a0,a1,a2,a3) #define Kpowz(a0,a1,a2) Kcommon_name_(powz) (K,a0,a1,a2) #define Kfrobenius(a0,a1) Kcommon_name_(frobenius) (K,a0,a1) #define Kadd_ui(a0,a1,a2) Kcommon_name_(add_ui) (K,a0,a1,a2) #define Ksub_ui(a0,a1,a2) Kcommon_name_(sub_ui) (K,a0,a1,a2) #define Kmul_ui(a0,a1,a2) Kcommon_name_(mul_ui) (K,a0,a1,a2) #define Knormalize(a0) Kcommon_name_(normalize) (K,a0) #define Kadd_uipoly(a0,a1,a2) Kcommon_name_(add_uipoly) (K,a0,a1,a2) #define Ksub_uipoly(a0,a1,a2) Kcommon_name_(sub_uipoly) (K,a0,a1,a2) #define Kmul_uipoly(a0,a1,a2) Kcommon_name_(mul_uipoly) (K,a0,a1,a2) #define Kinv(a0,a1) Kcommon_name_(inv) (K,a0,a1) #define Kas_solve(a0,a1) Kcommon_name_(as_solve) (K,a0,a1) #define Ktrace(a0) Kcommon_name_(trace) (K,a0) #define Khadamard(a0,a1,a2,a3) Kcommon_name_(hadamard) (K,a0,a1,a2,a3) #define Kelt_ur_init(a0) Kcommon_name_(elt_ur_init) (K,a0) #define Kelt_ur_clear(a0) Kcommon_name_(elt_ur_clear) (K,a0) #define Kelt_ur_set(a0,a1) Kcommon_name_(elt_ur_set) (K,a0,a1) #define Kelt_ur_set_elt(a0,a1) Kcommon_name_(elt_ur_set_elt) (K,a0,a1) #define Kelt_ur_set_zero(a0) Kcommon_name_(elt_ur_set_zero) (K,a0) #define Kelt_ur_set_ui(a0,a1) Kcommon_name_(elt_ur_set_ui) (K,a0,a1) #define Kelt_ur_add(a0,a1,a2) Kcommon_name_(elt_ur_add) (K,a0,a1,a2) #define Kelt_ur_neg(a0,a1) Kcommon_name_(elt_ur_neg) (K,a0,a1) #define Kelt_ur_sub(a0,a1,a2) Kcommon_name_(elt_ur_sub) (K,a0,a1,a2) #define Kmul_ur(a0,a1,a2) Kcommon_name_(mul_ur) (K,a0,a1,a2) #define Ksqr_ur(a0,a1) Kcommon_name_(sqr_ur) (K,a0,a1) #define Kreduce(a0,a1) Kcommon_name_(reduce) (K,a0,a1) #define Kaddmul_si_ur(a0,a1,a2) Kcommon_name_(addmul_si_ur) (K,a0,a1,a2) #define Kcmp(a0,a1) Kcommon_name_(cmp) (K,a0,a1) #define Kcmp_ui(a0,a1) Kcommon_name_(cmp_ui) (K,a0,a1) #define Kis_zero(a0) Kcommon_name_(is_zero) (K,a0) #define Kmgy_enc(a0,a1) Kcommon_name_(mgy_enc) (K,a0,a1) #define Kmgy_dec(a0,a1) Kcommon_name_(mgy_dec) (K,a0,a1) #define Kasprint(a0,a1) Kcommon_name_(asprint) (K,a0,a1) #define Kfprint(a0,a1) Kcommon_name_(fprint) (K,a0,a1) #define Kprint(a0) Kcommon_name_(print) (K,a0) #define Ksscan(a0,a1) Kcommon_name_(sscan) (K,a0,a1) #define Kfscan(a0,a1) Kcommon_name_(fscan) (K,a0,a1) #define Kscan(a0) Kcommon_name_(scan) (K,a0) #define Kread(a0,a1) Kcommon_name_(read) (K,a0,a1) #define Kimportdata(a0,a1,a2,a3) Kcommon_name_(importdata) (K,a0,a1,a2,a3) #define Kwrite(a0,a1) Kcommon_name_(write) (K,a0,a1) #define Kexportdata(a0,a1,a2,a3) Kcommon_name_(exportdata) (K,a0,a1,a2,a3) #define Kvec_init(a0,a1) Kcommon_name_(vec_init) (K,a0,a1) #define Kvec_reinit(a0,a1,a2) Kcommon_name_(vec_reinit) (K,a0,a1,a2) #define Kvec_clear(a0,a1) Kcommon_name_(vec_clear) (K,a0,a1) #define Kvec_set(a0,a1,a2) Kcommon_name_(vec_set) (K,a0,a1,a2) #define Kvec_set_zero(a0,a1) Kcommon_name_(vec_set_zero) (K,a0,a1) #define Kvec_setcoeff(a0,a1,a2) Kcommon_name_(vec_setcoeff) (K,a0,a1,a2) #define Kvec_setcoeff_ui(a0,a1,a2) Kcommon_name_(vec_setcoeff_ui) (K,a0,a1,a2) #define Kvec_getcoeff(a0,a1,a2) Kcommon_name_(vec_getcoeff) (K,a0,a1,a2) #define Kvec_add(a0,a1,a2,a3) Kcommon_name_(vec_add) (K,a0,a1,a2,a3) #define Kvec_neg(a0,a1,a2) Kcommon_name_(vec_neg) (K,a0,a1,a2) #define Kvec_rev(a0,a1,a2) Kcommon_name_(vec_rev) (K,a0,a1,a2) #define Kvec_sub(a0,a1,a2,a3) Kcommon_name_(vec_sub) (K,a0,a1,a2,a3) #define Kvec_scal_mul(a0,a1,a2,a3) Kcommon_name_(vec_scal_mul) (K,a0,a1,a2,a3) #define Kvec_conv(a0,a1,a2,a3,a4) Kcommon_name_(vec_conv) (K,a0,a1,a2,a3,a4) #define Kvec_random(a0,a1,a2) Kcommon_name_(vec_random) (K,a0,a1,a2) #define Kvec_random2(a0,a1,a2) Kcommon_name_(vec_random2) (K,a0,a1,a2) #define Kvec_cmp(a0,a1,a2) Kcommon_name_(vec_cmp) (K,a0,a1,a2) #define Kvec_is_zero(a0,a1) Kcommon_name_(vec_is_zero) (K,a0,a1) #define Kvec_subvec(a0,a1) Kcommon_name_(vec_subvec) (K,a0,a1) #define Kvec_subvec_const(a0,a1) Kcommon_name_(vec_subvec_const) (K,a0,a1) #define Kvec_coeff_ptr(a0,a1) Kcommon_name_(vec_coeff_ptr) (K,a0,a1) #define Kvec_coeff_ptr_const(a0,a1) Kcommon_name_(vec_coeff_ptr_const) (K,a0,a1) #define Kvec_asprint(a0,a1,a2) Kcommon_name_(vec_asprint) (K,a0,a1,a2) #define Kvec_fprint(a0,a1,a2) Kcommon_name_(vec_fprint) (K,a0,a1,a2) #define Kvec_print(a0,a1) Kcommon_name_(vec_print) (K,a0,a1) #define Kvec_sscan(a0,a1,a2) Kcommon_name_(vec_sscan) (K,a0,a1,a2) #define Kvec_fscan(a0,a1,a2) Kcommon_name_(vec_fscan) (K,a0,a1,a2) #define Kvec_scan(a0,a1) Kcommon_name_(vec_scan) (K,a0,a1) #define Kvec_read(a0,a1,a2) Kcommon_name_(vec_read) (K,a0,a1,a2) #define Kvec_write(a0,a1,a2) Kcommon_name_(vec_write) (K,a0,a1,a2) #define Kvec_import(a0,a1,a2,a3) Kcommon_name_(vec_import) (K,a0,a1,a2,a3) #define Kvec_export(a0,a1,a2,a3) Kcommon_name_(vec_export) (K,a0,a1,a2,a3) #define Kvec_ur_init(a0,a1) Kcommon_name_(vec_ur_init) (K,a0,a1) #define Kvec_ur_set_zero(a0,a1) Kcommon_name_(vec_ur_set_zero) (K,a0,a1) #define Kvec_ur_set_vec(a0,a1,a2) Kcommon_name_(vec_ur_set_vec) (K,a0,a1,a2) #define Kvec_ur_reinit(a0,a1,a2) Kcommon_name_(vec_ur_reinit) (K,a0,a1,a2) #define Kvec_ur_clear(a0,a1) Kcommon_name_(vec_ur_clear) (K,a0,a1) #define Kvec_ur_set(a0,a1,a2) Kcommon_name_(vec_ur_set) (K,a0,a1,a2) #define Kvec_ur_setcoeff(a0,a1,a2) Kcommon_name_(vec_ur_setcoeff) (K,a0,a1,a2) #define Kvec_ur_getcoeff(a0,a1,a2) Kcommon_name_(vec_ur_getcoeff) (K,a0,a1,a2) #define Kvec_ur_add(a0,a1,a2,a3) Kcommon_name_(vec_ur_add) (K,a0,a1,a2,a3) #define Kvec_ur_sub(a0,a1,a2,a3) Kcommon_name_(vec_ur_sub) (K,a0,a1,a2,a3) #define Kvec_ur_neg(a0,a1,a2) Kcommon_name_(vec_ur_neg) (K,a0,a1,a2) #define Kvec_ur_rev(a0,a1,a2) Kcommon_name_(vec_ur_rev) (K,a0,a1,a2) #define Kvec_scal_mul_ur(a0,a1,a2,a3) Kcommon_name_(vec_scal_mul_ur) (K,a0,a1,a2,a3) #define Kvec_conv_ur(a0,a1,a2,a3,a4) Kcommon_name_(vec_conv_ur) (K,a0,a1,a2,a3,a4) #define Kvec_reduce(a0,a1,a2) Kcommon_name_(vec_reduce) (K,a0,a1,a2) #define Kvec_ur_subvec(a0,a1) Kcommon_name_(vec_ur_subvec) (K,a0,a1) #define Kvec_ur_subvec_const(a0,a1) Kcommon_name_(vec_ur_subvec_const) (K,a0,a1) #define Kvec_ur_coeff_ptr(a0,a1) Kcommon_name_(vec_ur_coeff_ptr) (K,a0,a1) #define Kvec_ur_coeff_ptr_const(a0,a1) Kcommon_name_(vec_ur_coeff_ptr_const) (K,a0,a1) #define Kvec_elt_stride(a0) Kcommon_name_(vec_elt_stride) (K,a0) #define Kvec_ur_elt_stride(a0) Kcommon_name_(vec_ur_elt_stride) (K,a0) #define Kpoly_init(a0,a1) Kcommon_name_(poly_init) (K,a0,a1) #define Kpoly_clear(a0) Kcommon_name_(poly_clear) (K,a0) #define Kpoly_set(a0,a1) Kcommon_name_(poly_set) (K,a0,a1) #define Kpoly_setmonic(a0,a1) Kcommon_name_(poly_setmonic) (K,a0,a1) #define Kpoly_setcoeff(a0,a1,a2) Kcommon_name_(poly_setcoeff) (K,a0,a1,a2) #define Kpoly_setcoeff_ui(a0,a1,a2) Kcommon_name_(poly_setcoeff_ui) (K,a0,a1,a2) #define Kpoly_getcoeff(a0,a1,a2) Kcommon_name_(poly_getcoeff) (K,a0,a1,a2) #define Kpoly_deg(a0) Kcommon_name_(poly_deg) (K,a0) #define Kpoly_add(a0,a1,a2) Kcommon_name_(poly_add) (K,a0,a1,a2) #define Kpoly_sub(a0,a1,a2) Kcommon_name_(poly_sub) (K,a0,a1,a2) #define Kpoly_set_ui(a0,a1) Kcommon_name_(poly_set_ui) (K,a0,a1) #define Kpoly_add_ui(a0,a1,a2) Kcommon_name_(poly_add_ui) (K,a0,a1,a2) #define Kpoly_sub_ui(a0,a1,a2) Kcommon_name_(poly_sub_ui) (K,a0,a1,a2) #define Kpoly_neg(a0,a1) Kcommon_name_(poly_neg) (K,a0,a1) #define Kpoly_scal_mul(a0,a1,a2) Kcommon_name_(poly_scal_mul) (K,a0,a1,a2) #define Kpoly_mul(a0,a1,a2) Kcommon_name_(poly_mul) (K,a0,a1,a2) #define Kpoly_divmod(a0,a1,a2,a3) Kcommon_name_(poly_divmod) (K,a0,a1,a2,a3) #define Kpoly_precomp_mod(a0,a1) Kcommon_name_(poly_precomp_mod) (K,a0,a1) #define Kpoly_mod_pre(a0,a1,a2,a3) Kcommon_name_(poly_mod_pre) (K,a0,a1,a2,a3) #define Kpoly_gcd(a0,a1,a2) Kcommon_name_(poly_gcd) (K,a0,a1,a2) #define Kpoly_xgcd(a0,a1,a2,a3,a4) Kcommon_name_(poly_xgcd) (K,a0,a1,a2,a3,a4) #define Kpoly_random(a0,a1,a2) Kcommon_name_(poly_random) (K,a0,a1,a2) #define Kpoly_random2(a0,a1,a2) Kcommon_name_(poly_random2) (K,a0,a1,a2) #define Kpoly_cmp(a0,a1) Kcommon_name_(poly_cmp) (K,a0,a1) #define Kpoly_asprint(a0,a1) Kcommon_name_(poly_asprint) (K,a0,a1) #define Kpoly_fprint(a0,a1) Kcommon_name_(poly_fprint) (K,a0,a1) #define Kpoly_print(a0) Kcommon_name_(poly_print) (K,a0) #define Kpoly_sscan(a0,a1) Kcommon_name_(poly_sscan) (K,a0,a1) #define Kpoly_fscan(a0,a1) Kcommon_name_(poly_fscan) (K,a0,a1) #define Kpoly_scan(a0) Kcommon_name_(poly_scan) (K,a0) #define Kgroupsize() Kcommon_name_(groupsize) (K) #define Koffset(a0) Kcommon_name_(offset) (K,a0) #define Kstride() Kcommon_name_(stride) (K) #define Kset_ui_at(a0,a1,a2) Kcommon_name_(set_ui_at) (K,a0,a1,a2) #define Kset_ui_all(a0,a1) Kcommon_name_(set_ui_all) (K,a0,a1) #define Kelt_ur_set_ui_at(a0,a1,a2) Kcommon_name_(elt_ur_set_ui_at) (K,a0,a1,a2) #define Kelt_ur_set_ui_all(a0,a1) Kcommon_name_(elt_ur_set_ui_all) (K,a0,a1) #define Kdotprod(a0,a1,a2,a3) Kcommon_name_(dotprod) (K,a0,a1,a2,a3) #define Kmul_constant_ui(a0,a1,a2) Kcommon_name_(mul_constant_ui) (K,a0,a1,a2) #define Kmember_template_dotprod(a0,a1,a2,a3,a4) Kcommon_name_(member_template_dotprod) (K,a0,a1,a2,a3,a4) #define Kmember_template_addmul_tiny(a0,a1,a2,a3,a4) Kcommon_name_(member_template_addmul_tiny) (K,a0,a1,a2,a3,a4) #define Kmember_template_transpose(a0,a1,a2) Kcommon_name_(member_template_transpose) (K,a0,a1,a2) #define Koo_field_init() Kcommon_name_(oo_field_init) (K) #define Koo_field_clear() Kcommon_name_(oo_field_clear) (K) /* customary link reference to the field -- forces good habit of defining it somewhere */ extern Kfield K; /* another customary shorthand */ #define Kdegree Kfield_degree() #endif /* MPFQ_NAME_K_H_ */ gf2x-1.2/fft/Makefile.am0000644000327606072450000000700113125146510011772 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. ACLOCAL_AMFLAGS=-I config --install AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)/mpfq # We want to stress-test the libcantor_la implementation with the following # extra features (compile-time flags) CCOMMON=-DENGINE_CANTOR -DESCAPE_CANTOR_SYMBOLS C64=$(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=64 C64nt=$(C64) -DWITHOUT_CANTOR_TRUNCATION C64gm=$(C64) -DCANTOR_GM C64gmt=$(C64gm) -DCANTOR_GM_TRUNCATE C128=$(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=128 C128nt=$(C128) -DWITHOUT_CANTOR_TRUNCATION C128gm=$(C128) -DCANTOR_GM C128gmt=$(C128gm) -DCANTOR_GM_TRUNCATE check_LTLIBRARIES= EXTRA_DIST= \ mpfq/README.mpfq \ mpfq/i386/mpfq_2_128.c \ mpfq/i386/mpfq_2_128.h \ mpfq/i386/mpfq_2_64.c \ mpfq/i386/mpfq_2_64.h \ mpfq/mpfq.h \ mpfq/mpfq_gf2n_common.h \ mpfq/mpfq_name_K.h \ mpfq/x86_64/mpfq_2_128.c \ mpfq/x86_64/mpfq_2_128.h \ mpfq/x86_64/mpfq_2_64.c \ mpfq/x86_64/mpfq_2_64.h \ fft_adapter.hpp # ternary fft is included by default in gf2x. check_LTLIBRARIES += libternary.la libternary_la_SOURCES=gf2x-ternary-fft.c libternary_la_CFLAGS= $(AM_CFLAGS) -DENGINE_TERNARY libternary_la_LIBADD= $(top_builddir)/libgf2x.la # The rest is optional if ENABLE_FFT_INTERFACE check_LTLIBRARIES += libcantor64.la libcantor64_la_SOURCES=gf2x-cantor-fft.c libcantor64_la_CFLAGS= $(AM_CFLAGS) $(C64) check_LTLIBRARIES += libcantor64nt.la libcantor64nt_la_SOURCES=gf2x-cantor-fft.c libcantor64nt_la_CFLAGS= $(AM_CFLAGS) $(C64nt) check_LTLIBRARIES += libcantor64gm.la libcantor64gm_la_SOURCES=gf2x-cantor-fft.c libcantor64gm_la_CFLAGS= $(AM_CFLAGS) $(C64gm) check_LTLIBRARIES += libcantor64gmt.la libcantor64gmt_la_SOURCES=gf2x-cantor-fft.c libcantor64gmt_la_CFLAGS= $(AM_CFLAGS) $(C64gmt) check_LTLIBRARIES += libcantor128.la libcantor128_la_SOURCES=gf2x-cantor-fft.c libcantor128_la_CFLAGS= $(AM_CFLAGS) $(C128) check_LTLIBRARIES += libcantor128nt.la libcantor128nt_la_SOURCES=gf2x-cantor-fft.c libcantor128nt_la_CFLAGS= $(AM_CFLAGS) $(C128nt) check_LTLIBRARIES += libcantor128gm.la libcantor128gm_la_SOURCES=gf2x-cantor-fft.c libcantor128gm_la_CFLAGS= $(AM_CFLAGS) $(C128gm) check_LTLIBRARIES += libcantor128gmt.la libcantor128gmt_la_SOURCES=gf2x-cantor-fft.c libcantor128gmt_la_CFLAGS= $(AM_CFLAGS) $(C128gmt) endif gf2x-1.2/fft/Makefile.in0000644000327606072450000011656613126452055012031 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ # The rest is optional @ENABLE_FFT_INTERFACE_TRUE@am__append_1 = libcantor64.la \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor64nt.la libcantor64gm.la \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor64gmt.la libcantor128.la \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor128nt.la libcantor128gm.la \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor128gmt.la subdir = fft ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = libcantor128_la_LIBADD = am__libcantor128_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128_la_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor128_la-gf2x-cantor-fft.lo libcantor128_la_OBJECTS = $(am_libcantor128_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcantor128_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor128_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128_la_rpath = libcantor128gm_la_LIBADD = am__libcantor128gm_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128gm_la_OBJECTS = libcantor128gm_la-gf2x-cantor-fft.lo libcantor128gm_la_OBJECTS = $(am_libcantor128gm_la_OBJECTS) libcantor128gm_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor128gm_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128gm_la_rpath = libcantor128gmt_la_LIBADD = am__libcantor128gmt_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128gmt_la_OBJECTS = libcantor128gmt_la-gf2x-cantor-fft.lo libcantor128gmt_la_OBJECTS = $(am_libcantor128gmt_la_OBJECTS) libcantor128gmt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor128gmt_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128gmt_la_rpath = libcantor128nt_la_LIBADD = am__libcantor128nt_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128nt_la_OBJECTS = libcantor128nt_la-gf2x-cantor-fft.lo libcantor128nt_la_OBJECTS = $(am_libcantor128nt_la_OBJECTS) libcantor128nt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor128nt_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor128nt_la_rpath = libcantor64_la_LIBADD = am__libcantor64_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64_la_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ libcantor64_la-gf2x-cantor-fft.lo libcantor64_la_OBJECTS = $(am_libcantor64_la_OBJECTS) libcantor64_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor64_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64_la_rpath = libcantor64gm_la_LIBADD = am__libcantor64gm_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64gm_la_OBJECTS = libcantor64gm_la-gf2x-cantor-fft.lo libcantor64gm_la_OBJECTS = $(am_libcantor64gm_la_OBJECTS) libcantor64gm_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor64gm_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64gm_la_rpath = libcantor64gmt_la_LIBADD = am__libcantor64gmt_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64gmt_la_OBJECTS = libcantor64gmt_la-gf2x-cantor-fft.lo libcantor64gmt_la_OBJECTS = $(am_libcantor64gmt_la_OBJECTS) libcantor64gmt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor64gmt_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64gmt_la_rpath = libcantor64nt_la_LIBADD = am__libcantor64nt_la_SOURCES_DIST = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64nt_la_OBJECTS = libcantor64nt_la-gf2x-cantor-fft.lo libcantor64nt_la_OBJECTS = $(am_libcantor64nt_la_OBJECTS) libcantor64nt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libcantor64nt_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ @ENABLE_FFT_INTERFACE_TRUE@am_libcantor64nt_la_rpath = libternary_la_DEPENDENCIES = $(top_builddir)/libgf2x.la am_libternary_la_OBJECTS = libternary_la-gf2x-ternary-fft.lo libternary_la_OBJECTS = $(am_libternary_la_OBJECTS) libternary_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libternary_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gf2x depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcantor128_la_SOURCES) $(libcantor128gm_la_SOURCES) \ $(libcantor128gmt_la_SOURCES) $(libcantor128nt_la_SOURCES) \ $(libcantor64_la_SOURCES) $(libcantor64gm_la_SOURCES) \ $(libcantor64gmt_la_SOURCES) $(libcantor64nt_la_SOURCES) \ $(libternary_la_SOURCES) DIST_SOURCES = $(am__libcantor128_la_SOURCES_DIST) \ $(am__libcantor128gm_la_SOURCES_DIST) \ $(am__libcantor128gmt_la_SOURCES_DIST) \ $(am__libcantor128nt_la_SOURCES_DIST) \ $(am__libcantor64_la_SOURCES_DIST) \ $(am__libcantor64gm_la_SOURCES_DIST) \ $(am__libcantor64gmt_la_SOURCES_DIST) \ $(am__libcantor64nt_la_SOURCES_DIST) $(libternary_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I config --install AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)/mpfq # We want to stress-test the libcantor_la implementation with the following # extra features (compile-time flags) CCOMMON = -DENGINE_CANTOR -DESCAPE_CANTOR_SYMBOLS C64 = $(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=64 C64nt = $(C64) -DWITHOUT_CANTOR_TRUNCATION C64gm = $(C64) -DCANTOR_GM C64gmt = $(C64gm) -DCANTOR_GM_TRUNCATE C128 = $(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=128 C128nt = $(C128) -DWITHOUT_CANTOR_TRUNCATION C128gm = $(C128) -DCANTOR_GM C128gmt = $(C128gm) -DCANTOR_GM_TRUNCATE # ternary fft is included by default in gf2x. check_LTLIBRARIES = libternary.la $(am__append_1) EXTRA_DIST = \ mpfq/README.mpfq \ mpfq/i386/mpfq_2_128.c \ mpfq/i386/mpfq_2_128.h \ mpfq/i386/mpfq_2_64.c \ mpfq/i386/mpfq_2_64.h \ mpfq/mpfq.h \ mpfq/mpfq_gf2n_common.h \ mpfq/mpfq_name_K.h \ mpfq/x86_64/mpfq_2_128.c \ mpfq/x86_64/mpfq_2_128.h \ mpfq/x86_64/mpfq_2_64.c \ mpfq/x86_64/mpfq_2_64.h \ fft_adapter.hpp libternary_la_SOURCES = gf2x-ternary-fft.c libternary_la_CFLAGS = $(AM_CFLAGS) -DENGINE_TERNARY libternary_la_LIBADD = $(top_builddir)/libgf2x.la @ENABLE_FFT_INTERFACE_TRUE@libcantor64_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor64_la_CFLAGS = $(AM_CFLAGS) $(C64) @ENABLE_FFT_INTERFACE_TRUE@libcantor64nt_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor64nt_la_CFLAGS = $(AM_CFLAGS) $(C64nt) @ENABLE_FFT_INTERFACE_TRUE@libcantor64gm_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor64gm_la_CFLAGS = $(AM_CFLAGS) $(C64gm) @ENABLE_FFT_INTERFACE_TRUE@libcantor64gmt_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor64gmt_la_CFLAGS = $(AM_CFLAGS) $(C64gmt) @ENABLE_FFT_INTERFACE_TRUE@libcantor128_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor128_la_CFLAGS = $(AM_CFLAGS) $(C128) @ENABLE_FFT_INTERFACE_TRUE@libcantor128nt_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor128nt_la_CFLAGS = $(AM_CFLAGS) $(C128nt) @ENABLE_FFT_INTERFACE_TRUE@libcantor128gm_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor128gm_la_CFLAGS = $(AM_CFLAGS) $(C128gm) @ENABLE_FFT_INTERFACE_TRUE@libcantor128gmt_la_SOURCES = gf2x-cantor-fft.c @ENABLE_FFT_INTERFACE_TRUE@libcantor128gmt_la_CFLAGS = $(AM_CFLAGS) $(C128gmt) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fft/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu fft/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) @list='$(check_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcantor128.la: $(libcantor128_la_OBJECTS) $(libcantor128_la_DEPENDENCIES) $(EXTRA_libcantor128_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor128_la_LINK) $(am_libcantor128_la_rpath) $(libcantor128_la_OBJECTS) $(libcantor128_la_LIBADD) $(LIBS) libcantor128gm.la: $(libcantor128gm_la_OBJECTS) $(libcantor128gm_la_DEPENDENCIES) $(EXTRA_libcantor128gm_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor128gm_la_LINK) $(am_libcantor128gm_la_rpath) $(libcantor128gm_la_OBJECTS) $(libcantor128gm_la_LIBADD) $(LIBS) libcantor128gmt.la: $(libcantor128gmt_la_OBJECTS) $(libcantor128gmt_la_DEPENDENCIES) $(EXTRA_libcantor128gmt_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor128gmt_la_LINK) $(am_libcantor128gmt_la_rpath) $(libcantor128gmt_la_OBJECTS) $(libcantor128gmt_la_LIBADD) $(LIBS) libcantor128nt.la: $(libcantor128nt_la_OBJECTS) $(libcantor128nt_la_DEPENDENCIES) $(EXTRA_libcantor128nt_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor128nt_la_LINK) $(am_libcantor128nt_la_rpath) $(libcantor128nt_la_OBJECTS) $(libcantor128nt_la_LIBADD) $(LIBS) libcantor64.la: $(libcantor64_la_OBJECTS) $(libcantor64_la_DEPENDENCIES) $(EXTRA_libcantor64_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor64_la_LINK) $(am_libcantor64_la_rpath) $(libcantor64_la_OBJECTS) $(libcantor64_la_LIBADD) $(LIBS) libcantor64gm.la: $(libcantor64gm_la_OBJECTS) $(libcantor64gm_la_DEPENDENCIES) $(EXTRA_libcantor64gm_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor64gm_la_LINK) $(am_libcantor64gm_la_rpath) $(libcantor64gm_la_OBJECTS) $(libcantor64gm_la_LIBADD) $(LIBS) libcantor64gmt.la: $(libcantor64gmt_la_OBJECTS) $(libcantor64gmt_la_DEPENDENCIES) $(EXTRA_libcantor64gmt_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor64gmt_la_LINK) $(am_libcantor64gmt_la_rpath) $(libcantor64gmt_la_OBJECTS) $(libcantor64gmt_la_LIBADD) $(LIBS) libcantor64nt.la: $(libcantor64nt_la_OBJECTS) $(libcantor64nt_la_DEPENDENCIES) $(EXTRA_libcantor64nt_la_DEPENDENCIES) $(AM_V_CCLD)$(libcantor64nt_la_LINK) $(am_libcantor64nt_la_rpath) $(libcantor64nt_la_OBJECTS) $(libcantor64nt_la_LIBADD) $(LIBS) libternary.la: $(libternary_la_OBJECTS) $(libternary_la_DEPENDENCIES) $(EXTRA_libternary_la_DEPENDENCIES) $(AM_V_CCLD)$(libternary_la_LINK) $(libternary_la_OBJECTS) $(libternary_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor128_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor128gm_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor128gmt_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor128nt_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor64_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor64gm_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor64gmt_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcantor64nt_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libternary_la-gf2x-ternary-fft.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libcantor128_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128_la_CFLAGS) $(CFLAGS) -MT libcantor128_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor128_la-gf2x-cantor-fft.Tpo -c -o libcantor128_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor128_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor128_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor128_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128_la_CFLAGS) $(CFLAGS) -c -o libcantor128_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor128gm_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128gm_la_CFLAGS) $(CFLAGS) -MT libcantor128gm_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor128gm_la-gf2x-cantor-fft.Tpo -c -o libcantor128gm_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor128gm_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor128gm_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor128gm_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128gm_la_CFLAGS) $(CFLAGS) -c -o libcantor128gm_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor128gmt_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128gmt_la_CFLAGS) $(CFLAGS) -MT libcantor128gmt_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor128gmt_la-gf2x-cantor-fft.Tpo -c -o libcantor128gmt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor128gmt_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor128gmt_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor128gmt_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128gmt_la_CFLAGS) $(CFLAGS) -c -o libcantor128gmt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor128nt_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128nt_la_CFLAGS) $(CFLAGS) -MT libcantor128nt_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor128nt_la-gf2x-cantor-fft.Tpo -c -o libcantor128nt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor128nt_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor128nt_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor128nt_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor128nt_la_CFLAGS) $(CFLAGS) -c -o libcantor128nt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor64_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64_la_CFLAGS) $(CFLAGS) -MT libcantor64_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor64_la-gf2x-cantor-fft.Tpo -c -o libcantor64_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor64_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor64_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor64_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64_la_CFLAGS) $(CFLAGS) -c -o libcantor64_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor64gm_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64gm_la_CFLAGS) $(CFLAGS) -MT libcantor64gm_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor64gm_la-gf2x-cantor-fft.Tpo -c -o libcantor64gm_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor64gm_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor64gm_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor64gm_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64gm_la_CFLAGS) $(CFLAGS) -c -o libcantor64gm_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor64gmt_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64gmt_la_CFLAGS) $(CFLAGS) -MT libcantor64gmt_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor64gmt_la-gf2x-cantor-fft.Tpo -c -o libcantor64gmt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor64gmt_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor64gmt_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor64gmt_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64gmt_la_CFLAGS) $(CFLAGS) -c -o libcantor64gmt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libcantor64nt_la-gf2x-cantor-fft.lo: gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64nt_la_CFLAGS) $(CFLAGS) -MT libcantor64nt_la-gf2x-cantor-fft.lo -MD -MP -MF $(DEPDIR)/libcantor64nt_la-gf2x-cantor-fft.Tpo -c -o libcantor64nt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcantor64nt_la-gf2x-cantor-fft.Tpo $(DEPDIR)/libcantor64nt_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-cantor-fft.c' object='libcantor64nt_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcantor64nt_la_CFLAGS) $(CFLAGS) -c -o libcantor64nt_la-gf2x-cantor-fft.lo `test -f 'gf2x-cantor-fft.c' || echo '$(srcdir)/'`gf2x-cantor-fft.c libternary_la-gf2x-ternary-fft.lo: gf2x-ternary-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libternary_la_CFLAGS) $(CFLAGS) -MT libternary_la-gf2x-ternary-fft.lo -MD -MP -MF $(DEPDIR)/libternary_la-gf2x-ternary-fft.Tpo -c -o libternary_la-gf2x-ternary-fft.lo `test -f 'gf2x-ternary-fft.c' || echo '$(srcdir)/'`gf2x-ternary-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libternary_la-gf2x-ternary-fft.Tpo $(DEPDIR)/libternary_la-gf2x-ternary-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x-ternary-fft.c' object='libternary_la-gf2x-ternary-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libternary_la_CFLAGS) $(CFLAGS) -c -o libternary_la-gf2x-ternary-fft.lo `test -f 'gf2x-ternary-fft.c' || echo '$(srcdir)/'`gf2x-ternary-fft.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-checkLTLIBRARIES clean-generic clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/fft/README0000644000327606072450000000020713125144017010617 00000000000000This sub-package provides a generic FFT API for multiplication of polynomials over GF(2), and an implementation of Cantor's algorithm. gf2x-1.2/fft/fft_adapter.hpp0000644000327606072450000001017612725540356012750 00000000000000/* An implementation of Cantor's algorithm for multiplication of polynomials over GF(2). Copyright 2008,2009,2010,2012 Emmanuel Thomé. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with CADO-NFS; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef FFT_ADAPTER_HPP_ #define FFT_ADAPTER_HPP_ #define CAT(X,Y) X ## _ ## Y /* _setup and _dft, _ift integer arguments correspond to lengths in * number of bits of polynomials. * * _alloc(), _free(), _get(), take number of complete polynomials. * * the size() result is the number of type-t objects which represent * _one_ polynomial. alloc(1) is thus the same as malloc(size()) */ #define DEFINE_FFT_ADAPTER(visible) \ struct visible { \ CAT(visible,info_t) o; \ typedef CAT(visible,ptr) ptr; \ typedef CAT(visible,srcptr) srcptr; \ \ visible() {} \ visible(size_t n1, size_t n2) { CAT(visible,init)(o, n1, n2); } \ ~visible() { CAT(visible,clear)(o); } \ \ private: /* Make sure we forbid copies */ \ visible(visible const& other GF2X_MAYBE_UNUSED) {} \ public: \ /* The extra argument gives the number of times the */ \ /* fft is going to be reused. It might be replaced by some */ \ /* other mechanism at some point. */ \ \ /* n1 and n2 give the length of the two operands. The */ \ /* product is taken as having length n1+n2-1 */ \ \ visible(size_t n1, size_t n2, int acc GF2X_MAYBE_UNUSED) \ { \ CAT(visible,init)(o, n1, n2, acc); \ } \ visible(size_t n1, size_t n2, visible const& other) \ { \ CAT(visible,init_similar)(o, n1, n2, other.o); \ } \ inline ptr alloc(size_t n) const { return CAT(visible,alloc)(o, n); } \ inline void free(ptr x, size_t n) const { CAT(visible,free)(o,x,n); } \ inline void zero(ptr x, size_t n) const { CAT(visible,zero)(o,x,n); } \ inline ptr get(ptr x, size_t n) const { return CAT(visible,get)(o,x,n); }\ inline srcptr get(srcptr x, size_t n) const { return CAT(visible,get_const)(o,x,n); }\ inline void dft(ptr x, const unsigned long * F, size_t n) const { \ return CAT(visible,dft)(o,x,F,n); \ } \ /* this destroys the input ! */ \ inline void ift(unsigned long * F, size_t n, ptr x) const { \ return CAT(visible,ift)(o,F,n,x); \ } \ inline void addcompose(ptr y, srcptr x1, srcptr x2) const { \ return CAT(visible,addcompose)(o,y,x1,x2); \ } \ inline void addcompose_n(ptr y, srcptr * x1, srcptr * x2, size_t n) const { \ return CAT(visible,addcompose_n)(o,y,x1,x2,n); \ } \ inline void compose(ptr y, srcptr x1, srcptr x2) const { \ return CAT(visible,compose)(o,y,x1,x2); \ } \ inline void add(ptr y, srcptr x1, srcptr x2) const { \ return CAT(visible,add)(o,y,x1,x2); \ } \ inline void cpy(ptr y, srcptr x) const { \ return CAT(visible,cpy)(o,y,x); \ } \ inline size_t size() const { \ return CAT(visible,size)(o); \ } \ static inline const char * name() { return #visible; } \ }; #endif /* FFT_ADAPTER_HPP_ */ gf2x-1.2/gf2x/0000755000327606072450000000000013126452064010114 500000000000000gf2x-1.2/gf2x/gf2x-impl.h0000644000327606072450000001000312725540356012012 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_IMPL_H_ #define GF2X_IMPL_H_ #include "gf2x.h" /* first include the stuff that even users of the library have access to */ #include "gf2x/gf2x-impl-export.h" /* then proceed to the really internal stuff */ #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-thresholds.h" /* These flags are for internal use. When a new routine is added, don't change the flags, otherwise the tuning in the already_tuned directory will become invalid. */ #define GF2X_SELECT_KARA 0 /* do not change ! */ #define GF2X_SELECT_TC3 1 #define GF2X_SELECT_TC3W 2 #define GF2X_SELECT_TC4 3 #define GF2X_SELECT_KARAX 4 #define GF2X_SELECT_TC3X 5 #define GF2X_SELECT_UNB_DFLT 0 #define GF2X_SELECT_UNB_TC3U 1 /* do not change ! */ #include #ifndef ASSERT #define ASSERT(x) assert(x) #endif #ifdef __cplusplus extern "C" { #endif extern long gf2x_toomspace(long n); extern long gf2x_toomuspace(long n); extern void gf2x_mul_basecase(unsigned long * c, const unsigned long * a, long na, const unsigned long * b, long nb); extern void gf2x_mul_toom(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); extern void gf2x_mul_kara(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); #if GF2X_HAVE_SSE2_SUPPORT && (GF2X_WORDSIZE == 64) #define HAVE_KARAX extern void gf2x_mul_karax(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); extern void gf2x_mul_tc3x(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); #endif #if GPL_CODE_PRESENT extern void gf2x_mul_tc3(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); extern void gf2x_mul_tc3w(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); extern void gf2x_mul_tc4(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk); extern void gf2x_mul_tc3u(unsigned long * c, const unsigned long * a, long sa, const unsigned long * b, unsigned long * stk); #endif /* GPL_CODE_PRESENT */ extern short gf2x_best_toom(unsigned long); extern long gf2x_toomspace(long); extern short gf2x_best_utoom(unsigned long); extern long gf2x_toomuspace(long); extern void gf2x_mul_fft(unsigned long *c, const unsigned long *a, size_t an, const unsigned long *b, size_t bn, long K); /* tunetoom.c need to poke into toom.c's tables ; that's very ugly. So * please don't use for anything else. * */ extern short best_tab[GF2X_TOOM_TUNING_LIMIT]; extern short best_utab[GF2X_TOOM_TUNING_LIMIT]; #ifdef __cplusplus } #endif #endif /* GF2X_IMPL_H_ */ gf2x-1.2/gf2x/gf2x-impl-export.h0000644000327606072450000000726512725540356013351 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_IMPL_EXPORT_H_ #define GF2X_IMPL_EXPORT_H_ #include "gf2x/gf2x-config-export.h" /* This file contains helper macros which are used in inline functions in * gf2x, and therefore potentially exposed to the users which include the * gf2x-small.h files, for getting the inlines. * * We also activate the relevant includes. */ #ifndef GF2X_MAYBE_UNUSED #if defined(__GNUC__) #define GF2X_MAYBE_UNUSED __attribute__ ((unused)) #else #define GF2X_MAYBE_UNUSED #endif #endif #include #ifdef GF2X_HAVE_SSE2_SUPPORT #include #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) /* _m128i from 2 int64_t CONSTANTS (and try to get suffix right) */ #define _gf2x_mm_setr_epi64_c(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64(INT64_C(lo)), \ _gf2x_mm_cvtsi64_m64(INT64_C(hi)) \ ) /* _m128i from 1 int64_t CONSTANT (and try to get suffix right) */ #define _gf2x_mm_set1_epi64_c(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64(INT64_C(u))) /* and same for 32-bits (which, for some, have SSE-2) */ #define _gf2x_mm_setr_epi32(a0, a1, a2, a3) \ _mm_setr_epi32( \ (int32_t) (a0), \ (int32_t) (a1), \ (int32_t) (a2), \ (int32_t) (a3) \ ) #define _gf2x_mm_set1_epi32(u) _mm_set1_epi32( (int32_t) (u)) #define _gf2x_mm_setr_epi32_c(a0, a1, a2, a3) \ _mm_setr_epi32( \ (INT32_C(a0)), \ (INT32_C(a1)), \ (INT32_C(a2)), \ (INT32_C(a3)) \ ) #define _gf2x_mm_set1_epi32_c(u) _mm_set1_epi32(INT32_C(u)) #endif #ifdef GF2X_HAVE_PCLMUL_SUPPORT #include #endif #endif /* GF2X_IMPL_EXPORT_H_ */ gf2x-1.2/gf2x/gf2x-small.h0000644000327606072450000001044012725540356012166 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Main file for Karatsuba and Toom-Cook multiplication over GF(2)[x]. */ #ifndef GF2X_SMALL_H_ #define GF2X_SMALL_H_ #include "gf2x.h" /* the header files included here will either put macros in the * namespaces GF2X_* or gf2x_*, or possibly macros with generally * accepted meaning such as GF2X_MAYBE_UNUSED and such */ #include "gf2x/gf2x-config-export.h" /* GF2X_HAVE_* macros */ #include "gf2x/gf2x-impl-export.h" /* utility macros */ #include "gf2x/gf2x-thresholds.h" /* GF2X_STORAGE_CLASS_* macros */ #ifdef __cplusplus extern "C" { #endif GF2X_STORAGE_CLASS_mul1 void gf2x_mul1(unsigned long *c, unsigned long a, unsigned long b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n(unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n(unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul2 void gf2x_mul2(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul3 void gf2x_mul3(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul4 void gf2x_mul4(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul5 void gf2x_mul5(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul6 void gf2x_mul6(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul7 void gf2x_mul7(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul8 void gf2x_mul8(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; GF2X_STORAGE_CLASS_mul9 void gf2x_mul9(unsigned long *c, const unsigned long *a, const unsigned long *b) GF2X_MAYBE_UNUSED; #ifdef __cplusplus } #endif /* This seems rather useless. The point here is that for tuning, we must * define the sub-functions of the to-be-tuned implementation differently * from the ones of the currently enabled implementation (we use tuning_ * as a prefix). That implementation might happen to be actually the same * code. If we don't do this, we end up with duplicate static functions * in the compilation units. */ #ifndef GF2X_FUNC #define GF2X_FUNC(x) reserved_ ## x #endif /* This file provides all the small-sized gf2x_mul1..gf2x_mul9 routines. It is * meant to be possibly included directly by applications. */ #include "gf2x/gf2x_mul1.h" #include "gf2x/gf2x_mul2.h" #include "gf2x/gf2x_mul3.h" #include "gf2x/gf2x_mul4.h" #include "gf2x/gf2x_mul5.h" #include "gf2x/gf2x_mul6.h" #include "gf2x/gf2x_mul7.h" #include "gf2x/gf2x_mul8.h" #include "gf2x/gf2x_mul9.h" #ifdef TUNING #include "tuning_undef_wrapper.h" #endif #endif /* GF2X_SMALL_H_ */ gf2x-1.2/gf2x/gf2x-config-export.h.in0000644000327606072450000000151413125140251014232 00000000000000/* gf2x/gf2x-config-export.h.in ; this file is *NOT* automatically * generated. It is not the same as gf2x/gf2x-config.h.in : * * - gf2x/gf2x-config.h.in is relevant for internal compilation units * within the library. * * - gf2x/gf2x-config-export.h.in (this file) is potentially exposed to * end users, because it modifies the inlines which are exposed * through the gf2x-small.h file. */ /* Define if pclmul as present in the source tree is supported by the compiler and hardware */ #ifndef GF2X_HAVE_PCLMUL_SUPPORT #undef GF2X_HAVE_PCLMUL_SUPPORT #endif /* Define if sse-2 code as present in the source tree is supported by the compiler */ #ifndef GF2X_HAVE_SSE2_SUPPORT #undef GF2X_HAVE_SSE2_SUPPORT #endif /* Define to 1 if the mpir.h header exists */ #ifndef GF2X_HAVE_MPIR_H #undef GF2X_HAVE_MPIR_H #endif gf2x-1.2/gf2x/gf2x-config.h.in0000644000327606072450000000625313126452054012730 00000000000000/* gf2x/gf2x-config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define if pclmul code as present in the source tree is supported by the compiler */ #undef GF2X_HAVE_PCLMUL_SUPPORT /* Define if sse-2 code as present in the source tree is supported by the compiler */ #undef GF2X_HAVE_SSE2_SUPPORT /* Define if sse-3 code as present in the source tree is supported by the compiler */ #undef GF2X_HAVE_SSE3_SUPPORT /* Define if sse-4.1 code as present in the source tree is supported by the compiler */ #undef GF2X_HAVE_SSE41_SUPPORT /* Define if ssse3 code as present in the source tree is supported by the compiler */ #undef GF2X_HAVE_SSSE3_SUPPORT /* Have LGPL code (no GPL taint) */ #undef GPL_CODE_PRESENT /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t gf2x-1.2/Makefile.am0000644000327606072450000000756113124723716011236 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. AUTOMAKE_OPTIONS=subdir-objects ACLOCAL_AMFLAGS=-I config --install AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) FFT_SOURCES=fft/gf2x-ternary-fft.c if ENABLE_FFT_INTERFACE AM_CPPFLAGS += -I$(srcdir)/mpfq FFT_SOURCES+=fft/gf2x-fake-fft.c FFT_SOURCES+=fft/gf2x-cantor-fft.c AM_CPPFLAGS += -I$(top_srcdir)/fft/mpfq gf2x_includedir=$(includedir)/gf2x gf2x_include_HEADERS= \ fft/gf2x-fft.h \ fft/gf2x-fake-fft.h \ fft/gf2x-cantor-fft.h \ fft/gf2x-ternary-fft.h endif lib_LTLIBRARIES=libgf2x.la if ENABLE_FFT_INTERFACE # default which gets shipped libgf2x_la_CFLAGS=$(AM_CFLAGS) -DCANTOR_BASE_FIELD_SIZE=128 endif libgf2x_la_SOURCES=gf2x.c toom.c toom128.c toom-gpl.c $(FFT_SOURCES) nobase_include_HEADERS=gf2x.h \ gf2x/gf2x-impl.h \ gf2x/gf2x-impl-export.h \ gf2x/gf2x-small.h # All these are generated. nobase_nodist_include_HEADERS= \ gf2x/gf2x-config.h \ gf2x/gf2x-config-export.h \ gf2x/gf2x-thresholds.h \ gf2x/gf2x_mul1.h \ gf2x/gf2x_mul2.h \ gf2x/gf2x_mul3.h \ gf2x/gf2x_mul4.h \ gf2x/gf2x_mul5.h \ gf2x/gf2x_mul6.h \ gf2x/gf2x_mul7.h \ gf2x/gf2x_mul8.h \ gf2x/gf2x_mul9.h libgf2x_la_LDFLAGS=-version-info @gf2x_lib_version@ -no-undefined SUBDIRS=lowlevel src . fft tests $(MAYBE_APPS) DIST_SUBDIRS=lowlevel src . fft tests apps DISTCLEANFILES=gf2x/gf2x-thresholds.h \ gf2x/gf2x_mul1.h \ gf2x/gf2x_mul2.h \ gf2x/gf2x_mul3.h \ gf2x/gf2x_mul4.h \ gf2x/gf2x_mul5.h \ gf2x/gf2x_mul6.h \ gf2x/gf2x_mul7.h \ gf2x/gf2x_mul8.h \ gf2x/gf2x_mul9.h EXTRA_DIST= EXTRA_DIST+=version.sh.in EXTRA_DIST+=BUGS EXTRA_DIST+=already_tuned EXTRA_DIST+=config/configfsf.sub EXTRA_DIST+=config/configfsf.guess EXTRA_DIST+=toom-gpl-placeholder.c # This is really a maintainer-only command. This can be used for creating # a tarball with an LGPL-licensed gf2x. Note that when this is done, # configure must be re-run ! untaint: cp $(srcdir)/toom-gpl-placeholder.c $(srcdir)/toom-gpl.c dist-hook: -git log --boundary 29b13131cfaf95132f6a0602d3e0575694359d11..HEAD > $(distdir)/ChangeLog # This one is simply taken from the generated Makefile. I agree it's a # bit ugly. dist-LGPL: distdir mv $(distdir)/ $(distdir)-LGPL/ cp $(distdir)-LGPL/toom-gpl-placeholder.c $(distdir)-LGPL/toom-gpl.c tardir=$(distdir)-LGPL && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-LGPL.tar.gz mv $(distdir)-LGPL/ $(distdir)/ $(am__post_remove_distdir) tune-lowlevel tune-toom tune-fft: all cd src; $(MAKE) $@ distclean-local: -find already_tuned/tuned -maxdepth 1 -name "gf2x*" | xargs -r rm -f gf2x-1.2/configure0000755000327606072450000243056713126452054011115 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for gf2x 1.2. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gf2x' PACKAGE_TARNAME='gf2x' PACKAGE_VERSION='1.2' PACKAGE_STRING='gf2x 1.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS GPL_CODE_PRESENT_FALSE GPL_CODE_PRESENT_TRUE GF2X_PCLMUL_AVAILABLE_FALSE GF2X_PCLMUL_AVAILABLE_TRUE GF2X_SSE2_AVAILABLE_FALSE GF2X_SSE2_AVAILABLE_TRUE GF2X_64BIT_SOURCES_FALSE GF2X_64BIT_SOURCES_TRUE GF2X_32BIT_SOURCES_FALSE GF2X_32BIT_SOURCES_TRUE WORDSIZE_IS_64_FALSE WORDSIZE_IS_64_TRUE GF2X_WORDSIZE EXEEXT_FOR_BUILD CC_FOR_BUILD CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX ENABLE_FFT_INTERFACE_FALSE ENABLE_FFT_INTERFACE_TRUE MAYBE_APPS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM gf2x_lib_version ALLOCA EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_silent_rules enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_ntl_checks enable_hardware_specific_code enable_sse2 enable_sse3 enable_ssse3 enable_sse41 enable_pclmul enable_fft_interface with_compile_warnings ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH CXX CXXFLAGS CCC CXXCPP CC_FOR_BUILD' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures gf2x 1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gf2x] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gf2x 1.2:";; esac cat <<\_ACEOF 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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-ntl-checks Turn on ntl checks --enable-hardware-specific-code Turn on all cpu-dependent optimized code (default is yes) --enable-sse2 Turn on sse-2 code (default is yes) --enable-sse3 Turn on sse-3 code (default is yes) --enable-ssse3 Turn on ssse3 code (default is yes) --enable-sse41 Turn on sse-4.1 code (default is yes) --enable-pclmul Turn on pclmul code (default is yes) --enable-fft-interface compile with the optional fft interface (default is no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --without-compile-warnings Disable warning verbosity Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor CC_FOR_BUILD build system C compiler Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gf2x configure 1.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by gf2x $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$CFLAGS" != x ; then has_CFLAGS_from_env=yes else has_CFLAGS_from_env=no fi : ${CFLAGS=-g -O4} ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi gf2x_lib_version=1:2:0 am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gf2x' VERSION='1.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # disable for releases: AM_MAINTAINER_MODE([disable]) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether --enable-ntl-checks was given. if test "${enable_ntl_checks+set}" = set; then : enableval=$enable_ntl_checks; fi # Check whether --enable-hardware-specific-code was given. if test "${enable_hardware_specific_code+set}" = set; then : enableval=$enable_hardware_specific_code; else enable_hardware_specific_code=yes fi # Check whether --enable-sse2 was given. if test "${enable_sse2+set}" = set; then : enableval=$enable_sse2; fi # Check whether --enable-sse3 was given. if test "${enable_sse3+set}" = set; then : enableval=$enable_sse3; fi # Check whether --enable-ssse3 was given. if test "${enable_ssse3+set}" = set; then : enableval=$enable_ssse3; fi # Check whether --enable-sse41 was given. if test "${enable_sse41+set}" = set; then : enableval=$enable_sse41; fi # Check whether --enable-pclmul was given. if test "${enable_pclmul+set}" = set; then : enableval=$enable_pclmul; fi if test "x$enable_ntl_checks" = xyes ; then MAYBE_APPS=apps else MAYBE_APPS= fi # Check whether --enable-fft-interface was given. if test "${enable_fft_interface+set}" = set; then : enableval=$enable_fft_interface; fi if test "x$enable_fft_interface" = xyes; then ENABLE_FFT_INTERFACE_TRUE= ENABLE_FFT_INTERFACE_FALSE='#' else ENABLE_FFT_INTERFACE_TRUE='#' ENABLE_FFT_INTERFACE_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking warning verbosity option" >&5 $as_echo_n "checking warning verbosity option... " >&6; } # Check whether --with-compile-warnings was given. if test "${with_compile_warnings+set}" = set; then : withval=$with_compile_warnings; ac_compile_warnings_on="$withval" else ac_compile_warnings_on="" fi if test x"$ac_compile_warnings_on" = xno then ac_compile_warnings_msg=no else if test -n "$CXX" then if test "$GXX" = "yes" then ac_compile_warnings_opt='-Wall -W' fi CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_opt for C++" fi if test -n "$CC" then if test "$GCC" = "yes" then ac_compile_warnings_opt='-Wall -W' fi CFLAGS="$CFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_compile_warnings_msg" >&5 $as_echo "$ac_compile_warnings_msg" >&6; } unset ac_compile_warnings_msg unset ac_compile_warnings_opt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$CC_FOR_BUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5 $as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <&5 (eval $gf2x_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then cc_for_build_works=yes fi fi rm -f conftest* a.out b.out a.exe a_out.exe { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 $as_echo "$cc_for_build_works" >&6; } if test "$cc_for_build_works" = yes; then : else as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 fi elif test -n "$HOST_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5 $as_echo_n "checking build system compiler $HOST_CC... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <&5 (eval $gf2x_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then cc_for_build_works=yes fi fi rm -f conftest* a.out b.out a.exe a_out.exe { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 $as_echo "$cc_for_build_works" >&6; } if test "$cc_for_build_works" = yes; then CC_FOR_BUILD=$HOST_CC else as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 fi else for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5 $as_echo_n "checking build system compiler $i... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <&5 (eval $gf2x_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then cc_for_build_works=yes fi fi rm -f conftest* a.out b.out a.exe a_out.exe { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 $as_echo "$cc_for_build_works" >&6; } if test "$cc_for_build_works" = yes; then CC_FOR_BUILD=$i break else : fi done if test -z "$CC_FOR_BUILD"; then as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5 $as_echo_n "checking for build system executable suffix... " >&6; } if ${gf2x_cv_prog_exeext_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 (eval $gf2x_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if (./conftest) 2>&5; then gf2x_cv_prog_exeext_for_build=$i break fi fi done rm -f conftest* if test "${gf2x_cv_prog_exeext_for_build+set}" != set; then as_fn_error $? "Cannot determine executable suffix" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_prog_exeext_for_build" >&5 $as_echo "$gf2x_cv_prog_exeext_for_build" >&6; } EXEEXT_FOR_BUILD=$gf2x_cv_prog_exeext_for_build # This macro is used for tuning # A fallback for generic builds. Otherwise unused. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long _ACEOF gf2x_wordsize=`expr 8 \* $ac_cv_sizeof_unsigned_long` GF2X_WORDSIZE=$gf2x_wordsize if test "x$gf2x_wordsize" = x64; then WORDSIZE_IS_64_TRUE= WORDSIZE_IS_64_FALSE='#' else WORDSIZE_IS_64_TRUE='#' WORDSIZE_IS_64_FALSE= fi if test "x${enable_hardware_specific_code}" = xno ; then echo "Not using hardware-specific code due to --disable-hardware-specific-code flag" else # It is necessary to make all tests. We do encounter in the wild # binutils (openbsd binutils 2.15, namely) which are buggy with ssse3, # and that isn't extremely quickly spotted by the later checks... ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can compile and run sse-2 code" >&5 $as_echo_n "checking whether $CC can compile and run sse-2 code... " >&6; } if ${gf2x_cv_cc_supports_sse2+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_sse2=no if test "x${enable_sse2}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse2" if test "$cross_compiling" = yes; then : echo $ECHO_N "cross-compiling, " if test "x${enable_sse2}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse2=yes else gf2x_cv_cc_supports_sse2=no fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main(int argc, char * argv[]) { volatile int a0 = 17; volatile int a1 = 42; __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3); __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc); __m128i x = _mm_setr_epi32(a1, 0, a0, 0); __m128d g = _mm_set_pd((double) a1, (double) a0); x = _mm_srl_epi64(x, _mm_setr_epi32(2,0,0,0)); foo = _mm_mullo_epi16(foo, bar); foo = _mm_slli_epi64(foo, 1); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_epi64(foo, 1); foo = _mm_mullo_epi16(foo, bar); foo = _mm_shuffle_epi32(foo, 78); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_si128(foo, 1); foo = _mm_xor_si128(foo, x); return _mm_extract_epi16(foo, 0) & (argc - 1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse2=yes else CFLAGS="$ac_save_CFLAGS" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main(int argc, char * argv[]) { volatile int a0 = 17; volatile int a1 = 42; __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3); __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc); __m128i x = _mm_setr_epi32(a1, 0, a0, 0); __m128d g = _mm_set_pd((double) a1, (double) a0); x = _mm_srl_epi64(x, _mm_setr_epi32(2,0,0,0)); foo = _mm_mullo_epi16(foo, bar); foo = _mm_slli_epi64(foo, 1); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_epi64(foo, 1); foo = _mm_mullo_epi16(foo, bar); foo = _mm_shuffle_epi32(foo, 78); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_si128(foo, 1); foo = _mm_xor_si128(foo, x); return _mm_extract_epi16(foo, 0) & (argc - 1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse2="yes, but without -msse2" else gf2x_cv_cc_supports_sse2=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_sse2" >&5 $as_echo "$gf2x_cv_cc_supports_sse2" >&6; } ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse2" = "yes" ;then # Tweaking CFLAGS is often not enough. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -msse2 is also understood by the preprocessor" >&5 $as_echo_n "checking whether -msse2 is also understood by the preprocessor... " >&6; } if ${gf2x_cv_cpp_understands_msse2_flag+:} false; then : $as_echo_n "(cached) " >&6 else CPPFLAGS="$ac_save_CPPFLAGS -msse2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main(int argc, char * argv[]) { volatile int a0 = 17; volatile int a1 = 42; __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3); __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc); __m128i x = _mm_setr_epi32(a1, 0, a0, 0); __m128d g = _mm_set_pd((double) a1, (double) a0); x = _mm_srl_epi64(x, _mm_setr_epi32(2,0,0,0)); foo = _mm_mullo_epi16(foo, bar); foo = _mm_slli_epi64(foo, 1); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_epi64(foo, 1); foo = _mm_mullo_epi16(foo, bar); foo = _mm_shuffle_epi32(foo, 78); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_si128(foo, 1); foo = _mm_xor_si128(foo, x); return _mm_extract_epi16(foo, 0) & (argc - 1); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse2_flag=yes else CPPFLAGS="$ac_save_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main(int argc, char * argv[]) { volatile int a0 = 17; volatile int a1 = 42; __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3); __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc); __m128i x = _mm_setr_epi32(a1, 0, a0, 0); __m128d g = _mm_set_pd((double) a1, (double) a0); x = _mm_srl_epi64(x, _mm_setr_epi32(2,0,0,0)); foo = _mm_mullo_epi16(foo, bar); foo = _mm_slli_epi64(foo, 1); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_epi64(foo, 1); foo = _mm_mullo_epi16(foo, bar); foo = _mm_shuffle_epi32(foo, 78); foo = _mm_xor_si128(bar, _mm_unpacklo_epi32(foo, bar)); foo = _mm_srli_si128(foo, 1); foo = _mm_xor_si128(foo, x); return _mm_extract_epi16(foo, 0) & (argc - 1); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse2_flag=no else as_fn_error $? "Sorry, the preprocessor can't parse sse-2!" "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cpp_understands_msse2_flag" >&5 $as_echo "$gf2x_cv_cpp_understands_msse2_flag" >&6; } fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse2" = "yes" ;then CFLAGS="$CFLAGS -msse2" fi if test "$gf2x_cv_cpp_understands_msse2_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse2" fi if test "$gf2x_cv_cc_supports_sse2" != "no" ;then $as_echo "#define GF2X_HAVE_SSE2_SUPPORT 1" >>confdefs.h fi ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can compile and run sse-3 code" >&5 $as_echo_n "checking whether $CC can compile and run sse-3 code... " >&6; } if ${gf2x_cv_cc_supports_sse3+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_sse3=no if test "x${gf2x_cv_cc_supports_sse2}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_sse3}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse3" if test "$cross_compiling" = yes; then : echo $ECHO_N "cross-compiling, " if test "x${enable_sse3}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse3=yes else gf2x_cv_cc_supports_sse3=no fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for sse-3 support. */ #include #include #include int main() { volatile double a0 = 12.34; volatile double a1 = 56.78; __m128d x = _mm_setr_pd(a0, 34.12); __m128d y = _mm_setr_pd(78.56, a1); double a[2], b[2] = { 78.56 + 56.78, 12.34 + 34.12 }; y = _mm_hadd_pd(y, x); memcpy(a, &y, 16); return (a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse3=yes else CFLAGS="$ac_save_CFLAGS" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for sse-3 support. */ #include #include #include int main() { volatile double a0 = 12.34; volatile double a1 = 56.78; __m128d x = _mm_setr_pd(a0, 34.12); __m128d y = _mm_setr_pd(78.56, a1); double a[2], b[2] = { 78.56 + 56.78, 12.34 + 34.12 }; y = _mm_hadd_pd(y, x); memcpy(a, &y, 16); return (a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse3="yes, but without -msse3" else gf2x_cv_cc_supports_sse3=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_sse3" >&5 $as_echo "$gf2x_cv_cc_supports_sse3" >&6; } ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse3" = "yes" ;then # Tweaking CFLAGS is often not enough. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -msse3 is also understood by the preprocessor" >&5 $as_echo_n "checking whether -msse3 is also understood by the preprocessor... " >&6; } if ${gf2x_cv_cpp_understands_msse3_flag+:} false; then : $as_echo_n "(cached) " >&6 else CPPFLAGS="$ac_save_CPPFLAGS -msse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for sse-3 support. */ #include #include #include int main() { volatile double a0 = 12.34; volatile double a1 = 56.78; __m128d x = _mm_setr_pd(a0, 34.12); __m128d y = _mm_setr_pd(78.56, a1); double a[2], b[2] = { 78.56 + 56.78, 12.34 + 34.12 }; y = _mm_hadd_pd(y, x); memcpy(a, &y, 16); return (a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse3_flag=yes else CPPFLAGS="$ac_save_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for sse-3 support. */ #include #include #include int main() { volatile double a0 = 12.34; volatile double a1 = 56.78; __m128d x = _mm_setr_pd(a0, 34.12); __m128d y = _mm_setr_pd(78.56, a1); double a[2], b[2] = { 78.56 + 56.78, 12.34 + 34.12 }; y = _mm_hadd_pd(y, x); memcpy(a, &y, 16); return (a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse3_flag=no else as_fn_error $? "Sorry, the preprocessor can't parse sse-3!" "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cpp_understands_msse3_flag" >&5 $as_echo "$gf2x_cv_cpp_understands_msse3_flag" >&6; } fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse3" = "yes" ;then CFLAGS="$CFLAGS -msse3" fi if test "$gf2x_cv_cpp_understands_msse3_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse3" fi if test "$gf2x_cv_cc_supports_sse3" != "no" ;then $as_echo "#define GF2X_HAVE_SSE3_SUPPORT 1" >>confdefs.h fi ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can compile and run ssse3 code" >&5 $as_echo_n "checking whether $CC can compile and run ssse3 code... " >&6; } if ${gf2x_cv_cc_supports_ssse3+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_ssse3=no if test "x${gf2x_cv_cc_supports_sse3}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_ssse3}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -mssse3" if test "$cross_compiling" = yes; then : echo $ECHO_N "cross-compiling, " if test "x${enable_ssse3}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_ssse3=yes else gf2x_cv_cc_supports_ssse3=no fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for ssse3 support. */ #include #include #include int main() { volatile uint32_t a0 = 0x03020100; volatile uint32_t a1 = 0x1F1E1D1C; __m128i x = _mm_setr_epi32(a0, 0x07060504, 0x0B0A0908, 0x0F0E0D0C); __m128i y = _mm_setr_epi32(0x13121110, 0x17161514, 0x1B1A1918, a1); uint64_t a[2], b[2] = { 0x0C0B0A0908070605, 0x14131211100F0E0D }; y = _mm_alignr_epi8(y, x, 0x5); memcpy (a, &y, 16); return(a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_ssse3=yes else CFLAGS="$ac_save_CFLAGS" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for ssse3 support. */ #include #include #include int main() { volatile uint32_t a0 = 0x03020100; volatile uint32_t a1 = 0x1F1E1D1C; __m128i x = _mm_setr_epi32(a0, 0x07060504, 0x0B0A0908, 0x0F0E0D0C); __m128i y = _mm_setr_epi32(0x13121110, 0x17161514, 0x1B1A1918, a1); uint64_t a[2], b[2] = { 0x0C0B0A0908070605, 0x14131211100F0E0D }; y = _mm_alignr_epi8(y, x, 0x5); memcpy (a, &y, 16); return(a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_ssse3="yes, but without -mssse3" else gf2x_cv_cc_supports_ssse3=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_ssse3" >&5 $as_echo "$gf2x_cv_cc_supports_ssse3" >&6; } ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_ssse3" = "yes" ;then # Tweaking CFLAGS is often not enough. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -mssse3 is also understood by the preprocessor" >&5 $as_echo_n "checking whether -mssse3 is also understood by the preprocessor... " >&6; } if ${gf2x_cv_cpp_understands_mssse3_flag+:} false; then : $as_echo_n "(cached) " >&6 else CPPFLAGS="$ac_save_CPPFLAGS -mssse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for ssse3 support. */ #include #include #include int main() { volatile uint32_t a0 = 0x03020100; volatile uint32_t a1 = 0x1F1E1D1C; __m128i x = _mm_setr_epi32(a0, 0x07060504, 0x0B0A0908, 0x0F0E0D0C); __m128i y = _mm_setr_epi32(0x13121110, 0x17161514, 0x1B1A1918, a1); uint64_t a[2], b[2] = { 0x0C0B0A0908070605, 0x14131211100F0E0D }; y = _mm_alignr_epi8(y, x, 0x5); memcpy (a, &y, 16); return(a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_mssse3_flag=yes else CPPFLAGS="$ac_save_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* This source file is our test case for ssse3 support. */ #include #include #include int main() { volatile uint32_t a0 = 0x03020100; volatile uint32_t a1 = 0x1F1E1D1C; __m128i x = _mm_setr_epi32(a0, 0x07060504, 0x0B0A0908, 0x0F0E0D0C); __m128i y = _mm_setr_epi32(0x13121110, 0x17161514, 0x1B1A1918, a1); uint64_t a[2], b[2] = { 0x0C0B0A0908070605, 0x14131211100F0E0D }; y = _mm_alignr_epi8(y, x, 0x5); memcpy (a, &y, 16); return(a[0] != b[0] || a[1] != b[1]); } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_mssse3_flag=no else as_fn_error $? "Sorry, the preprocessor can't parse ssse3!" "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cpp_understands_mssse3_flag" >&5 $as_echo "$gf2x_cv_cpp_understands_mssse3_flag" >&6; } fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_ssse3" = "yes" ;then CFLAGS="$CFLAGS -mssse3" fi if test "$gf2x_cv_cpp_understands_mssse3_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -mssse3" fi if test "$gf2x_cv_cc_supports_ssse3" != "no" ;then $as_echo "#define GF2X_HAVE_SSSE3_SUPPORT 1" >>confdefs.h fi ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can compile and run sse-4.1 code" >&5 $as_echo_n "checking whether $CC can compile and run sse-4.1 code... " >&6; } if ${gf2x_cv_cc_supports_sse41+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_sse41=no if test "x${gf2x_cv_cc_supports_ssse3}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_sse41}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -msse4.1" if test "$cross_compiling" = yes; then : echo $ECHO_N "cross-compiling, " if test "x${enable_sse41}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_sse41=yes else gf2x_cv_cc_supports_sse41=no fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { /* the following test is for emulated 32-bit on physical 64-bit */ if (sizeof(unsigned long) != 8) abort (); volatile int a0 = 17; volatile int a1 = 42; __m128i x = _mm_setr_epi32(a1, 0, a0, 0); // x = 0 0x2a 0 0x11 __m128i y = _mm_setr_epi32(42, 0, 17, 0); // y = 0 0x2a 0 0x11 __m128i ma = _mm_max_epi32(x, y); __m128i mi = _mm_min_epi32(x, y); __m128i z = _mm_xor_si128(mi, ma); int ok0 = _mm_testz_si128(z, z); __m128i c = _mm_cmpeq_epi64(x, y); int ok1 = _mm_extract_epi32(c, 0) && _mm_extract_epi32(c, 1); return (ok0 && ok1) ? EXIT_SUCCESS : EXIT_FAILURE; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse41=yes else CFLAGS="$ac_save_CFLAGS" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { /* the following test is for emulated 32-bit on physical 64-bit */ if (sizeof(unsigned long) != 8) abort (); volatile int a0 = 17; volatile int a1 = 42; __m128i x = _mm_setr_epi32(a1, 0, a0, 0); // x = 0 0x2a 0 0x11 __m128i y = _mm_setr_epi32(42, 0, 17, 0); // y = 0 0x2a 0 0x11 __m128i ma = _mm_max_epi32(x, y); __m128i mi = _mm_min_epi32(x, y); __m128i z = _mm_xor_si128(mi, ma); int ok0 = _mm_testz_si128(z, z); __m128i c = _mm_cmpeq_epi64(x, y); int ok1 = _mm_extract_epi32(c, 0) && _mm_extract_epi32(c, 1); return (ok0 && ok1) ? EXIT_SUCCESS : EXIT_FAILURE; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_sse41="yes, but without -msse4.1" else gf2x_cv_cc_supports_sse41=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_sse41" >&5 $as_echo "$gf2x_cv_cc_supports_sse41" >&6; } ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_sse41" = "yes" ;then # Tweaking CFLAGS is often not enough. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -msse4.1 is also understood by the preprocessor" >&5 $as_echo_n "checking whether -msse4.1 is also understood by the preprocessor... " >&6; } if ${gf2x_cv_cpp_understands_msse41_flag+:} false; then : $as_echo_n "(cached) " >&6 else CPPFLAGS="$ac_save_CPPFLAGS -msse4.1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { /* the following test is for emulated 32-bit on physical 64-bit */ if (sizeof(unsigned long) != 8) abort (); volatile int a0 = 17; volatile int a1 = 42; __m128i x = _mm_setr_epi32(a1, 0, a0, 0); // x = 0 0x2a 0 0x11 __m128i y = _mm_setr_epi32(42, 0, 17, 0); // y = 0 0x2a 0 0x11 __m128i ma = _mm_max_epi32(x, y); __m128i mi = _mm_min_epi32(x, y); __m128i z = _mm_xor_si128(mi, ma); int ok0 = _mm_testz_si128(z, z); __m128i c = _mm_cmpeq_epi64(x, y); int ok1 = _mm_extract_epi32(c, 0) && _mm_extract_epi32(c, 1); return (ok0 && ok1) ? EXIT_SUCCESS : EXIT_FAILURE; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse41_flag=yes else CPPFLAGS="$ac_save_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { /* the following test is for emulated 32-bit on physical 64-bit */ if (sizeof(unsigned long) != 8) abort (); volatile int a0 = 17; volatile int a1 = 42; __m128i x = _mm_setr_epi32(a1, 0, a0, 0); // x = 0 0x2a 0 0x11 __m128i y = _mm_setr_epi32(42, 0, 17, 0); // y = 0 0x2a 0 0x11 __m128i ma = _mm_max_epi32(x, y); __m128i mi = _mm_min_epi32(x, y); __m128i z = _mm_xor_si128(mi, ma); int ok0 = _mm_testz_si128(z, z); __m128i c = _mm_cmpeq_epi64(x, y); int ok1 = _mm_extract_epi32(c, 0) && _mm_extract_epi32(c, 1); return (ok0 && ok1) ? EXIT_SUCCESS : EXIT_FAILURE; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_msse41_flag=no else as_fn_error $? "Sorry, the preprocessor can't parse sse-4.1!" "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cpp_understands_msse41_flag" >&5 $as_echo "$gf2x_cv_cpp_understands_msse41_flag" >&6; } fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_sse41" = "yes" ;then CFLAGS="$CFLAGS -msse4.1" fi if test "$gf2x_cv_cpp_understands_msse41_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -msse4.1" fi if test "$gf2x_cv_cc_supports_sse41" != "no" ;then $as_echo "#define GF2X_HAVE_SSE41_SUPPORT 1" >>confdefs.h fi ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can compile pclmulqdq and if it is supported by the hardware" >&5 $as_echo_n "checking whether $CC can compile pclmulqdq and if it is supported by the hardware... " >&6; } if ${gf2x_cv_cc_supports_pclmul+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_pclmul=no if test "x${gf2x_cv_cc_supports_sse41}" = xno ; then echo $ECHO_N "skipped, " elif test "x${enable_pclmul}" = xno ; then echo $ECHO_N "explicitly disabled, " else CFLAGS="$ac_save_CFLAGS -mpclmul" if test "$cross_compiling" = yes; then : echo $ECHO_N "cross-compiling, " if test "x${enable_pclmul}" = xyes ; then echo $ECHO_N "explicitly enabled, " gf2x_cv_cc_supports_pclmul=yes else gf2x_cv_cc_supports_pclmul=no fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { assert(sizeof(unsigned long) == 8); /* assume 64-bit */ #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) volatile int a0 = 17; volatile int a1 = 42; __m128i a = _gf2x_mm_set1_epi64(a0); __m128i b = _gf2x_mm_set1_epi64(a1); union { __m128i s; unsigned long x[2]; } proxy; proxy.s = _mm_clmulepi64_si128(a, b, 0); return proxy.x[0] - 650; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_pclmul=yes else CFLAGS="$ac_save_CFLAGS" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { assert(sizeof(unsigned long) == 8); /* assume 64-bit */ #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) volatile int a0 = 17; volatile int a1 = 42; __m128i a = _gf2x_mm_set1_epi64(a0); __m128i b = _gf2x_mm_set1_epi64(a1); union { __m128i s; unsigned long x[2]; } proxy; proxy.s = _mm_clmulepi64_si128(a, b, 0); return proxy.x[0] - 650; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gf2x_cv_cc_supports_pclmul="yes, but without -mpclmul" else gf2x_cv_cc_supports_pclmul=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_pclmul" >&5 $as_echo "$gf2x_cv_cc_supports_pclmul" >&6; } ac_save_CPPFLAGS=$CPPFLAGS if test "$gf2x_cv_cc_supports_pclmul" = "yes" ;then # Tweaking CFLAGS is often not enough. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -mpclmul is also understood by the preprocessor" >&5 $as_echo_n "checking whether -mpclmul is also understood by the preprocessor... " >&6; } if ${gf2x_cv_cpp_understands_mpclmul_flag+:} false; then : $as_echo_n "(cached) " >&6 else CPPFLAGS="$ac_save_CPPFLAGS -mpclmul" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { assert(sizeof(unsigned long) == 8); /* assume 64-bit */ #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) volatile int a0 = 17; volatile int a1 = 42; __m128i a = _gf2x_mm_set1_epi64(a0); __m128i b = _gf2x_mm_set1_epi64(a1); union { __m128i s; unsigned long x[2]; } proxy; proxy.s = _mm_clmulepi64_si128(a, b, 0); return proxy.x[0] - 650; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_mpclmul_flag=yes else CPPFLAGS="$ac_save_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main() { assert(sizeof(unsigned long) == 8); /* assume 64-bit */ #if defined(__GNUC__) && __GNUC__ == 4 &&__GNUC_MINOR__ == 1 #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64x_m64((u)) #else #define _gf2x_mm_cvtsi64_m64(u) _mm_cvtsi64_m64((u)) #endif /* _m128i from 2 int64_t's */ #define _gf2x_mm_setr_epi64(lo, hi) \ _mm_setr_epi64( \ _gf2x_mm_cvtsi64_m64((int64_t) (lo)), \ _gf2x_mm_cvtsi64_m64((int64_t) (hi)) \ ) /* _m128i from 1 int64_t's */ #define _gf2x_mm_set1_epi64(u) _mm_set1_epi64( _gf2x_mm_cvtsi64_m64((int64_t) (u))) volatile int a0 = 17; volatile int a1 = 42; __m128i a = _gf2x_mm_set1_epi64(a0); __m128i b = _gf2x_mm_set1_epi64(a1); union { __m128i s; unsigned long x[2]; } proxy; proxy.s = _mm_clmulepi64_si128(a, b, 0); return proxy.x[0] - 650; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gf2x_cv_cpp_understands_mpclmul_flag=no else as_fn_error $? "Sorry, the preprocessor can't parse pclmul!" "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cpp_understands_mpclmul_flag" >&5 $as_echo "$gf2x_cv_cpp_understands_mpclmul_flag" >&6; } fi CFLAGS=$ac_save_CFLAGS CPPFLAGS=$ac_save_CPPFLAGS if test "$gf2x_cv_cc_supports_pclmul" = "yes" ;then CFLAGS="$CFLAGS -mpclmul" fi if test "$gf2x_cv_cpp_understands_mpclmul_flag" = "yes" ; then CPPFLAGS="$CPPFLAGS -mpclmul" fi if test "$gf2x_cv_cc_supports_pclmul" != "no" ;then $as_echo "#define GF2X_HAVE_PCLMUL_SUPPORT 1" >>confdefs.h fi # The undocumented environment variable DISABLE_MARCH_NATIVE_TEST can be # used to avoid any attempt to add -march=native flag to gcc. This is # unfortunately mandatory on some virtual machines for which the cpuid # capabilities are incorrectly reported (leading to i386 guests with # BMI2, or other similar absurdities). if test "x$DISABLE_MARCH_NATIVE_TEST" = x ; then if test "x$has_CFLAGS_from_env" = xno ; then ac_save_CFLAGS=$CFLAGS special_double_setting="yes, via -march=x86-64 -march=native" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -march=native" >&5 $as_echo_n "checking whether $CC understands -march=native... " >&6; } if ${gf2x_cv_cc_supports_march_native+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_march_native=no CFLAGS="$ac_save_CFLAGS -march=native" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { printf("hello\n"); return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gf2x_cv_cc_supports_march_native=yes else CFLAGS="$ac_save_CFLAGS -march=x86-64 -march=native" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { printf("hello\n"); return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gf2x_cv_cc_supports_march_native="$special_double_setting" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ac_save_CFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_march_native" >&5 $as_echo "$gf2x_cv_cc_supports_march_native" >&6; } if test "$gf2x_cv_cc_supports_march_native" = "$special_double_setting" ;then CFLAGS="$CFLAGS -march=x86-64 -march=native" elif test "$gf2x_cv_cc_supports_march_native" = "yes" ;then CFLAGS="$CFLAGS -march=native" fi ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -mtune=native" >&5 $as_echo_n "checking whether $CC understands -mtune=native... " >&6; } if ${gf2x_cv_cc_supports_mtune_native+:} false; then : $as_echo_n "(cached) " >&6 else gf2x_cv_cc_supports_mtune_native=no CFLAGS="$ac_save_CFLAGS -mtune=native" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { printf("hello\n"); return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gf2x_cv_cc_supports_mtune_native=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ac_save_CFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_cc_supports_mtune_native" >&5 $as_echo "$gf2x_cv_cc_supports_mtune_native" >&6; } if test "$gf2x_cv_cc_supports_mtune_native" = "yes" ;then CFLAGS="$CFLAGS -mtune=native" fi fi else echo "Not doing test for -march=native as per environment variable $DISABLE_MARCH_NATIVE_TEST" fi fi : ${ABI='default'} if test x$ABI != xdefault ; then if test x$gf2x_cv_ulongbits = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of bits in an unsigned long" >&5 $as_echo_n "checking the number of bits in an unsigned long... " >&6; } if ${gf2x_cv_ulongbits+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: check skipped because of cross-compiling" >&5 $as_echo "$as_me: check skipped because of cross-compiling" >&6;} gf2x_cv_ulongbits=dontknow else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* We check wraparound rather than zero, because that's the only thing the norm guarantees (C99) -- UINT_MAX isn't committed to being a power of two */ #include int main() { unsigned long x = 1UL; unsigned long y; FILE * f = fopen("conftest.out","w"); int i = 1; for( ; ; i++) { y = x << 1; if (y < x) { break; } x = y; } fprintf(f,"%d\n",i); fclose(f); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : # see bug #15631 and autoconf manual about tr. # detected=`cat conftest.out | tr -d -c 0-9` detected=`cat conftest.out` if test x$detected = x ; then as_fn_error $? "test program failed" "$LINENO" 5 else gf2x_cv_ulongbits=$detected fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile/run test program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_ulongbits" >&5 $as_echo "$gf2x_cv_ulongbits" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and ABI=$ABI fit together" >&5 $as_echo_n "checking whether $CC and ABI=$ABI fit together... " >&6; } case x$gf2x_cv_ulongbits in xdontknow) { $as_echo "$as_me:${as_lineno-$LINENO}: cannot tell (cross-compiling)" >&5 $as_echo "$as_me: cannot tell (cross-compiling)" >&6;};; x$ABI) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; };; *) as_fn_error $? "no, $gf2x_cv_ulongbits-bit. Please provide appropriate \$CC variable" "$LINENO" 5;; esac fi # Many values for target_cpu in the switch below are dead code, because # for licensing reasons we are stuck with gmp's old config.guess from # 2006. It's not that bad, since we check for the features we need by # ourselves anyway. if test x$hwdir = x ; then # Our _default_ setting for hwdir is to use 8*sizeof(ulong). hwdir=generic$gf2x_wordsize if test "x${enable_hardware_specific_code}" = xyes ; then # Yet there are several situations in which we select another directory. # This refined selection mechanism is impacted by the ABI= setting. case "$target_cpu" in # All 32-bit pentium patterns i?86|pentium*|athlon|prescott) if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic$gf2x_wordsize else hwdir=x86_sse2 # Maybe on some funny platform from hell, we could get i386 yet have a # 64-bit cpu ? if test x$ABI = x64 ; then hwdir=x86_64 fi fi ;; core2|opteron|x86_64|nocona|k10) # Note: could set to something else if we have separate tuning files. if test "$gf2x_cv_cc_supports_pclmul" = "no" ; then hwdir=x86_64 else hwdir=x86_64_pclmul fi if test x$ABI = x32 ; then if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic32 else hwdir=x86_sse2 fi elif test x$ABI = xdefault ; then case x$gf2x_wordsize in x64|xdontknow) true ;; x32) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The default ABI for this compiler has $gf2x_wordsize-bit unsigned longs, not 64-bit as the CPU supports. Using $gf2x_wordsize-bit" >&5 $as_echo "$as_me: WARNING: The default ABI for this compiler has $gf2x_wordsize-bit unsigned longs, not 64-bit as the CPU supports. Using $gf2x_wordsize-bit" >&2;} if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic$gf2x_wordsize else hwdir=x86_sse2 fi;; *) as_fn_error $? "The default ABI for this compiler has $gf2x_wordsize-bit unsigned longs, this is not supported" "$LINENO" 5 ;; esac fi ;; coreinhm) hwdir=x86_64;; coreiwsm) hwdir=x86_64_pclmul ;; coreisbr) hwdir=x86_64_pclmul ;; coreiibr) hwdir=x86_64_pclmul ;; coreihwl) hwdir=coreihwl ;; armv7l) hwdir=armv7l ;; neon) hwdir=armv7l ;; # TODO: add bobcat, bulldozer. esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied hwdir value $hwdir" >&5 $as_echo "$as_me: Using supplied hwdir value $hwdir" >&6;} fi case "$hwdir" in x86_64*|coreihwl) if test "$gf2x_cv_cc_supports_sse2" = "no" ; then # this is only if we've been given an explicit --disable-sse2 hwdir=x86_64_nosse fi;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: using ABI=\"$ABI\"" >&5 $as_echo "$as_me: using ABI=\"$ABI\"" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: CC=\"$CC\"" >&5 $as_echo "$as_me: CC=\"$CC\"" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: CFLAGS=\"$CFLAGS\"" >&5 $as_echo "$as_me: CFLAGS=\"$CFLAGS\"" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: CPPFLAGS=\"$CPPFLAGS\"" >&5 $as_echo "$as_me: CPPFLAGS=\"$CPPFLAGS\"" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: hwdir=\"$hwdir\"" >&5 $as_echo "$as_me: hwdir=\"$hwdir\"" >&6;} for f in gf2x-thresholds.h \ gf2x_mul1.h gf2x_mul2.h gf2x_mul3.h gf2x_mul4.h \ gf2x_mul5.h gf2x_mul6.h gf2x_mul7.h gf2x_mul8.h \ gf2x_mul9.h ; do who=tuned if ! test -f $srcdir/already_tuned/$who/$f ; then who=$hwdir; fi if ! test -f $srcdir/already_tuned/$who/$f ; then who=generic$gf2x_wordsize; fi if ! test -f $srcdir/already_tuned/$who/$f ; then who=generic; fi if ! test -f $srcdir/already_tuned/$who/$f ; then as_fn_error $? "$f not found" "$LINENO" 5; fi ac_config_links="$ac_config_links gf2x/$f:already_tuned/$who/$f" if test "$f" = "gf2x-thresholds.h" ; then tuned_nbits=`sed -n 's/^#define[ ][ ]*GF2X_WORDSIZE[ ][ ]*\([0-9][0-9]*\).*$/\1/p' $srcdir/already_tuned/$who/$f` fi done if test x$tuned_nbits = x ; then tuned_nbits=$gf2x_wordsize else if test x$ABI != xdefault ; then if test x$tuned_nbits != x$ABI ; then as_fn_error $? "already_tuned/$hwdir/ assumes $tuned_nbits-bits unsigned longs, which conflicts with ABI=$ABI" "$LINENO" 5 fi else # At this point we haven't run the standard check. if test x$gf2x_cv_ulongbits = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of bits in an unsigned long" >&5 $as_echo_n "checking the number of bits in an unsigned long... " >&6; } if ${gf2x_cv_ulongbits+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: check skipped because of cross-compiling" >&5 $as_echo "$as_me: check skipped because of cross-compiling" >&6;} gf2x_cv_ulongbits=dontknow else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* We check wraparound rather than zero, because that's the only thing the norm guarantees (C99) -- UINT_MAX isn't committed to being a power of two */ #include int main() { unsigned long x = 1UL; unsigned long y; FILE * f = fopen("conftest.out","w"); int i = 1; for( ; ; i++) { y = x << 1; if (y < x) { break; } x = y; } fprintf(f,"%d\n",i); fclose(f); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : # see bug #15631 and autoconf manual about tr. # detected=`cat conftest.out | tr -d -c 0-9` detected=`cat conftest.out` if test x$detected = x ; then as_fn_error $? "test program failed" "$LINENO" 5 else gf2x_cv_ulongbits=$detected fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile/run test program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gf2x_cv_ulongbits" >&5 $as_echo "$gf2x_cv_ulongbits" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether already_tuned/$hwdir/ is right assuming $tuned_nbits-bits unsigned longs" >&5 $as_echo_n "checking whether already_tuned/$hwdir/ is right assuming $tuned_nbits-bits unsigned longs... " >&6; } case x$gf2x_cv_ulongbits in xdontknow) { $as_echo "$as_me:${as_lineno-$LINENO}: cannot tell (cross-compiling)" >&5 $as_echo "$as_me: cannot tell (cross-compiling)" >&6;};; x$tuned_nbits) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; };; *) as_fn_error $? "no, $gf2x_cv_ulongbits-bit. Please provide appropriate \$CC variable" "$LINENO" 5;; esac fi fi # This is used in src/Makefile.am if test "x$tuned_nbits" = x32; then GF2X_32BIT_SOURCES_TRUE= GF2X_32BIT_SOURCES_FALSE='#' else GF2X_32BIT_SOURCES_TRUE='#' GF2X_32BIT_SOURCES_FALSE= fi if test "x$tuned_nbits" = x64; then GF2X_64BIT_SOURCES_TRUE= GF2X_64BIT_SOURCES_FALSE='#' else GF2X_64BIT_SOURCES_TRUE='#' GF2X_64BIT_SOURCES_FALSE= fi if test "x$gf2x_cv_cc_supports_sse2" != xno; then GF2X_SSE2_AVAILABLE_TRUE= GF2X_SSE2_AVAILABLE_FALSE='#' else GF2X_SSE2_AVAILABLE_TRUE='#' GF2X_SSE2_AVAILABLE_FALSE= fi if test "x$gf2x_cv_cc_supports_pclmul" != xno; then GF2X_PCLMUL_AVAILABLE_TRUE= GF2X_PCLMUL_AVAILABLE_FALSE='#' else GF2X_PCLMUL_AVAILABLE_TRUE='#' GF2X_PCLMUL_AVAILABLE_FALSE= fi if grep -q "released under the GPL" "$srcdir/toom-gpl.c"; then GPL_CODE_PRESENT_TRUE= GPL_CODE_PRESENT_FALSE='#' else GPL_CODE_PRESENT_TRUE='#' GPL_CODE_PRESENT_FALSE= fi if grep -q "released under the GPL" "$srcdir/toom-gpl.c" ; then echo "File $srcdir/toom-gpl.c is present, using a GPL-licensed gf2x" $as_echo "#define GPL_CODE_PRESENT 1" >>confdefs.h else echo "File $srcdir/toom-gpl.c is a placeholder, using an LGPL-licensed gf2x" $as_echo "#define GPL_CODE_PRESENT 0" >>confdefs.h fi ac_config_headers="$ac_config_headers gf2x/gf2x-config.h gf2x/gf2x-config-export.h" #if test -d "$srcdir/gf2x-fft" ; then # AC_MSG_NOTICE([Enabling optional gf2x-fft]) # AC_CONFIG_SUBDIRS([gf2x-fft]) # MAYBE_GF2X_FFT=gf2x-fft #else # AC_MSG_NOTICE([optional gf2x-fft not found]) # MAYBE_GF2X_FFT= #fi #AC_SUBST([MAYBE_GF2X_FFT]) ac_config_files="$ac_config_files version.sh Makefile tests/Makefile lowlevel/Makefile src/Makefile fft/Makefile apps/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FFT_INTERFACE_TRUE}" && test -z "${ENABLE_FFT_INTERFACE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FFT_INTERFACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WORDSIZE_IS_64_TRUE}" && test -z "${WORDSIZE_IS_64_FALSE}"; then as_fn_error $? "conditional \"WORDSIZE_IS_64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GF2X_32BIT_SOURCES_TRUE}" && test -z "${GF2X_32BIT_SOURCES_FALSE}"; then as_fn_error $? "conditional \"GF2X_32BIT_SOURCES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GF2X_64BIT_SOURCES_TRUE}" && test -z "${GF2X_64BIT_SOURCES_FALSE}"; then as_fn_error $? "conditional \"GF2X_64BIT_SOURCES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GF2X_SSE2_AVAILABLE_TRUE}" && test -z "${GF2X_SSE2_AVAILABLE_FALSE}"; then as_fn_error $? "conditional \"GF2X_SSE2_AVAILABLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GF2X_PCLMUL_AVAILABLE_TRUE}" && test -z "${GF2X_PCLMUL_AVAILABLE_FALSE}"; then as_fn_error $? "conditional \"GF2X_PCLMUL_AVAILABLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GPL_CODE_PRESENT_TRUE}" && test -z "${GPL_CODE_PRESENT_FALSE}"; then as_fn_error $? "conditional \"GPL_CODE_PRESENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by gf2x $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ gf2x config.status 1.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "gf2x/$f") CONFIG_LINKS="$CONFIG_LINKS gf2x/$f:already_tuned/$who/$f" ;; "gf2x/gf2x-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gf2x/gf2x-config.h" ;; "gf2x/gf2x-config-export.h") CONFIG_HEADERS="$CONFIG_HEADERS gf2x/gf2x-config-export.h" ;; "version.sh") CONFIG_FILES="$CONFIG_FILES version.sh" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "lowlevel/Makefile") CONFIG_FILES="$CONFIG_FILES lowlevel/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "fft/Makefile") CONFIG_FILES="$CONFIG_FILES fft/Makefile" ;; "apps/Makefile") CONFIG_FILES="$CONFIG_FILES apps/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # vim: set sw=1: gf2x-1.2/configure.ac0000644000327606072450000002307113125140251011446 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. AC_INIT([gf2x], [1.2]) if test "x$CFLAGS" != x ; then has_CFLAGS_from_env=yes else has_CFLAGS_from_env=no fi : ${CFLAGS=-g -O4} AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CANONICAL_TARGET AC_LANG([C]) AC_FUNC_ALLOCA AC_SUBST([gf2x_lib_version], [1:2:0]) AM_INIT_AUTOMAKE([1.13]) # disable for releases: AM_MAINTAINER_MODE([disable]) AM_MAINTAINER_MODE([enable]) LT_INIT() AC_ARG_ENABLE([ntl-checks], [AS_HELP_STRING([--enable-ntl-checks], [Turn on ntl checks])]) AC_ARG_ENABLE([hardware-specific-code], [AS_HELP_STRING([--enable-hardware-specific-code], [Turn on all cpu-dependent optimized code (default is yes)])], [],[enable_hardware_specific_code=yes]) AC_ARG_ENABLE([sse2], [AS_HELP_STRING([--enable-sse2], [Turn on sse-2 code (default is yes)])]) AC_ARG_ENABLE([sse3], [AS_HELP_STRING([--enable-sse3], [Turn on sse-3 code (default is yes)])]) AC_ARG_ENABLE([ssse3], [AS_HELP_STRING([--enable-ssse3], [Turn on ssse3 code (default is yes)])]) AC_ARG_ENABLE([sse41], [AS_HELP_STRING([--enable-sse41], [Turn on sse-4.1 code (default is yes)])]) AC_ARG_ENABLE([pclmul], [AS_HELP_STRING([--enable-pclmul], [Turn on pclmul code (default is yes)])]) if test "x$enable_ntl_checks" = xyes ; then MAYBE_APPS=apps else MAYBE_APPS= fi AC_SUBST([MAYBE_APPS]) AC_ARG_ENABLE([fft-interface], [AS_HELP_STRING([--enable-fft-interface], [compile with the optional fft interface (default is no)])], [],[]) AM_CONDITIONAL([ENABLE_FFT_INTERFACE],[test "x$enable_fft_interface" = xyes]) AC_PROG_CC AC_PROG_CXX AC_COMPILE_WARNINGS AC_PROG_CC_C99 AC_PROG_CPP GF2X_PROG_CC_FOR_BUILD GF2X_PROG_EXEEXT_FOR_BUILD # This macro is used for tuning AM_PROG_CC_C_O # A fallback for generic builds. Otherwise unused. AC_CHECK_SIZEOF([unsigned long]) gf2x_wordsize=`expr 8 \* $ac_cv_sizeof_unsigned_long` AC_SUBST([GF2X_WORDSIZE], [$gf2x_wordsize]) AM_CONDITIONAL([WORDSIZE_IS_64],[test "x$gf2x_wordsize" = x64]) if test "x${enable_hardware_specific_code}" = xno ; then echo "Not using hardware-specific code due to --disable-hardware-specific-code flag" else # It is necessary to make all tests. We do encounter in the wild # binutils (openbsd binutils 2.15, namely) which are buggy with ssse3, # and that isn't extremely quickly spotted by the later checks... CHECK_SSE2_SUPPORT() CHECK_SSE3_SUPPORT() CHECK_SSSE3_SUPPORT() CHECK_SSE41_SUPPORT() CHECK_PCLMUL_SUPPORT() # The undocumented environment variable DISABLE_MARCH_NATIVE_TEST can be # used to avoid any attempt to add -march=native flag to gcc. This is # unfortunately mandatory on some virtual machines for which the cpuid # capabilities are incorrectly reported (leading to i386 guests with # BMI2, or other similar absurdities). if test "x$DISABLE_MARCH_NATIVE_TEST" = x ; then if test "x$has_CFLAGS_from_env" = xno ; then CHECK_MARCH_NATIVE_SUPPORT() CHECK_MTUNE_NATIVE_SUPPORT() fi else echo "Not doing test for -march=native as per environment variable $DISABLE_MARCH_NATIVE_TEST" fi fi : ${ABI='default'} if test x$ABI != xdefault ; then VERIFY_WORDSIZE([$ABI],[whether $CC and ABI=$ABI fit together]) fi # Many values for target_cpu in the switch below are dead code, because # for licensing reasons we are stuck with gmp's old config.guess from # 2006. It's not that bad, since we check for the features we need by # ourselves anyway. if test x$hwdir = x ; then # Our _default_ setting for hwdir is to use 8*sizeof(ulong). hwdir=generic$gf2x_wordsize if test "x${enable_hardware_specific_code}" = xyes ; then # Yet there are several situations in which we select another directory. # This refined selection mechanism is impacted by the ABI= setting. case "$target_cpu" in # All 32-bit pentium patterns i?86|pentium*|athlon|prescott) if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic$gf2x_wordsize else hwdir=x86_sse2 # Maybe on some funny platform from hell, we could get i386 yet have a # 64-bit cpu ? if test x$ABI = x64 ; then hwdir=x86_64 fi fi ;; core2|opteron|x86_64|nocona|k10) # Note: could set to something else if we have separate tuning files. if test "$gf2x_cv_cc_supports_pclmul" = "no" ; then hwdir=x86_64 else hwdir=x86_64_pclmul fi if test x$ABI = x32 ; then if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic32 else hwdir=x86_sse2 fi elif test x$ABI = xdefault ; then case x$gf2x_wordsize in x64|xdontknow) true ;; x32) AC_MSG_WARN([The default ABI for this compiler has $gf2x_wordsize-bit unsigned longs, not 64-bit as the CPU supports. Using $gf2x_wordsize-bit]) if test "$gf2x_cv_cc_supports_sse2" = "no" ; then hwdir=generic$gf2x_wordsize else hwdir=x86_sse2 fi;; *) AC_MSG_ERROR([The default ABI for this compiler has $gf2x_wordsize-bit unsigned longs, this is not supported]) ;; esac fi ;; coreinhm) hwdir=x86_64;; coreiwsm) hwdir=x86_64_pclmul ;; coreisbr) hwdir=x86_64_pclmul ;; coreiibr) hwdir=x86_64_pclmul ;; coreihwl) hwdir=coreihwl ;; armv7l) hwdir=armv7l ;; neon) hwdir=armv7l ;; # TODO: add bobcat, bulldozer. esac fi else AC_MSG_NOTICE([Using supplied hwdir value $hwdir]) fi case "$hwdir" in x86_64*|coreihwl) if test "$gf2x_cv_cc_supports_sse2" = "no" ; then # this is only if we've been given an explicit --disable-sse2 hwdir=x86_64_nosse fi;; esac AC_MSG_NOTICE([using ABI="$ABI"]) AC_MSG_NOTICE([ CC="$CC"]) AC_MSG_NOTICE([ CFLAGS="$CFLAGS"]) AC_MSG_NOTICE([ CPPFLAGS="$CPPFLAGS"]) AC_MSG_NOTICE([ hwdir="$hwdir"]) for f in gf2x-thresholds.h \ gf2x_mul1.h gf2x_mul2.h gf2x_mul3.h gf2x_mul4.h \ gf2x_mul5.h gf2x_mul6.h gf2x_mul7.h gf2x_mul8.h \ gf2x_mul9.h ; do who=tuned if ! test -f $srcdir/already_tuned/$who/$f ; then who=$hwdir; fi if ! test -f $srcdir/already_tuned/$who/$f ; then who=generic$gf2x_wordsize; fi if ! test -f $srcdir/already_tuned/$who/$f ; then who=generic; fi if ! test -f $srcdir/already_tuned/$who/$f ; then AC_MSG_ERROR([$f not found]); fi AC_CONFIG_LINKS([gf2x/$f:already_tuned/$who/$f]) if test "$f" = "gf2x-thresholds.h" ; then tuned_nbits=[`sed -n 's/^#define[ ][ ]*GF2X_WORDSIZE[ ][ ]*\([0-9][0-9]*\).*$/\1/p' $srcdir/already_tuned/$who/$f`] fi done if test x$tuned_nbits = x ; then tuned_nbits=$gf2x_wordsize else if test x$ABI != xdefault ; then if test x$tuned_nbits != x$ABI ; then AC_MSG_ERROR([already_tuned/$hwdir/ assumes $tuned_nbits-bits unsigned longs, which conflicts with ABI=$ABI]) fi else # At this point we haven't run the standard check. VERIFY_WORDSIZE([$tuned_nbits],[whether already_tuned/$hwdir/ is right assuming $tuned_nbits-bits unsigned longs]) fi fi # This is used in src/Makefile.am AM_CONDITIONAL([GF2X_32BIT_SOURCES],[test "x$tuned_nbits" = x32]) AM_CONDITIONAL([GF2X_64BIT_SOURCES],[test "x$tuned_nbits" = x64]) AM_CONDITIONAL([GF2X_SSE2_AVAILABLE],[test "x$gf2x_cv_cc_supports_sse2" != xno]) AM_CONDITIONAL([GF2X_PCLMUL_AVAILABLE],[test "x$gf2x_cv_cc_supports_pclmul" != xno]) AM_CONDITIONAL([GPL_CODE_PRESENT],[grep -q "released under the GPL" "$srcdir/toom-gpl.c"]) if grep -q "released under the GPL" "$srcdir/toom-gpl.c" ; then echo "File $srcdir/toom-gpl.c is present, using a GPL-licensed gf2x" AC_DEFINE([GPL_CODE_PRESENT],1,[Have GPL code]) else echo "File $srcdir/toom-gpl.c is a placeholder, using an LGPL-licensed gf2x" AC_DEFINE([GPL_CODE_PRESENT],0,[Have LGPL code (no GPL taint)]) fi AC_CONFIG_HEADERS([gf2x/gf2x-config.h gf2x/gf2x-config-export.h]) #if test -d "$srcdir/gf2x-fft" ; then # AC_MSG_NOTICE([Enabling optional gf2x-fft]) # AC_CONFIG_SUBDIRS([gf2x-fft]) # MAYBE_GF2X_FFT=gf2x-fft #else # AC_MSG_NOTICE([optional gf2x-fft not found]) # MAYBE_GF2X_FFT= #fi #AC_SUBST([MAYBE_GF2X_FFT]) AC_CONFIG_FILES([version.sh Makefile tests/Makefile lowlevel/Makefile src/Makefile fft/Makefile apps/Makefile]) AC_OUTPUT # vim: set sw=1: gf2x-1.2/aclocal.m40000644000327606072450000012574613126452050011040 00000000000000# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/acinclude.m4]) m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) gf2x-1.2/gf2x.h0000644000327606072450000000475713124145376010225 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Multiplication over GF(2)[x] */ #ifndef GF2X_H_ #define GF2X_H_ #ifdef __cplusplus extern "C" { #endif #include /* size_t */ /* This is the toplevel multiplication routine, the only one that really * matters. a and b point to polynomials whose coefficients span an and * bn machine words (unsigned longs). * * c must have enough room to hold an+bn words. * * The destination pointer c may alias either a or b (that is, one may * have c==a or c==b), but any other kind of overlap is unsupported). */ extern void gf2x_mul(unsigned long *c, const unsigned long *a, unsigned long an, const unsigned long *b, unsigned long bn); /* The second version is reentrant */ struct gf2x_mul_pool_s { unsigned long * stk; size_t stk_size; }; typedef struct gf2x_mul_pool_s gf2x_mul_pool_t[1]; extern void gf2x_mul_pool_init(gf2x_mul_pool_t); extern void gf2x_mul_pool_clear(gf2x_mul_pool_t); /* If the gf2x_mul_pool_t arg is passed as NULL, a new pool is created * (and freed) for that multiplication */ extern void gf2x_mul_r(unsigned long *c, const unsigned long *a, unsigned long an, const unsigned long *b, unsigned long bn, gf2x_mul_pool_t); #ifdef __cplusplus } #endif #endif /* GF2X_H_ */ gf2x-1.2/Makefile.in0000644000327606072450000014254013126452055011241 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @ENABLE_FFT_INTERFACE_TRUE@am__append_1 = -I$(srcdir)/mpfq \ @ENABLE_FFT_INTERFACE_TRUE@ -I$(top_srcdir)/fft/mpfq @ENABLE_FFT_INTERFACE_TRUE@am__append_2 = fft/gf2x-fake-fft.c \ @ENABLE_FFT_INTERFACE_TRUE@ fft/gf2x-cantor-fft.c subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__gf2x_include_HEADERS_DIST) \ $(nobase_include_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = version.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gf2x_includedir)" \ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgf2x_la_LIBADD = am__libgf2x_la_SOURCES_DIST = gf2x.c toom.c toom128.c toom-gpl.c \ fft/gf2x-ternary-fft.c fft/gf2x-fake-fft.c \ fft/gf2x-cantor-fft.c am__dirstamp = $(am__leading_dot)dirstamp @ENABLE_FFT_INTERFACE_TRUE@am__objects_1 = \ @ENABLE_FFT_INTERFACE_TRUE@ fft/libgf2x_la-gf2x-fake-fft.lo \ @ENABLE_FFT_INTERFACE_TRUE@ fft/libgf2x_la-gf2x-cantor-fft.lo am__objects_2 = fft/libgf2x_la-gf2x-ternary-fft.lo $(am__objects_1) am_libgf2x_la_OBJECTS = libgf2x_la-gf2x.lo libgf2x_la-toom.lo \ libgf2x_la-toom128.lo libgf2x_la-toom-gpl.lo $(am__objects_2) libgf2x_la_OBJECTS = $(am_libgf2x_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgf2x_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgf2x_la_CFLAGS) \ $(CFLAGS) $(libgf2x_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gf2x depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgf2x_la_SOURCES) DIST_SOURCES = $(am__libgf2x_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__gf2x_include_HEADERS_DIST = fft/gf2x-fft.h fft/gf2x-fake-fft.h \ fft/gf2x-cantor-fft.h fft/gf2x-ternary-fft.h HEADERS = $(gf2x_include_HEADERS) $(nobase_include_HEADERS) \ $(nobase_nodist_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.sh.in \ $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing \ $(top_srcdir)/gf2x/gf2x-config-export.h.in \ $(top_srcdir)/gf2x/gf2x-config.h.in AUTHORS COPYING \ COPYING.LIB ChangeLog INSTALL NEWS README TODO config/compile \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = subdir-objects ACLOCAL_AMFLAGS = -I config --install AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) $(am__append_1) FFT_SOURCES = fft/gf2x-ternary-fft.c $(am__append_2) @ENABLE_FFT_INTERFACE_TRUE@gf2x_includedir = $(includedir)/gf2x @ENABLE_FFT_INTERFACE_TRUE@gf2x_include_HEADERS = \ @ENABLE_FFT_INTERFACE_TRUE@ fft/gf2x-fft.h \ @ENABLE_FFT_INTERFACE_TRUE@ fft/gf2x-fake-fft.h \ @ENABLE_FFT_INTERFACE_TRUE@ fft/gf2x-cantor-fft.h \ @ENABLE_FFT_INTERFACE_TRUE@ fft/gf2x-ternary-fft.h lib_LTLIBRARIES = libgf2x.la # default which gets shipped @ENABLE_FFT_INTERFACE_TRUE@libgf2x_la_CFLAGS = $(AM_CFLAGS) -DCANTOR_BASE_FIELD_SIZE=128 libgf2x_la_SOURCES = gf2x.c toom.c toom128.c toom-gpl.c $(FFT_SOURCES) nobase_include_HEADERS = gf2x.h \ gf2x/gf2x-impl.h \ gf2x/gf2x-impl-export.h \ gf2x/gf2x-small.h # All these are generated. nobase_nodist_include_HEADERS = \ gf2x/gf2x-config.h \ gf2x/gf2x-config-export.h \ gf2x/gf2x-thresholds.h \ gf2x/gf2x_mul1.h \ gf2x/gf2x_mul2.h \ gf2x/gf2x_mul3.h \ gf2x/gf2x_mul4.h \ gf2x/gf2x_mul5.h \ gf2x/gf2x_mul6.h \ gf2x/gf2x_mul7.h \ gf2x/gf2x_mul8.h \ gf2x/gf2x_mul9.h libgf2x_la_LDFLAGS = -version-info @gf2x_lib_version@ -no-undefined SUBDIRS = lowlevel src . fft tests $(MAYBE_APPS) DIST_SUBDIRS = lowlevel src . fft tests apps DISTCLEANFILES = gf2x/gf2x-thresholds.h \ gf2x/gf2x_mul1.h \ gf2x/gf2x_mul2.h \ gf2x/gf2x_mul3.h \ gf2x/gf2x_mul4.h \ gf2x/gf2x_mul5.h \ gf2x/gf2x_mul6.h \ gf2x/gf2x_mul7.h \ gf2x/gf2x_mul8.h \ gf2x/gf2x_mul9.h EXTRA_DIST = version.sh.in BUGS already_tuned config/configfsf.sub \ config/configfsf.guess toom-gpl-placeholder.c all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): gf2x/gf2x-config.h: gf2x/stamp-h1 @test -f $@ || rm -f gf2x/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) gf2x/stamp-h1 gf2x/stamp-h1: $(top_srcdir)/gf2x/gf2x-config.h.in $(top_builddir)/config.status @rm -f gf2x/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status gf2x/gf2x-config.h $(top_srcdir)/gf2x/gf2x-config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f gf2x/stamp-h1 touch $@ gf2x/gf2x-config-export.h: gf2x/stamp-h2 @test -f $@ || rm -f gf2x/stamp-h2 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) gf2x/stamp-h2 gf2x/stamp-h2: $(top_srcdir)/gf2x/gf2x-config-export.h.in $(top_builddir)/config.status @rm -f gf2x/stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status gf2x/gf2x-config-export.h distclean-hdr: -rm -f gf2x/gf2x-config.h gf2x/stamp-h1 gf2x/gf2x-config-export.h gf2x/stamp-h2 version.sh: $(top_builddir)/config.status $(srcdir)/version.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } fft/$(am__dirstamp): @$(MKDIR_P) fft @: > fft/$(am__dirstamp) fft/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) fft/$(DEPDIR) @: > fft/$(DEPDIR)/$(am__dirstamp) fft/libgf2x_la-gf2x-ternary-fft.lo: fft/$(am__dirstamp) \ fft/$(DEPDIR)/$(am__dirstamp) fft/libgf2x_la-gf2x-fake-fft.lo: fft/$(am__dirstamp) \ fft/$(DEPDIR)/$(am__dirstamp) fft/libgf2x_la-gf2x-cantor-fft.lo: fft/$(am__dirstamp) \ fft/$(DEPDIR)/$(am__dirstamp) libgf2x.la: $(libgf2x_la_OBJECTS) $(libgf2x_la_DEPENDENCIES) $(EXTRA_libgf2x_la_DEPENDENCIES) $(AM_V_CCLD)$(libgf2x_la_LINK) -rpath $(libdir) $(libgf2x_la_OBJECTS) $(libgf2x_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f fft/*.$(OBJEXT) -rm -f fft/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgf2x_la-gf2x.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgf2x_la-toom-gpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgf2x_la-toom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgf2x_la-toom128.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fft/$(DEPDIR)/libgf2x_la-gf2x-cantor-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fft/$(DEPDIR)/libgf2x_la-gf2x-fake-fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fft/$(DEPDIR)/libgf2x_la-gf2x-ternary-fft.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libgf2x_la-gf2x.lo: gf2x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT libgf2x_la-gf2x.lo -MD -MP -MF $(DEPDIR)/libgf2x_la-gf2x.Tpo -c -o libgf2x_la-gf2x.lo `test -f 'gf2x.c' || echo '$(srcdir)/'`gf2x.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgf2x_la-gf2x.Tpo $(DEPDIR)/libgf2x_la-gf2x.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gf2x.c' object='libgf2x_la-gf2x.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o libgf2x_la-gf2x.lo `test -f 'gf2x.c' || echo '$(srcdir)/'`gf2x.c libgf2x_la-toom.lo: toom.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT libgf2x_la-toom.lo -MD -MP -MF $(DEPDIR)/libgf2x_la-toom.Tpo -c -o libgf2x_la-toom.lo `test -f 'toom.c' || echo '$(srcdir)/'`toom.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgf2x_la-toom.Tpo $(DEPDIR)/libgf2x_la-toom.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='toom.c' object='libgf2x_la-toom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o libgf2x_la-toom.lo `test -f 'toom.c' || echo '$(srcdir)/'`toom.c libgf2x_la-toom128.lo: toom128.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT libgf2x_la-toom128.lo -MD -MP -MF $(DEPDIR)/libgf2x_la-toom128.Tpo -c -o libgf2x_la-toom128.lo `test -f 'toom128.c' || echo '$(srcdir)/'`toom128.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgf2x_la-toom128.Tpo $(DEPDIR)/libgf2x_la-toom128.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='toom128.c' object='libgf2x_la-toom128.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o libgf2x_la-toom128.lo `test -f 'toom128.c' || echo '$(srcdir)/'`toom128.c libgf2x_la-toom-gpl.lo: toom-gpl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT libgf2x_la-toom-gpl.lo -MD -MP -MF $(DEPDIR)/libgf2x_la-toom-gpl.Tpo -c -o libgf2x_la-toom-gpl.lo `test -f 'toom-gpl.c' || echo '$(srcdir)/'`toom-gpl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgf2x_la-toom-gpl.Tpo $(DEPDIR)/libgf2x_la-toom-gpl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='toom-gpl.c' object='libgf2x_la-toom-gpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o libgf2x_la-toom-gpl.lo `test -f 'toom-gpl.c' || echo '$(srcdir)/'`toom-gpl.c fft/libgf2x_la-gf2x-ternary-fft.lo: fft/gf2x-ternary-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT fft/libgf2x_la-gf2x-ternary-fft.lo -MD -MP -MF fft/$(DEPDIR)/libgf2x_la-gf2x-ternary-fft.Tpo -c -o fft/libgf2x_la-gf2x-ternary-fft.lo `test -f 'fft/gf2x-ternary-fft.c' || echo '$(srcdir)/'`fft/gf2x-ternary-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fft/$(DEPDIR)/libgf2x_la-gf2x-ternary-fft.Tpo fft/$(DEPDIR)/libgf2x_la-gf2x-ternary-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fft/gf2x-ternary-fft.c' object='fft/libgf2x_la-gf2x-ternary-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o fft/libgf2x_la-gf2x-ternary-fft.lo `test -f 'fft/gf2x-ternary-fft.c' || echo '$(srcdir)/'`fft/gf2x-ternary-fft.c fft/libgf2x_la-gf2x-fake-fft.lo: fft/gf2x-fake-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT fft/libgf2x_la-gf2x-fake-fft.lo -MD -MP -MF fft/$(DEPDIR)/libgf2x_la-gf2x-fake-fft.Tpo -c -o fft/libgf2x_la-gf2x-fake-fft.lo `test -f 'fft/gf2x-fake-fft.c' || echo '$(srcdir)/'`fft/gf2x-fake-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fft/$(DEPDIR)/libgf2x_la-gf2x-fake-fft.Tpo fft/$(DEPDIR)/libgf2x_la-gf2x-fake-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fft/gf2x-fake-fft.c' object='fft/libgf2x_la-gf2x-fake-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o fft/libgf2x_la-gf2x-fake-fft.lo `test -f 'fft/gf2x-fake-fft.c' || echo '$(srcdir)/'`fft/gf2x-fake-fft.c fft/libgf2x_la-gf2x-cantor-fft.lo: fft/gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -MT fft/libgf2x_la-gf2x-cantor-fft.lo -MD -MP -MF fft/$(DEPDIR)/libgf2x_la-gf2x-cantor-fft.Tpo -c -o fft/libgf2x_la-gf2x-cantor-fft.lo `test -f 'fft/gf2x-cantor-fft.c' || echo '$(srcdir)/'`fft/gf2x-cantor-fft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fft/$(DEPDIR)/libgf2x_la-gf2x-cantor-fft.Tpo fft/$(DEPDIR)/libgf2x_la-gf2x-cantor-fft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fft/gf2x-cantor-fft.c' object='fft/libgf2x_la-gf2x-cantor-fft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgf2x_la_CFLAGS) $(CFLAGS) -c -o fft/libgf2x_la-gf2x-cantor-fft.lo `test -f 'fft/gf2x-cantor-fft.c' || echo '$(srcdir)/'`fft/gf2x-cantor-fft.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf fft/.libs fft/_libs distclean-libtool: -rm -f libtool config.lt install-gf2x_includeHEADERS: $(gf2x_include_HEADERS) @$(NORMAL_INSTALL) @list='$(gf2x_include_HEADERS)'; test -n "$(gf2x_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(gf2x_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(gf2x_includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gf2x_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gf2x_includedir)" || exit $$?; \ done uninstall-gf2x_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(gf2x_include_HEADERS)'; test -n "$(gf2x_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(gf2x_includedir)'; $(am__uninstall_files_from_dir) install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-nobase_nodist_includeHEADERS: $(nobase_nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gf2x_includedir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f fft/$(DEPDIR)/$(am__dirstamp) -rm -f fft/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) fft/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-gf2x_includeHEADERS \ install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) fft/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-gf2x_includeHEADERS uninstall-libLTLIBRARIES \ uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-gf2x_includeHEADERS install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man \ install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-gf2x_includeHEADERS uninstall-libLTLIBRARIES \ uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS .PRECIOUS: Makefile # This is really a maintainer-only command. This can be used for creating # a tarball with an LGPL-licensed gf2x. Note that when this is done, # configure must be re-run ! untaint: cp $(srcdir)/toom-gpl-placeholder.c $(srcdir)/toom-gpl.c dist-hook: -git log --boundary 29b13131cfaf95132f6a0602d3e0575694359d11..HEAD > $(distdir)/ChangeLog # This one is simply taken from the generated Makefile. I agree it's a # bit ugly. dist-LGPL: distdir mv $(distdir)/ $(distdir)-LGPL/ cp $(distdir)-LGPL/toom-gpl-placeholder.c $(distdir)-LGPL/toom-gpl.c tardir=$(distdir)-LGPL && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-LGPL.tar.gz mv $(distdir)-LGPL/ $(distdir)/ $(am__post_remove_distdir) tune-lowlevel tune-toom tune-fft: all cd src; $(MAKE) $@ distclean-local: -find already_tuned/tuned -maxdepth 1 -name "gf2x*" | xargs -r rm -f # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/version.sh.in0000644000327606072450000000007612725540357011626 00000000000000PACKAGE_NAME=@PACKAGE_NAME@ PACKAGE_VERSION=@PACKAGE_VERSION@ gf2x-1.2/AUTHORS0000644000327606072450000000012412725540356010241 00000000000000 gf2x is the work of Richard Brent Pierrick Gaudry Emmanuel Thomé Paul Zimmermann gf2x-1.2/COPYING0000644000327606072450000010451312725540356010233 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gf2x-1.2/COPYING.LIB0000644000327606072450000006350412725540356010644 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! gf2x-1.2/ChangeLog0000644000327606072450000031225213126452067010750 00000000000000commit 6a40623ffd93e7b412ffceab80184ef39c3426a7 Author: Emmanuel Thomé Date: Thu Jun 29 17:17:11 2017 +0200 move some headers commit cc98894b7677325f249fa4ccb71c3f8bd774394a Author: Paul Zimmermann Date: Thu Jun 29 15:05:33 2017 +0200 fixed -Warray-bounds error (found on gcc20) commit 8ab3eaa38085e1de3a0275b4a65f48ef678cf5e6 Author: Paul Zimmermann Date: Thu Jun 29 14:57:42 2017 +0200 removed mulcount (never used) commit e60834e2c53e0461a17481376fe9ee5f2451910f Author: Paul Zimmermann Date: Thu Jun 29 14:38:00 2017 +0200 fix compiler warning on 32-bit processor commit ca19a1fa39a5cb85430596203e8e34c013d6cbf7 Author: Emmanuel Thomé Date: Thu Jun 29 12:03:40 2017 +0200 update comment commit 9ec3a263b2b7d3d53bdafe12415712254f1448cf Author: Emmanuel Thomé Date: Thu Jun 29 11:49:26 2017 +0200 important file for FFT & C++ commit b806f2885564cde35f40632533628fef86c0df6e Author: Emmanuel Thomé Date: Thu Jun 29 11:46:28 2017 +0200 remove cruft commit ba3b285834059ddaf1ba169d37eecaf1777c59a3 Author: Emmanuel Thomé Date: Thu Jun 29 11:42:19 2017 +0200 remove cruft, added some comments commit 7b6def8fa583febbf285ab9291699d9e064c7327 Author: Emmanuel Thomé Date: Thu Jun 29 11:18:42 2017 +0200 Also uncomment unused stuff in mpfq.h commit bec144cf89c525940e160cc28d1b08829f384090 Author: Emmanuel Thomé Date: Thu Jun 29 11:08:28 2017 +0200 forgot to uncomment the patch stuff... commit 76b5ae8643267e960b9341aec912d844d42b8940 Author: Emmanuel Thomé Date: Thu Jun 29 10:08:18 2017 +0200 test without any gmp whatsoever commit 9fa8b75df684c149c2a9845ea9ed45647e4b8a8d Author: Paul Zimmermann Date: Wed Jun 28 17:53:43 2017 +0200 another note commit 2bc1bc69f0aabef4cd2d2232d4ddc2e70330ae2c Author: Paul Zimmermann Date: Wed Jun 28 17:48:23 2017 +0200 added note in README commit d1c0c9548ad0ceff8de99df2bef43c07dab0b941 Author: Emmanuel Thomé Date: Wed Jun 28 17:37:19 2017 +0200 update BUGS commit 0dea576c6381b4b2ff49eabb369985e18d1e9cbc Author: Emmanuel Thomé Date: Wed Jun 28 17:36:13 2017 +0200 update README commit 930c80d7670772d23192fe1b4aed39fc590817a0 Author: Emmanuel Thomé Date: Wed Jun 28 16:16:26 2017 +0200 fix a corner case with out-of-source + relative path (actually any path with .) commit d652acee0b77fa20987db9a204efc938e6b97b1c Author: Emmanuel Thomé Date: Wed Jun 28 14:59:23 2017 +0200 housekeeping: provide make dist and make dist-LGPL commit 4210b06a4819c26ef94987ebcb06d864e3426a80 Author: Emmanuel Thomé Date: Wed Jun 28 14:23:52 2017 +0200 Improve previous commit: use libtool's -no-install flag. This is better in that we spare some of the complexity by not bothering with the binary's behaviour in the installed location, when in fact it's not installed anywhere beyond the source tree. commit 799afa342c1cf744cacd6987f28b9baef75faacf Author: Emmanuel Thomé Date: Tue Jun 27 19:24:33 2017 +0200 use LD_LIBRARY_PATH_RPATH for FreeBSD commit efdaa0aa1b0dc987f4a95427ca5600e8cd4fbbcd Author: Emmanuel Thomé Date: Tue Jun 27 19:24:21 2017 +0200 fix message in script commit 3510b866324b860911277cfbb58d4004e0eeb1ff Author: Emmanuel Thomé Date: Mon Jun 26 23:27:12 2017 +0200 boring fix commit 8a6e2a1e3e7322b2063be24e4f1dc4b3d58c4a42 Author: Emmanuel Thomé Date: Mon Jun 26 23:25:30 2017 +0200 boring fix commit baa941a442c964de906726248d65c131a1b9a55f Author: Emmanuel Thomé Date: Mon Jun 26 23:21:02 2017 +0200 fix test commit f0755710e09796e0ab16a96197f4cd19f3056f33 Author: Emmanuel Thomé Date: Mon Jun 26 23:15:52 2017 +0200 fix test, and expand to specific machines commit 58bae1e02f630d7c9a5accf224cb00254209d64a Author: Emmanuel Thomé Date: Mon Jun 26 23:01:46 2017 +0200 fix warning commit 92489683bc9635b51150b3faef0701c6a2b32118 Author: Emmanuel Thomé Date: Mon Jun 26 23:00:08 2017 +0200 add provision for jenkins tests to run ancillary tests as well commit 07749513ce1f7f77a928c17ac6bf7bb04f71fdbb Author: Emmanuel Thomé Date: Mon Jun 26 22:59:11 2017 +0200 new test -- this one fails on freebsd commit a1e21c9760e4d222af261aa8779048e4e1893b5b Author: Emmanuel Thomé Date: Mon Jun 26 17:20:57 2017 +0200 new test commit 3628818fa04bda73af5e3737a2de1d481b253851 Author: Emmanuel Thomé Date: Mon Jun 26 11:43:24 2017 +0200 missing include commit 5904f1cfd1f16d4ebff8e32ad1923693b3e7d5cc Author: Emmanuel Thomé Date: Mon Jun 26 11:40:41 2017 +0200 another exit(1) that slipped through in 76bb8d commit d5ac736268a37a2619ed49f5869f2932e60f3f1a Author: Emmanuel Thomé Date: Mon Jun 26 11:38:10 2017 +0200 Previous commit had wrong reference link. Oh, BTW this fixes #16830. https://github.com/sagemath/sage/blob/develop/build/pkgs/gf2x/patches/0001-Trac-15014-Let-gf2x-build-a-shared-library-on-Cygwin.patch commit 51f0120598d16a91f2f860a24f7d183310c809cc Author: Emmanuel Thomé Date: Mon Jun 26 11:34:40 2017 +0200 Add -no-undefined (this has been used for years in sage: https://github.com/sagemath/sage/blob/develop/build/pkgs/gf2x/patches/0005-Update-autotooled-files.patch#L21 ) commit ee2d96d935e30fbf7c8aa848198f1ffa4a404ddb Author: Emmanuel Thomé Date: Mon Jun 26 10:59:48 2017 +0200 it makes sense to check AC_PROG_CPP *after* AC_PROG_CC_C99 commit 74dea40f7961c5a99ac8fd6b417eca8d60693487 Author: Emmanuel Thomé Date: Mon Jun 26 10:54:27 2017 +0200 Fix #21377 commit b153a003277455c3aa262b8cdb7eb312bf129bd4 Author: Paul Zimmermann Date: Mon Jun 12 15:22:23 2017 +0200 fix for TOOMU threshold (cf https://trac.sagemath.org/ticket/18882 for issue with gf2x-1.1) commit 1c96d865ff56d81fbf8c0cd193e77679042d77e5 Author: Emmanuel Thomé Date: Tue Jun 6 11:12:13 2017 +0200 gcc-7 updates commit f80e5732cf9c674601ec7d1f7052e94b3de3ccff Author: Paul Zimmermann Date: Tue Jun 6 10:22:05 2017 +0200 added comment commit d319a8d9e12fcd1a04b83b1ea971ad66fa66f570 Author: Emmanuel Thomé Date: Wed Jan 4 10:03:18 2017 +0100 rename jenkins job commit 676c1b0467dd3c044f131e03c81731720e966f08 Author: Paul Zimmermann Date: Tue Jan 3 16:01:43 2017 +0100 removed strange character commit 53ada40981acf52c582903de764c9009d20cdedf Author: Emmanuel Thomé Date: Tue Jan 3 15:17:06 2017 +0100 rather use explicit volatile to avoid constant folding commit 911ead9f3b29bff928c78f87913d7a6323ca1487 Author: Emmanuel Thomé Date: Tue Jun 7 14:37:26 2016 +0200 fix #20385 commit 2162972a2a0f2b1c69f538cce6e7005f6d0f5148 Author: Paul Zimmermann Date: Tue Mar 29 16:45:50 2016 +0200 fix for CLOCKS_PER_SEC < 1000 commit 2a71fe9cdd8dab50815ffad1e52e2258e416f028 Author: Paul Zimmermann Date: Fri Mar 25 22:12:47 2016 +0100 reintroduce -s ... for tunetoom (for machines with large MINTIME) commit ff327c5666f0f57ec1832a16d10629b81909b8f3 Author: Paul Zimmermann Date: Fri Mar 25 21:42:47 2016 +0100 ensure stk is 128-bit aligned and simplify code commit 43e31873349a8dc2a609efd2007e7b25a1e1a905 Author: Paul Zimmermann Date: Fri Mar 25 20:26:11 2016 +0100 fixed compiler warnings commit ac6235dfa322f763c94d08d824db9a3bf202b34c Author: Paul Zimmermann Date: Fri Mar 25 14:17:03 2016 +0100 fixed printed timer resolution commit d88660d7c0c90bfd0c58f4981d199bc199e636f8 Author: Paul Zimmermann Date: Fri Mar 25 14:10:14 2016 +0100 workaround for small CLOCKS_PER_SEC commit 5f7f8986053becb8894c692a183ec16f81f5dad8 Author: Paul Zimmermann Date: Fri Mar 25 14:00:27 2016 +0100 avoid too large MINTIME commit d707ce6a09cb533d5a7dda97f20893bc98ce1c63 Author: Paul Zimmermann Date: Fri Mar 25 13:41:36 2016 +0100 use tc3x only when HAVE_KARAX is defined commit a4adb7d4033dc6185ff0b5493e294b833d6e2f9b Author: Paul Zimmermann Date: Fri Mar 25 13:29:38 2016 +0100 fixed bugs in tc3x and speed-up in tune-toom commit 8312b940a7e5f7e51c9a23571aa4150aeda98af9 Author: Paul Zimmermann Date: Fri Mar 25 08:39:47 2016 +0100 added new variant TC3X (work in progress) commit 2deb66de1797fe9fad8ad5e93a3131416a68cc5a Author: Paul Zimmermann Date: Thu Mar 24 15:37:50 2016 +0100 replace getrusage() by clock() (more precise on modern processors) commit 2969050b536cbe3e8d63942dc2febd0545ee0461 Author: Paul Zimmermann Date: Thu Mar 24 14:32:11 2016 +0100 use intrinsics everywhere to avoid Seg. faults due to misalignment commit bc6a7d9c76269967683ded3054b4a78ff25cf838 Author: Paul Zimmermann Date: Thu Mar 24 12:53:07 2016 +0100 fixed bug in toom128.c when odd=1 (and added Intel intrinsics) commit 8fe5f02c6ade8bd146d4b31a7ebbe26b1ac47483 Author: Paul Zimmermann Date: Thu Mar 24 09:09:37 2016 +0100 print certificate (like irred) with -m 1 -q 1 -f 0 commit c5858051c7f2af41edee669746f788fcd27a9867 Author: Paul Zimmermann Date: Wed Mar 23 22:09:06 2016 +0100 further simplification of karax commit 4de6a489025860e5459722cc5198af6810b9a96e Author: Paul Zimmermann Date: Wed Mar 23 21:36:16 2016 +0100 new version of karax without alignment (no penalty apparently) commit 030ac13d581220e832017a4620bc8e23d039d86d Author: Paul Zimmermann Date: Wed Mar 23 16:26:39 2016 +0100 improvements suggested by Emmanuel T. commit f0b517e0ad575e039ca239513ad9716f1ef73094 Author: Paul Zimmermann Date: Wed Mar 23 12:33:40 2016 +0100 don't print TC2X timings when karax is not defined commit 4c4d6b7093dbb377a7e0451f0386125a8cd38667 Author: Paul Zimmermann Date: Wed Mar 23 12:12:16 2016 +0100 use __m128i instead of __uint128_t commit 1095ee3b22e105dd79ae8c81182d0d0c6f2dd2fe Author: Paul Zimmermann Date: Wed Mar 23 11:25:22 2016 +0100 better check for alloca() commit 70da093919449859c34baf155d24327eee9db574 Author: Paul Zimmermann Date: Wed Mar 23 10:30:23 2016 +0100 check for HAVE_ALLOCA should be done *after* including gf2x.h commit a3230ad54440f3b0b654b22a9740954af8090129 Author: Paul Zimmermann Date: Wed Mar 23 09:51:55 2016 +0100 added assert() to find failure on fedora-20-amd64 commit 36e34008cac8f8bc5f8be968cd6c969b398c10ee Author: Paul Zimmermann Date: Wed Mar 23 09:33:42 2016 +0100 check for __uint128_t commit 93fe906055c2281bff2e61346fc91e26f0f1e872 Author: Paul Zimmermann Date: Wed Mar 23 08:55:55 2016 +0100 workaround when alloca() is not present commit cfb17d6b351cc8030cfc16b564bfd6e7ad786953 Author: Paul Zimmermann Date: Tue Mar 22 23:35:15 2016 +0100 fixed memory leak in karax commit 631bde867fae48b95a64f486fa71de9326d9375a Author: Paul Zimmermann Date: Tue Mar 22 23:17:05 2016 +0100 fixed memory leak commit ff0748cb7295eedbcc9c33bb98cd5af96322ab65 Author: Paul Zimmermann Date: Tue Mar 22 22:22:42 2016 +0100 replaced switch() hard-coded numbers by corresponding macros commit e7cb84a7df176a8d9f11bbc337c952f81c0a4fae Author: Paul Zimmermann Date: Tue Mar 22 22:03:32 2016 +0100 simplified temporary space requirement for operands of same size commit 8a0534c5ca5b9b1d86ea01fee3008ed2356b579d Author: Paul Zimmermann Date: Tue Mar 22 17:00:05 2016 +0100 new version gf2x_mul_karax() with 128-bit words (work in progress) commit 8d879e205b818b17fd5964c95abeacb4cccd9c0d Author: Emmanuel Thomé Date: Mon Mar 21 16:52:32 2016 +0100 better sse-4.1 test commit a1ce631740daec519511f85b9519205d45a5e4ba Author: Paul Zimmermann Date: Mon Mar 21 09:18:47 2016 +0100 allow -f 0 to mimic irred (with -m 1 -q 1) commit 6f31f35e9bfde2dfe8ccc0cead25973ebe2a3010 Author: Paul Zimmermann Date: Fri Mar 18 15:45:27 2016 +0100 small improvement of the fft code commit 3e0236751083078330d30037eb05793448a68948 Author: Paul Zimmermann Date: Fri Mar 18 13:57:16 2016 +0100 simplified evaluation code in gf2x_mul_tc3w() commit fb24e90e7af7aaa77c8b018560930f4d3f62dacc Author: Paul Zimmermann Date: Fri Mar 18 13:12:07 2016 +0100 improved DivOnePlusX2 like DivOnePlusX commit 6dba6f9a45f00db8e84a1ef454991b466cb640d1 Author: Paul Zimmermann Date: Fri Mar 18 11:34:56 2016 +0100 use pclmul in DivOnePlusX commit eb7d81b3797dc654512567f34202d7b9591bc2d6 Author: Paul Zimmermann Date: Fri Mar 18 10:32:09 2016 +0100 do not consistency check when NDEBUG is defined commit 04ec5e6ac8f53648fa0232b84a2f181dd1f60fdf Author: Paul Zimmermann Date: Fri Mar 18 09:45:56 2016 +0100 get rid of USE_GMP: it does not save after all commit 6cf72a1ec5df255e86c0a47f0f591cfff5373370 Author: Paul Zimmermann Date: Fri Mar 18 09:40:03 2016 +0100 shift count must be > 0 in mpn_lshift and mpn_rshift commit d7b0ad06b37e5fe59fbba4c5038bc4d4a2bf2b3d Author: Paul Zimmermann Date: Fri Mar 18 09:28:41 2016 +0100 generate full 64-inputs for the tuning on 64-bit processors commit 5eafcea7d2e064b4af7277d1da4fe3e79407a295 Author: Paul Zimmermann Date: Thu Mar 17 12:16:01 2016 +0100 further simplification in gf2x_mul_tc3() commit 5b6e8e9bbca7f7b4a942ae350ec540e9bfd59663 Author: Paul Zimmermann Date: Thu Mar 17 11:40:56 2016 +0100 slightly improved gf2x_mul_tc3 commit 73e016e10691b15eb8143fa3d57b5012a2c59cc5 Author: Emmanuel Thomé Date: Thu Mar 17 10:39:24 2016 +0100 fix stupid (minor) bug in script commit a4d1bd293f0732f15b2f719c7de35caaff641fef Author: Emmanuel Thomé Date: Thu Mar 17 10:27:19 2016 +0100 dirty hack to avoid the -march=native failure on the CI platform commit be1c4a6874b525fe71d928c83dba955d1791d0eb Author: Emmanuel Thomé Date: Thu Mar 17 01:19:09 2016 +0100 marginally improved mul5 commit 887ba7847be4a15021bf24806e5b42c8cd26711a Author: Emmanuel Thomé Date: Thu Mar 17 01:03:52 2016 +0100 missing include commit 463c2a0dc8bcb3857a443ed2f1e0937c519eed88 Author: Emmanuel Thomé Date: Thu Mar 17 00:52:48 2016 +0100 Added systematic checking of all low-level routines commit 60993e9fb44804b36328557f2894d54024f66868 Author: Emmanuel Thomé Date: Thu Mar 17 00:39:10 2016 +0100 fix generate-test-list.pl commit 0899d3fafe9b766d6490c76872fc989dddf36928 Author: Emmanuel Thomé Date: Thu Mar 17 00:19:17 2016 +0100 fix bug in mul9clk2.c commit becd7e390442d29c7b19c42e61d224e1fd824e56 Author: Emmanuel Thomé Date: Wed Mar 16 23:41:07 2016 +0100 better autoconf macros commit 58be981564e07b92f028c3e251f4b7eb0c6db425 Author: Emmanuel Thomé Date: Wed Mar 16 15:16:21 2016 +0100 add -march=native and -mtune=native to default CFLAGS not done if --disable-hardware-specific-code is passed. -march=native -mtune=native are not passed either if CFLAGS have been overridden on the command line or the environment. commit bb99bdc59b57c7b82fe0c1904c9e7b4a332212f3 Merge: 6ec54bf a9a50b0 Author: Emmanuel Thomé Date: Wed Mar 16 15:05:22 2016 +0100 Merge branch 'master' of git+ssh://scm.gforge.inria.fr/git/gf2x/gf2x commit a9a50b08cd0e82830a309f9847a235d0a9f6764c Author: Paul Zimmermann Date: Wed Mar 16 14:54:37 2016 +0100 use GMP's mpn_lshift for Lsh1() if available commit 08e1b62a9858ac11f9a99466d313a6c1bee24fc1 Author: Paul Zimmermann Date: Wed Mar 16 13:56:59 2016 +0100 patch to use GMP low-level routines commit 6ec54bff95fe4f564c44c080693748092f532b10 Author: Emmanuel Thomé Date: Tue Mar 15 17:33:35 2016 +0100 simple change to a simple bench program commit 8c615c37cffefe2ade9006ffdfa5a315acae560f Author: Paul Zimmermann Date: Tue Mar 15 09:34:05 2016 +0100 new parallel version of factor.cpp (for one trinomial only) commit 6342074e1d09dc0c79520ca73d3c1c5d9088147d Author: Paul Zimmermann Date: Wed Mar 9 17:52:23 2016 +0100 cleanup of the fastsqr_pdep() code commit a229523e03f6d16ef5bc65347f30abb909017f7f Author: Paul Zimmermann Date: Fri Mar 4 23:12:27 2016 +0100 new squaring code using _pdep_u64() commit f388363b773875891dde5ba83c6bf83529a18d35 Author: Paul Zimmermann Date: Fri Mar 4 11:39:43 2016 +0100 added comments about parallel version commit 48ec3998abe7fd1c36f34c9166c0df6256e066be Author: Paul Zimmermann Date: Thu Feb 4 10:25:48 2016 +0100 now we can also give input values of s on stdin commit 41476ebe48453e591698a6a577144525a2a1c327 Author: Paul Zimmermann Date: Wed Jan 27 14:07:28 2016 +0100 added comments commit 31e1b443ce580730b6bfcd6f5d21e851009fa190 Author: Paul Zimmermann Date: Tue Jan 26 16:29:49 2016 +0100 since NTL produces a static library by default, link with libntl.a commit 8f0882547a43b88c0af15db39037c4bb25c9c439 Author: Paul Zimmermann Date: Tue Jan 26 14:33:30 2016 +0100 added NTL install path in apps/Makefile.am commit dd8bd101f8e768a1ebac720fad3fef3b755ac6f0 Author: Paul Zimmermann Date: Tue Jan 26 14:31:17 2016 +0100 tuning for fastmulmod was wrong (if not done by gf2x) commit 5494df03546090a7fb58702e620e3705d6a8ff51 Author: Paul Zimmermann Date: Mon Jan 25 17:41:24 2016 +0100 fixed multi-thread issue commit 368169520afad7cdef6bfd3191af3ad9a040d694 Author: Paul Zimmermann Date: Mon Jan 25 17:04:19 2016 +0100 -fopenmp is needed in CPPFLAGS commit 5401a8782dd64e8d6a80de8adb1f77b83ad40594 Author: Paul Zimmermann Date: Mon Jan 25 16:19:02 2016 +0100 first steps toward making factor.cpp multi-thread commit 5b2b9b08e4a056f30503d4de0cfc3c76063b187c Author: Paul Zimmermann Date: Mon Jan 25 11:29:42 2016 +0100 fixed bug (index test should be made before) commit c2d440a77f43eda67c15ef99ac877c63a84a240a Author: Emmanuel Thomé Date: Wed Jan 6 17:43:39 2016 +0100 fix off-by-one in 32-bit commit 02887c40e3b0195829f1d08107beb67469431966 Author: Emmanuel Thomé Date: Sat Dec 5 00:14:48 2015 +0100 battle cache associativity mishaps commit 0f02a0a5d3735e0d3cce09ee40dec9f792922cb6 Author: Emmanuel Thomé Date: Sat Dec 5 00:14:27 2015 +0100 improve gf2x_cantor_fft_addcompose_n commit b6ee723e066d28faca2929508853a4e07af213e3 Author: Emmanuel Thomé Date: Fri Dec 4 22:20:39 2015 +0100 This file had intentionally been deleted in commit 1274585. The checking mechanism does not use this file anymore, it's a relic. I mistakenly revived it. commit eeb8df288addf8eb3a528671a0103f9c8933bbc7 Author: Emmanuel Thomé Date: Fri Dec 4 21:43:42 2015 +0100 new function addcompose_n for fft interface commit b3b88c0008eeae9c2f24ba6c3f515a698ef4350f Author: Emmanuel Thomé Date: Fri Dec 4 20:57:20 2015 +0100 backport changes which were made in cado-nfs commit 5cf6386b38e7d57a89ee1caba248956ef2365ac9 Author: Emmanuel Thomé Date: Thu Nov 26 10:34:12 2015 +0100 ggrr commit f966d6ca8c5d295be764366650c7e4181c1c8eb2 Author: Emmanuel Thomé Date: Thu Nov 26 10:32:23 2015 +0100 fix for 32-bit gcc on 64-bit platform commit aaf5a7366c550e05d6b3d9f03f1d55201b4922eb Author: Emmanuel Thomé Date: Fri Nov 6 11:45:40 2015 +0100 fix bogus function names commit b21288bc07e1ab5040aeb935adf8732e2f4cdb80 Author: Emmanuel Thomé Date: Fri Nov 6 11:38:57 2015 +0100 mpfq update (come on, sizeof(char) is 1) commit adcf8937f14b4456ab325ac5bb230a85542bc6a0 Author: Emmanuel Thomé Date: Fri Nov 6 11:16:25 2015 +0100 Get rid of HAVE_GF2X within GF2X itself. It's absurd. commit 6fa8ca8dc7eeeb7f374dcf3714669fdbf05badee Author: Paul Zimmermann Date: Thu Oct 8 14:45:52 2015 +0200 enable AM_MAINTAINER_MODE (to be disabled for releases) commit 0afb6f66d8c9efefb056302ec76ca345e4ce85b6 Author: Paul Zimmermann Date: Thu Oct 8 10:34:40 2015 +0200 use clock() when getrusage() not available commit 12898d74ab0d6c9a049be40bff6e51486d8de68d Author: Emmanuel Thomé Date: Fri Sep 11 22:15:22 2015 +0200 add comment (which just fixed the out-of-source build failure on the rpi). commit 789bc459098bb59fd3dd655bf62976304d522e43 Author: Emmanuel Thomé Date: Fri Sep 11 16:30:09 2015 +0200 fix problem in case GF2X_MUL_FFT_TABLE was undefined. Reduce checking effort on 32-bit commit d019f4b1ff0726299fd813e4620579d2c3659557 Author: Emmanuel Thomé Date: Fri Sep 11 13:45:23 2015 +0200 fix --disable-sse2 for 32-bit commit d3e4031be36ffb0ac00036996bf762cdcf9fd3bc Author: Emmanuel Thomé Date: Fri Sep 11 00:02:05 2015 +0200 fixed --disable-sse2 commit fae0388239ee5cdd3e33598e4c582c8e3d2428b8 Author: Emmanuel Thomé Date: Thu Sep 10 23:36:48 2015 +0200 fix bug in config check commit d05a7bee6ace42c65ec68441bdacf8c21ce76adf Author: Emmanuel Thomé Date: Thu Sep 10 23:23:56 2015 +0200 copy the instruction set checks from cado-nfs, and chain them as we do there. commit f4d233b22cdc567f4cfe0627d963616a6b517442 Author: Emmanuel Thomé Date: Thu Sep 10 16:02:35 2015 +0200 get rid of references to v2di commit 7d128f734f34e3dddc911f65df87e91f97954b99 Author: Emmanuel Thomé Date: Thu Sep 10 15:40:47 2015 +0200 mpfq update commit 965f61463b6b3bb50b7c9c39fdece943ce9666bd Author: Emmanuel Thomé Date: Thu Sep 10 13:00:22 2015 +0200 get rid of HAVE_ctzl and friends commit 87db5545f2a938816dd2896f13f148cb4d790898 Author: Emmanuel Thomé Date: Thu Sep 10 12:54:24 2015 +0200 make our ctz/clz/parity helper functions private commit db0d83bcce289a229c6c9837cea725daf4dbc9f2 Author: Emmanuel Thomé Date: Thu Sep 10 09:45:55 2015 +0200 protect names of static functions in the mpfq files when used standalone. commit 34281d8f82f6b861b4373ef023811976dc44b1a1 Author: Emmanuel Thomé Date: Wed Sep 9 23:02:12 2015 +0200 improve previous patch commit ea10b412494809e7f413ede010f2dd110ce21bdb Author: Emmanuel Thomé Date: Wed Sep 9 22:20:21 2015 +0200 mpfq update, + patch update commit fbc25f1be0eec2ae61cea37c1ba3b48c664e8647 Author: Emmanuel Thomé Date: Mon Aug 17 22:57:19 2015 +0200 typo commit 86c9eccdaa87a77b29afab2ce146a4376f96b382 Author: Emmanuel Thomé Date: Mon Aug 17 22:37:02 2015 +0200 Ooops. 6966f6f broke tuning, ci has been running for 2 months. commit c7fe1296aa3ac4493346e7bb51f357aa084ecfb8 Author: Emmanuel Thomé Date: Fri Jun 19 17:48:06 2015 +0200 remove unused #include commit 4f3bb447673b206245e32358c6e7ed61d5f67bdc Author: Emmanuel Thomé Date: Fri Jun 19 16:24:09 2015 +0200 fixed wrong types in printf commit c89f956307257d411ce46ff54e465804cd3f9420 Author: Emmanuel Thomé Date: Fri Jun 19 16:19:25 2015 +0200 expose gmp/mpir header flags to the config-export file commit 45548abcabe5d6ee0503a0f07fed3197177c42d6 Author: Emmanuel Thomé Date: Fri Jun 19 16:13:53 2015 +0200 update mpfq patch commit 7f8ffd84888c729d7f003b028e964eecefda595d Author: Emmanuel Thomé Date: Fri Jun 19 15:41:10 2015 +0200 support MPIR commit 6966f6f9ab36f58ed9b4605aae59f7849998e575 Author: Emmanuel Thomé Date: Fri Jun 19 15:13:36 2015 +0200 new config check commit ebfea298de5e935669978897e6c531bb2a3764dd Author: Emmanuel Thomé Date: Fri Jun 19 10:03:44 2015 +0200 propagate mpfq change commit 900dad83effb5f4d99f6c6095b66ddb865f99b8e Author: Emmanuel Thomé Date: Thu Jun 18 15:19:35 2015 +0200 missing functions commit 18343ddda4c1119be5eeca5eea700e96da47979c Author: Emmanuel Thomé Date: Thu Jun 18 14:59:02 2015 +0200 remove some cruft commit e95bbe1f19b7f34dcaedf02a13ab81cf7af1a2ad Author: Emmanuel Thomé Date: Thu Jun 18 12:33:39 2015 +0200 fix fft includes for external use commit 7b9a9b45db9877369844570efacb66580874bd17 Author: Emmanuel Thomé Date: Thu Jun 18 12:02:44 2015 +0200 trivial commit, test hooks commit fe615afbaa3b1edd5c701d1f6fef8687a68b14c8 Author: Emmanuel Thomé Date: Thu Jun 18 11:58:24 2015 +0200 add no-distribute.txt commit db61d7fe3fc79fd7e63d14948f957d3fa7c59f60 Author: Emmanuel Thomé Date: Mon May 18 16:12:27 2015 +0200 With --enable-fft-interface, now we don't compile cantor at all. commit 88a82d312cda8311b209a078fa24c92254cb8832 Author: Emmanuel Thomé Date: Mon May 18 10:19:27 2015 +0200 re-enable ternary fft tests. commit 651468fef8926e9a97c6a54786a0845bcc2cd494 Author: Emmanuel Thomé Date: Mon May 18 10:12:08 2015 +0200 Temporarily revert Paul's changes for the ternary fft. This reverts the following commits: 1219487d700d45491fde594ddf3e14b4d1e0a965 b70511ec4f4428592793be6f670ac4c296b99859 6d781062bff33b1daf4dd46e6814e35e93a01682 commit 24bed40452d140ab1dac6bb3279445d56de77463 Author: Emmanuel Thomé Date: Fri May 15 16:16:42 2015 +0200 as an option, test without --enable-fft-interface (which otherwise becomes the default) commit 046e38f5049f86a20cb78b9be99d395603dc0560 Author: Emmanuel Thomé Date: Fri May 15 15:14:45 2015 +0200 fix bug commit 6185661900be923f12170ddf5f1fcc364399d64f Author: Emmanuel Thomé Date: Fri May 15 14:52:36 2015 +0200 fix commit 5b558b7e68948d3f2f1911437d3d68439091e1ea Author: Emmanuel Thomé Date: Fri May 15 14:33:40 2015 +0200 try to fix 32-bit+cantor64 commit 574c57950c00b8d11c91dacd169abc78d038443d Author: Emmanuel Thomé Date: Thu May 14 01:06:53 2015 +0200 test 32-bits + CANTOR_BASE_FIELD_SIZE==64 (currently failing) This feature was coded but never tested. Easier now that we have 32-bit bots runnings. commit 4d4583fa9b2925fd2714abb1b82dc4c5fa7330b4 Author: Emmanuel Thomé Date: Thu May 14 01:17:19 2015 +0200 regenerate mpfq files. Update patch. Remove SSE dependency. commit 82fcb930943f7681508248f75107823a219bc243 Author: Emmanuel Thomé Date: Thu May 14 10:09:06 2015 +0200 missing files in 6334f4 commit c21ac7ade3bbbb7aeb76c1615001a86772412c5b Author: Emmanuel Thomé Date: Thu May 14 10:07:54 2015 +0200 Revert "test 32-bits + CANTOR_BASE_FIELD_SIZE==64" This reverts commit 9719c08b226f090a39eeb6ac21ec0acb84319f0f. commit 7febff5223ab70f1f897b2a34fe10e5aea9957f7 Author: Emmanuel Thomé Date: Thu May 14 10:07:51 2015 +0200 Revert "regenerate mpfq files. Update patch. Remove SSE dependency." This reverts commit 6da2079967b02e88ddd9b81493da8cc1b4fb6607. commit 6da2079967b02e88ddd9b81493da8cc1b4fb6607 Author: Emmanuel Thomé Date: Thu May 14 01:17:19 2015 +0200 regenerate mpfq files. Update patch. Remove SSE dependency. commit 9719c08b226f090a39eeb6ac21ec0acb84319f0f Author: Emmanuel Thomé Date: Thu May 14 01:06:53 2015 +0200 test 32-bits + CANTOR_BASE_FIELD_SIZE==64 This feature was coded but never tested. Easier now that we have 32-bit bots runnings. commit 6334f4f50f6970d2fd70f5ee803095593fe17b84 Author: Emmanuel Thomé Date: Wed May 13 17:31:55 2015 +0200 Several build fixes: EXTRA_DIST here and there, header location, OOS tests. commit 82167123e935c9ddc06758ebadf31c6254f37238 Author: Emmanuel Thomé Date: Wed May 13 15:23:22 2015 +0200 allow gmp in /usr/local commit d26b684dffd545e42b593aa3c90c7df1b574702e Author: Emmanuel Thomé Date: Wed May 13 15:15:27 2015 +0200 oops commit f6431cbf520e4210c2c93ee10b2ab6bb47bcc2f3 Author: Emmanuel Thomé Date: Wed May 13 15:04:09 2015 +0200 use --with-gmp in jenkins scripts commit 934c1c13f3f5937ff0bd48c79ff10d1ec745aa6b Author: Emmanuel Thomé Date: Wed May 13 14:48:41 2015 +0200 doc about --with-gmp commit 9bc9f7241d74433c2294eb9e682edaea76f16dc1 Author: Emmanuel Thomé Date: Wed May 13 14:39:16 2015 +0200 Check for GMP GMP is required (mildly) by the mpfq source code. We could do without, but I have only very little motivation for doing so. commit 9a4b24bc21fd3ee6dd76ad9d6d118ff4bf52c89f Author: Emmanuel Thomé Date: Thu May 7 23:12:54 2015 +0200 fixed bug with non-truncated cantor. commit 74260c6c22d7ecd47f5aeb86b452e21fb26e732f Author: Emmanuel Thomé Date: Thu May 7 21:44:07 2015 +0200 autogenerate many tests commit 1274585c89ac450429b4613422c8199838557f3f Author: Emmanuel Thomé Date: Thu May 7 21:13:11 2015 +0200 extend testing mechanism commit aab0563b52257ca6aaa67b9820e7e486ca868a3e Author: Emmanuel Thomé Date: Thu May 7 15:16:50 2015 +0200 missing subdir commit ebc4cfb1783b7a3a2350d93323975b3586e7bba9 Author: Emmanuel Thomé Date: Thu May 7 15:14:42 2015 +0200 missing file commit 16d3971649ebc681bc6d47d778207d0713485242 Author: Emmanuel Thomé Date: Thu May 7 15:13:02 2015 +0200 silence warning commit 9383e2837d53741280175f72e1d7f670a4db27c7 Author: Emmanuel Thomé Date: Thu May 7 15:08:46 2015 +0200 Fix #16578 commit af9d868ad7ab339520facfb8ea532c378a056277 Author: Emmanuel Thomé Date: Tue May 5 10:23:52 2015 +0200 still work in progress -- but postponed to later make check doesn't correctly recurse in the fft/ subdir. I'm not terribly happy with the names so far. the tests in fft/Makefile.am would need to be done about the same way they're done in tests/Makefile.am, with externally-generated checksum. We'd need to make the generation code a common base. commit e5c900c11e07d98c3074aea88a72e4107c2b3a8b Author: Emmanuel Thomé Date: Mon May 4 11:30:11 2015 +0200 merge gf2x-fft as a distributed child of gf2x, and renamed some stuff This simplifies things greatly. commit 7efc2cc373a765ba531c7fef1a697629fe479b30 Merge: e2c041e 6532c3f Author: Emmanuel Thomé Date: Mon May 4 09:30:33 2015 +0200 Merge branch 'fft-branch' commit e2c041eadda2c569ee31b9dbacbad3e4b3564fde Author: Emmanuel Thomé Date: Sun May 3 23:23:19 2015 +0200 new script commit 00737708732caa2546247224f0f9870429d617c5 Author: Emmanuel Thomé Date: Sun May 3 22:49:17 2015 +0200 Apparently "." and "source" behave differently with openbsd commit 79853fb1111144c8a71c891b94f410d75c0901ee Author: Emmanuel Thomé Date: Sun May 3 22:30:22 2015 +0200 modify scripts to better account for roaming CI jobs. commit 95a742d02e0f1b3703a8062fd084f2130c580b78 Author: Emmanuel Thomé Date: Sun May 3 22:10:41 2015 +0200 cute little bug commit 6ee943185b25de9e39fb46e1178b13caaffa39b4 Author: Emmanuel Thomé Date: Sun May 3 22:01:04 2015 +0200 new script commit 0a89e324806bc3e0b167692e7dddbd0ec1ada01e Author: Emmanuel Thomé Date: Sun May 3 10:44:50 2015 +0200 adapt to various versions of aclocal commit c9e95437a6e6fb04f8d7578743c163790aa5eb1d Author: Emmanuel Thomé Date: Sun May 3 10:39:58 2015 +0200 new slave commit 0c63b9fa556f4c7b7290bd4144aa2e244c4a5fb5 Author: Emmanuel Thomé Date: Sun May 3 10:32:56 2015 +0200 functional (albeit failing) macos test commit 2e12a2d9d2ba694f3fed3b2ad4c4bb8ae6308ea1 Author: Emmanuel Thomé Date: Sat May 2 23:23:21 2015 +0200 modify script commit dbd0ed7df22f7d2f527aa7cd497f3772f845591f Author: Emmanuel Thomé Date: Sat May 2 23:17:27 2015 +0200 modify script commit b1206e0d3dacf35f3a004ef9cbc1cffe9606b5a6 Author: Emmanuel Thomé Date: Sat May 2 23:05:48 2015 +0200 more scripts commit fb3a8a7e35c6c1bd25f5534eda6e7bb478a926c9 Author: Emmanuel Thomé Date: Fri May 1 22:47:47 2015 +0200 fixed leftover stuff commit c95eaf7e99908c8dbc3f58ff79ff9d15c65ce900 Author: Emmanuel Thomé Date: Fri May 1 22:40:06 2015 +0200 change gpl-untaint logic commit d9fbb2cfa24111862f55174ac300b299c1e6713c Author: Emmanuel Thomé Date: Fri May 1 22:26:48 2015 +0200 fixed error in html escaping commit e9ea9df4acc25d8b569ab7335b32ae3fe9507827 Author: Emmanuel Thomé Date: Fri May 1 22:22:43 2015 +0200 commit jenkins scripts commit 26f0712d76305ca970ddccd02304f18fbef49ee8 Author: Emmanuel Thomé Date: Fri May 1 17:27:43 2015 +0200 fix some paths commit 6c9ca45672c77378e05122944e08694b90695792 Author: Emmanuel Thomé Date: Fri May 1 17:11:00 2015 +0200 fix 32-bit bug commit a0f32e9a52d8bb9a94599c3412bf03cab59a4c66 Author: Emmanuel Thomé Date: Fri May 1 16:53:52 2015 +0200 fixed minor stuff, + we require automake 1.13 for creating the makefiles commit 0048a9615c8884ed9342bc3b826d6787f9574c93 Author: Emmanuel Thomé Date: Fri May 1 16:45:23 2015 +0200 fix autotools error commit adfd87b24af276f946f097aa7a7fc99074d3ff09 Author: Emmanuel Thomé Date: Fri May 1 16:40:50 2015 +0200 more missing things commit cd62e01f3a9355a3fe9943e549a0a80fb91235e4 Author: Emmanuel Thomé Date: Fri May 1 16:35:31 2015 +0200 some more commit ed8452a8b912c0bad6209c356174d53fb8d7583d Author: Emmanuel Thomé Date: Fri May 1 16:33:34 2015 +0200 missing macros commit b08ebcab8ddfb0cbee87f5ba627f44accc9c62eb Author: Emmanuel Thomé Date: Fri May 1 16:06:44 2015 +0200 fixed mistake commit e9733c85c60ae74795671016dc706b9c050ab19f Author: Emmanuel Thomé Date: Fri May 1 15:54:35 2015 +0200 fixed failing tests commit de079282fd90297031cc7702b301058537c6fa22 Author: Emmanuel Thomé Date: Fri May 1 15:48:21 2015 +0200 added new header files, and improved tests commit 2741ddd4dc808108267d50168c406793724b5ef7 Author: Emmanuel Thomé Date: Thu Apr 30 16:56:05 2015 +0200 missing file commit f36c9ea61648b031e677f6790c2a22b1d20e092f Author: Emmanuel Thomé Date: Thu Apr 30 11:50:11 2015 +0200 autotools tweaks commit f01b7e38b43c28640b91e6c32b22e98a4d24b036 Author: Emmanuel Thomé Date: Thu Apr 30 11:28:08 2015 +0200 rename HAVE_PCLMUL_SUPPORT and HAVE_SSE2_SUPPORT and add a header. commit 6532c3f2eb2dfbe2034a0fe9727a6f414bfb62fc Author: Emmanuel Thomé Date: Wed Apr 29 18:48:20 2015 +0200 more fixes commit d3c6c92f9fd03b55cd66abe8cfc14f697e58f7b9 Author: Emmanuel Thomé Date: Wed Apr 29 18:46:07 2015 +0200 missing includes commit 16009c3c3d887e43aa58be4e44152f1416feebd0 Author: Emmanuel Thomé Date: Wed Apr 29 18:43:52 2015 +0200 tmp commit 82b886dcebdfcb143c0e4541b98972c701d0360e Author: Emmanuel Thomé Date: Wed Apr 29 18:40:23 2015 +0200 propagate -lgf2x commit bbd07fe71c0f040ec18dfdd143e858c230977824 Author: Emmanuel Thomé Date: Wed Apr 29 18:37:47 2015 +0200 move include commit 040fd5a770af9f890e56a96a351aa72ee2dbcd7e Author: Emmanuel Thomé Date: Wed Apr 29 18:12:11 2015 +0200 remove a const commit 7278872793ebdd63e3e7c99ee4d2ad3e32f7fec3 Author: Emmanuel Thomé Date: Wed Apr 29 17:58:57 2015 +0200 allow gf2x-fft to be a child of gf2x commit 369cbe00bb1d771d50aa6667e0e05fd3bca98530 Author: Emmanuel Thomé Date: Wed Apr 29 17:55:09 2015 +0200 add missing function commit aa0c0a46f13cdb2fd4e8714d865ad5fbc2aefe9a Author: Emmanuel Thomé Date: Wed Apr 29 17:40:53 2015 +0200 fix types in cantor commit 3e1e1ca395eb4feebf238eaae2881c856810f9ea Author: Emmanuel Thomé Date: Wed Apr 29 17:11:20 2015 +0200 use gf2x-thresholds.h to get GF2X_WORDSIZE commit 9957123a422bc15ae44556a36fc393d3e3742e8e Author: Emmanuel Thomé Date: Wed Apr 29 17:06:01 2015 +0200 include mpfq subdir commit f95522099bbe73f7d9e2d23e656f210b29b2d323 Author: Emmanuel Thomé Date: Wed Apr 29 17:03:09 2015 +0200 fix bug commit 2ab156ee87e8921d839f34083e927eeb6552f0b5 Author: Emmanuel Thomé Date: Wed Apr 29 16:37:27 2015 +0200 Better patch. commit 69b6aad9dbe60b0aaacb701b2a16413f34d8d5cf Author: Emmanuel Thomé Date: Wed Apr 29 13:54:27 2015 +0200 add mpfq patch commit 607cfd23d7f4597e15b02807ede8649914f4ecc4 Author: Emmanuel Thomé Date: Wed Apr 29 11:58:12 2015 +0200 generate new mpfq code commit 17cff197f7c69f03e2e35589d4a30e4ea7ce9dfb Author: Emmanuel Thomé Date: Wed Apr 29 11:03:46 2015 +0200 tmp commit c3e6ce8cc0712d076a444763abccfd02e7c68e05 Author: Emmanuel Thomé Date: Wed Apr 29 10:51:14 2015 +0200 fix warning commit dd6050a4f32be81f25870b9f9053eddc27ca90af Author: Emmanuel Thomé Date: Wed Apr 29 10:51:11 2015 +0200 more trial and error commit 48d66e951bb1eee75f08ab2d2722849b1bd81af4 Author: Emmanuel Thomé Date: Wed Apr 29 10:42:05 2015 +0200 wrong include commit d7c9448f91e0850427e8647a8d77883d4408b8f8 Author: Emmanuel Thomé Date: Wed Apr 29 10:33:01 2015 +0200 fix warning commit 2532e904465035267410292979b381a5cb27745c Author: Emmanuel Thomé Date: Wed Apr 29 10:29:18 2015 +0200 fix bugs commit 9e7e73ecd2099cbbda0b1ba18577dc1299423bb8 Author: Emmanuel Thomé Date: Wed Apr 29 10:03:58 2015 +0200 Let mpfq_2_128_mul_ur work both with and without gf2x being available... commit 13e8d124c7598d3b0e51ee7cb385435cd2ec57f5 Author: Emmanuel Thomé Date: Wed Apr 29 09:58:12 2015 +0200 fix #18889 commit 23fe655c1598be336acca8008d8bf9a4976aa1a5 Author: Emmanuel Thomé Date: Thu Apr 23 00:23:48 2015 +0200 hmm. this is awkward. gf2x includes its impl and config headers in the "small" multiplication files it exports. This inconditionally exposes and redefines the PACKAGE__* and such variables for the user. This is bad. cantor.h uses (was using) the gf2xfft-config.h ; as a fix to the previous one, we have a relatively easy time getting rid of it, since it's equally bad. cantor.h includes mpfq/.h though, and that includes inline assembly code. If gf2x is available, it makes sense to use the gf2x optimized routine in this case. But HAVE_GF2X_H_ is defined in gf2xfft-config.h only. and mpfq/XXXX.h pretending a one-size-fits-all implementation suffices is really problematic for fownstream users. commit 3317a24493f9229368416922e922270f2cb3f4a2 Author: Emmanuel Thomé Date: Thu Apr 23 00:09:55 2015 +0200 ahem commit 10e5097dd2c4b8190609f20f23032980dca07bf2 Author: Emmanuel Thomé Date: Thu Apr 23 00:00:52 2015 +0200 oops. Fixed leftover c128's here and there. commit 143a94fe8c8f769ddd8a97d2bed0b3cca69322c4 Author: Emmanuel Thomé Date: Wed Apr 22 23:53:20 2015 +0200 added new argument --with-parent-gf2x commit 8f3b48c2742dad64c1bcd93fcccd81ca86e8f4b2 Author: Emmanuel Thomé Date: Wed Apr 22 22:23:34 2015 +0200 forward-port 5b03ae21c52aa2a7108ef2b525e11bfce6d47fb1 and 5fa6926bc7912522e2aa7b0c5f4766b3a4985dfd from cado-nfs commit 7bcbabb0330317be47a05d2ddde3662cb46efd83 Author: Emmanuel Thomé Date: Wed Apr 22 22:21:42 2015 +0200 forward-port cde209d1946868c3b35f83c7618d2256ba5579a7 from cado-nfs commit 21e2b18042dc0c2c8d8168c1a50527e7a06fc77f Author: Emmanuel Thomé Date: Wed Apr 22 22:11:55 2015 +0200 halfway to synchronized gf2x-fft from the copy in cado commit 6d781062bff33b1daf4dd46e6814e35e93a01682 Author: Paul Zimmermann Date: Thu Apr 9 12:21:10 2015 +0200 forgot to use the return value of gf2x_tfft_init()... commit b70511ec4f4428592793be6f670ac4c296b99859 Author: Paul Zimmermann Date: Thu Apr 9 12:14:11 2015 +0200 now gf2x_mul_fft() performs only one bug malloc() call commit 0196eee06f78803e2d6493d5b31263b09b114b2a Author: Emmanuel Thomé Date: Wed Apr 8 21:05:04 2015 +0200 sync commit ae999e527aef9f5af3e05f185af2781a465e91b4 Merge: 1219487 36ba567 Author: Paul Zimmermann Date: Wed Apr 8 17:20:58 2015 +0200 Merge branch 'master' of git+ssh://scm.gforge.inria.fr/git/gf2x/gf2x commit 36ba56733beea3efc692b38554982c07659335b4 Author: Emmanuel Thomé Date: Wed Apr 8 17:18:28 2015 +0200 Got rid of v2di's. Some improvements, along with it: before: mul4 -> mul4cl1.c [ 12.3 ns ] **BEST** mul6 -> mul6clk2.c [ 23.5 ns ] **BEST** (previous) -> no change mul8 -> mul8k.c [ 42.7 ns ] **BEST** (previous) -> no change mul9 -> mul9clk2.c [ 48.2 ns ] **BEST** after: mul4 -> mul4clk.c [ 8.7 ns ] **BEST** (previous) -> no change mul6 -> mul6clk2.c [ 17.7 ns ] **BEST** (previous) -> no change mul8 -> mul8k.c [ 40.4 ns ] **BEST** (previous) -> no change mul9 -> mul9cl.c [ 42.6 ns ] **BEST** (previous) -> no change commit 1219487d700d45491fde594ddf3e14b4d1e0a965 Author: Paul Zimmermann Date: Wed Apr 8 17:18:22 2015 +0200 group all dynamic memory allocations of gf2x_mul_fft into the single function gf2x_tfft_init(). This is a first step towards a function that would do no dynamic memory allocation at all. commit 91b0d85b820ee9d33d34dedfb8cdef8eccdb11dd Author: Emmanuel Thomé Date: Wed Apr 8 11:04:22 2015 +0200 oops. We really need the lgpl-2.1 version of gmp's config.guess file. commit cb6a60399d9a688474e3da7e2d64e472f79e29e8 Author: Emmanuel Thomé Date: Wed Apr 8 00:07:47 2015 +0200 no tuning in LGPL case commit 1d3bacda44aa1f59a53eacb97d609432f9efd9bc Author: Emmanuel Thomé Date: Tue Apr 7 23:49:30 2015 +0200 avoid warning commit 2a2eec7423601e4a5b1c5c5051351204da35171c Author: Emmanuel Thomé Date: Tue Apr 7 23:47:00 2015 +0200 avoid lrand48 commit 75d1626b82985663ec8d31b46dd3ea9f0e96d98e Author: Emmanuel Thomé Date: Tue Apr 7 23:34:29 2015 +0200 activate GPL- and non-GPL code divergence commit 4b556f6f7119def3c3ca0e8f2017a60943c95456 Author: Emmanuel Thomé Date: Tue Apr 7 23:23:07 2015 +0200 update configfsf.guess (not GPL-tainting as per explicit exception) wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config/configfsf.guess wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O config/configfsf.sub The GMP config.guess and config.sub are still those from the latest LGPL-2.1 gmp. commit 717ada264e7de79ad73ff92a63ae27bf20207c62 Author: Emmanuel Thomé Date: Tue Apr 7 23:14:25 2015 +0200 more license wording updates commit 73cc3ca81a3d7741f976e8158d30baa2990b9b3a Author: Emmanuel Thomé Date: Tue Apr 7 22:44:36 2015 +0200 recognize arm7vl commit 70a48a77b94a927869a3a05619b451855cc36d2e Author: Pierrick Gaudry Date: Sun Mar 22 13:07:53 2015 +0100 Add gf2x tuning for armv7l (raspberry pi 2). commit 5287eff9e78be0e71833c5834f8a0dc3ba945cdd Author: Emmanuel Thomé Date: Tue Apr 7 22:33:10 2015 +0200 forgot two files in the distribution... commit e8beb9def23a1d21b1fc091a1632d18ae14d3cc0 Author: Emmanuel Thomé Date: Tue Apr 7 22:25:59 2015 +0200 bump version number, preparation for next release commit 0a7f111ae4244579230b747df0ab8fc1488059b3 Author: Emmanuel Thomé Date: Tue Apr 7 22:23:07 2015 +0200 Get rid of global_pool. Now gf2x_mul is thread-safe as it should always have been. commit 38041182c203b4964d2049f38ed9bb9a1e6986a5 Author: Emmanuel Thomé Date: Tue Apr 7 22:16:43 2015 +0200 update copyright dates in files. for f in $(git ls-files '*.[ch]') ; do echo -ne "$f\t" ; git log --follow --pretty=format:%ad $f | perl -ne '/(20\d\d)/ && print "$1\n";' | uniq | while read x ; do echo $x ; if [ $x = 2009 ] ; then echo 2008 ; echo 2007 ; fi ; done | uniq | tac | xargs perl -e 'print join(", ", @ARGV), "\n";' ; done | while read f dates ; do if ! test -L $f ; then sed -e 's/^\( *Copyright\) *[0-9, ]*$/\1 '"$dates/" -i $f ; fi ; done commit c3bd47df55db18f7560b5fcde4239eda52fac058 Author: Emmanuel Thomé Date: Tue Apr 7 22:12:34 2015 +0200 reworded license text commit 8eb3e1be477b54c411398f0b067edcebbc37dd5d Author: Emmanuel Thomé Date: Tue Apr 7 21:55:14 2015 +0200 Fix dangling symlinks. commit 871f022485c890bba041d58e9639aa797db1c368 Author: Emmanuel Thomé Date: Fri Nov 28 14:29:11 2014 +0100 Accept NULL as a gf2x_mul_pool parameter in gf2x_mul_r commit 4a27f83bd7c4ed11bea0e195c5dbc7903621d121 Author: Emmanuel Thomé Date: Tue Nov 18 22:57:33 2014 +0100 Force -msse2 instead of believing it's unnecessary if gcc seems to grok. Under some circumstances, it seems that on i386 we get: ./gf2x/gf2x_mul3.h:69:19: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] commit 4e86413ea8c628f9df4cd96fa616fb8811d06dd5 Author: Emmanuel Thomé Date: Tue Nov 18 10:02:55 2014 +0100 get rid of ntl-5.4 related stuff commit 9955ed17070d4697556e4aa608dd14e6c388b7de Author: Emmanuel Thomé Date: Tue Nov 18 09:44:04 2014 +0100 test commit -- fixing a trivial error btw commit 5db480ed87b46e801165ad043858e8504755b56a Author: Emmanuel Thomé Date: Tue Nov 18 09:39:52 2014 +0100 fix and update gf2x changelog commit 5a489a13010d07db456f27116665c8f41bb1d9c7 Author: Emmanuel Thomé Date: Tue Nov 18 09:36:59 2014 +0100 test commit commit 9cbd0cf7d0a524de423d35cdbda2ba9ecc0c479e Author: thome Date: Fri Nov 15 15:20:12 2013 +0000 made enable-hardware-specific-code the default. Added haswell. Also recognized other hardware platforms as recognized by gmp's enhanced cpu detection system git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@167 e5c1114b-a573-4582-9dac-f72f410959ce commit 87619ef66c1e46c4ef2ee451baa6ecaeb1900352 Author: thome Date: Fri Nov 15 15:20:09 2013 +0000 Imported config{,fsf}.{sub,guess} from gmp git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@166 e5c1114b-a573-4582-9dac-f72f410959ce commit 295f8cf79ca2c66b96c7320311c18736681a79a2 Author: thome Date: Fri Nov 15 15:20:05 2013 +0000 Changed to GPLv3. Updated copyright lines and dates in source files. Used automated scripts for that. for f in $(git ls-files '*.c') ; do echo -ne "$f\t" ; git log --follow --pretty=format:%ad $f | perl -ne '/(20\d\d)/ && print "$1\n";' | uniq | tac | xargs perl -e 'print join(", ", @ARGV), "\n";' ; done | while read f dates ; do sed -e 's/^\( *Copyright\) *[0-9, ]*$/\1 '"$dates/" -i $f ; done git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@165 e5c1114b-a573-4582-9dac-f72f410959ce commit 5be24cfbc0d666f930543b426a289dfdfa997ff8 Author: thome Date: Fri Nov 15 15:19:57 2013 +0000 Changed tune-lowlevel slightly so that the library is always rebuilt afresh This cures the oddity of mul8k showing absurd timings because of source files dependencies not being properly caught by the building system while doing the tuning. The time it takes to build the library itself is relatively negligible compared to the time we invest in tuning, so it makes sense to proceed like this. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@164 e5c1114b-a573-4582-9dac-f72f410959ce commit ab6c4cbe8aa6325b473a596adb8e272320710163 Author: thome Date: Fri Nov 15 12:53:16 2013 +0000 Split generic/gf2x-thresholds.h in two variants The "generic" (in comparison to generic32 or generic64) lacked a proper WORDSIZE field, which caused some bugs. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@163 e5c1114b-a573-4582-9dac-f72f410959ce commit 2be797fc4d34472d14d0d6f2d06e5bc539fe4241 Author: thome Date: Tue Oct 22 17:53:26 2013 +0000 added --disable-hardware-specific-code git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@162 e5c1114b-a573-4582-9dac-f72f410959ce commit b39d7c28e625834e9f7c497657a4c677fc942bae Author: thome Date: Tue Oct 22 17:02:39 2013 +0000 avoid using tr -d -c 0-9, which is not portable enough... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@161 e5c1114b-a573-4582-9dac-f72f410959ce commit 63b37fd1bf5573a6af40c9c0d688c1fc114002c1 Author: thome Date: Mon Oct 14 11:53:48 2013 +0000 improve sse-2 check git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@160 e5c1114b-a573-4582-9dac-f72f410959ce commit f56d398a092c4be785e0aaf49a969843114db7d1 Author: thome Date: Tue Sep 24 09:02:20 2013 +0000 one more try. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@159 e5c1114b-a573-4582-9dac-f72f410959ce commit 19f1d86190ddc736a6a79b2086b8d2c6912c02d3 Author: thome Date: Tue Sep 24 07:35:49 2013 +0000 gcc-4.8 + outsmarts our sse-2 test with -O4. Fix this. This is in fact rather problematic, since constant folding is very likely to affect many of our instruction set tests in this way. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@158 e5c1114b-a573-4582-9dac-f72f410959ce commit 90d4d900497df3a4b5c5be4c1aa8f3f2177273fb Author: thome Date: Mon Sep 23 21:57:25 2013 +0000 Recent fix for out-of-source build did not work relative oos. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@157 e5c1114b-a573-4582-9dac-f72f410959ce commit 86233420942f8eabce9abb67a3c0881b303e7821 Author: thome Date: Mon Sep 23 21:57:23 2013 +0000 Better sse-2 test git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@156 e5c1114b-a573-4582-9dac-f72f410959ce commit 76bb8d6bbeecff318fb96180ce32e1beddd0cefe Author: thome Date: Mon Sep 23 21:57:22 2013 +0000 Made library aborts use abort(), not exit(). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@155 e5c1114b-a573-4582-9dac-f72f410959ce commit e16c1cce8d3b27436d56fdf0668beaf7a2cb49c4 Author: thome Date: Mon Sep 23 21:57:20 2013 +0000 Sanitize Makefile.am ; we were using a variable wrongly. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@154 e5c1114b-a573-4582-9dac-f72f410959ce commit 902ac7f4c3f7bb8d1fbb706c354c9b4bfca6984f Author: thome Date: Fri Jul 12 14:52:20 2013 +0000 Fix message git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@153 e5c1114b-a573-4582-9dac-f72f410959ce commit ff64742dacec236cdd1d1d145ddf20d210a0ed83 Author: zimmerma Date: Thu Jun 6 16:57:18 2013 +0000 fixed a few compiler warnings git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@152 e5c1114b-a573-4582-9dac-f72f410959ce commit ef7118ae91edc089cb5249d3c487a491e629a1f1 Author: zimmerma Date: Thu Jun 6 06:44:36 2013 +0000 feedback from Sage developers, see http://trac.sagemath.org/sage_trac/ticket/2114#comment:32 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@151 e5c1114b-a573-4582-9dac-f72f410959ce commit ca3be9b1269d00d8217e86ebc8611cfd8e47c38b Author: zimmerma Date: Wed Jun 5 12:30:42 2013 +0000 TOOM_TUNING_LIMIT must be at least 30 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@150 e5c1114b-a573-4582-9dac-f72f410959ce commit 738474490b109f73b339dd44bda8a30833f4e7ed Author: zimmerma Date: Wed Jun 5 12:06:27 2013 +0000 ensure GF2X_MUL_TOOM4_ALWAYS_THRESHOLD >= 30 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@149 e5c1114b-a573-4582-9dac-f72f410959ce commit aa233ac42345d7c6208f774c3081620b7e5edc19 Author: zimmerma Date: Fri May 24 13:47:19 2013 +0000 [NEWS] updated git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@148 e5c1114b-a573-4582-9dac-f72f410959ce commit b76de45b6a07d6badc52a1e80dfd2839f56ebef2 Author: zimmerma Date: Fri Apr 26 12:58:55 2013 +0000 replaced "unsigned int" by "unsigned long" everywhere git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@147 e5c1114b-a573-4582-9dac-f72f410959ce commit 8083ff09da8a8737cd73723e48e390adaf970af7 Author: gaudry Date: Wed Sep 26 07:01:51 2012 +0000 Update README: tuning subdir does not exist anymore git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@146 e5c1114b-a573-4582-9dac-f72f410959ce commit b770957661946869cf9e8cb6bf5b8aaeed08cc3f Author: thome Date: Wed Sep 5 14:16:14 2012 +0000 Changed tune-lowlevel.pl script to also include the timings for the non-winning functions. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@145 e5c1114b-a573-4582-9dac-f72f410959ce commit 5d5a3c6e9ecdb52d442657b733b4bf61a0fb16fb Author: thome Date: Wed Sep 5 14:16:13 2012 +0000 make mul2t2 more intel-intrinsics friendly. This happens to improve the performance a great deal with gcc-4.6, at least when using -march=native git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@144 e5c1114b-a573-4582-9dac-f72f410959ce commit e71d1c76803ea33c264dc29a4eceffebdb1aeb8c Author: thome Date: Thu May 31 20:59:49 2012 +0000 updated ChangeLog git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@143 e5c1114b-a573-4582-9dac-f72f410959ce commit 1c7cdcfe27f7b96bff5266d77df797fb189e3936 Author: thome Date: Thu May 31 20:59:48 2012 +0000 release gf2x-1.1 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@142 e5c1114b-a573-4582-9dac-f72f410959ce commit bde2f41fe14ce0fc67c5691b29a4e452571ca593 Author: thome Date: Thu Apr 5 07:52:35 2012 +0000 Port cado-nfs patch 00293ca08fc2813d5e9ba05f5b31820ecde64de5 This fixes a GNU make idiom git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@141 e5c1114b-a573-4582-9dac-f72f410959ce commit 7003f3e69cf0bcf2957e45b139403ad461a73291 Author: thome Date: Thu Apr 5 07:47:27 2012 +0000 changed mul9 default for x86_64_pclmul git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@140 e5c1114b-a573-4582-9dac-f72f410959ce commit 1d75feed6eecae189f01f3a65a67a3ad15b9e784 Author: thome Date: Thu Apr 5 07:47:26 2012 +0000 removed extraneous newline in generated files This caused tune-lowlevel to erroneously report tuning as yielding results different from the preselected choice. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@139 e5c1114b-a573-4582-9dac-f72f410959ce commit 80025d02b762e252f7e97e2c44debebdd2dec3ca Author: gaudry Date: Wed Apr 4 21:04:23 2012 +0000 Avoid potential error message during make tune-lowlevel. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@138 e5c1114b-a573-4582-9dac-f72f410959ce commit 18fe7bd9041d1411bcf96fe4c44e762adaf8ac69 Author: zimmerma Date: Wed Apr 4 10:55:50 2012 +0000 [README] improved description git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@137 e5c1114b-a573-4582-9dac-f72f410959ce commit b8083f3a0f2e1d9bfda999a95f4cc27761c7930e Author: zimmerma Date: Wed Apr 4 10:50:35 2012 +0000 [src/tune-lowlevel.pl] fixed typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@136 e5c1114b-a573-4582-9dac-f72f410959ce commit 6503c8e35267e16371ff13e35247275756ed5d90 Author: thome Date: Wed Apr 4 09:34:59 2012 +0000 Prepare for release gf2x-1.1 (bugfix) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@135 e5c1114b-a573-4582-9dac-f72f410959ce commit c2e7f8cad2b11de7ea1559464b11062d8bb72143 Author: thome Date: Wed Apr 4 09:34:58 2012 +0000 Added clarification about why GF2X_FUNC exists git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@134 e5c1114b-a573-4582-9dac-f72f410959ce commit 2b1a75bce01d90b1e9a2c62e641faeb1ddf871d0 Author: thome Date: Wed Apr 4 09:34:57 2012 +0000 Uniformize inner functions. All static inline functions in mul*.c should be named _mul. So for example: mul7k3_mul2c. And GF2X_FUNC() should be used for all of these. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@133 e5c1114b-a573-4582-9dac-f72f410959ce commit 38951ff7bb70d53e76c24f0f4efc19df8518b0df Author: thome Date: Wed Apr 4 09:34:56 2012 +0000 Fix for out-of-source build git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@132 e5c1114b-a573-4582-9dac-f72f410959ce commit 0616d15dfc070e1f98ef452a77c5008ccc628b98 Author: thome Date: Wed Apr 4 08:54:00 2012 +0000 Fixed naming of local functions in some files. This repairs a build failure if mul5k3 ever happens to be chosen. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@131 e5c1114b-a573-4582-9dac-f72f410959ce commit e1f18ef403ed2221f0dff9e928564777eb02388e Author: zimmerma Date: Wed Mar 21 17:02:37 2012 +0000 [config/acinclude.m4] check not only if we can compile sse2 code, but also if we can run it git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@130 e5c1114b-a573-4582-9dac-f72f410959ce commit e5ba3ff23b534710f9a98a039194e8263b3af9e3 Author: thome Date: Fri Mar 9 15:27:20 2012 +0000 autotools fix git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@129 e5c1114b-a573-4582-9dac-f72f410959ce commit 5504503188f19fd87dccdf1b47e6e11dc5da4178 Author: thome Date: Fri Mar 9 15:27:18 2012 +0000 new tuning git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@128 e5c1114b-a573-4582-9dac-f72f410959ce commit b9ccf1edad68d88d4211ac2a82140e0d40723fed Author: thome Date: Fri Mar 9 15:27:17 2012 +0000 trap bad arguments to gf2x_tfft_init git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@127 e5c1114b-a573-4582-9dac-f72f410959ce commit df98d65bdc979521ea25889133ce870660fb1d5c Author: thome Date: Fri Mar 9 15:27:15 2012 +0000 placate autoconf git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@126 e5c1114b-a573-4582-9dac-f72f410959ce commit a41d119fbece652f1c99d60278d47e632d056239 Author: Emmanuel Thomé Date: Thu Mar 8 15:20:12 2012 +0100 Let this live in its own repo commit 0b5fdf041de5b2936e0a2001dbf68b7c72cebfda Author: thome Date: Mon Nov 28 21:36:29 2011 +0000 typo in generate-test-list.pl Patch contributed by Nicolas Estibals git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@125 e5c1114b-a573-4582-9dac-f72f410959ce commit 1fc34ab296f862c18504bf8071d1c08f7df2bf88 Author: thome Date: Mon Nov 28 21:36:28 2011 +0000 new mul4 from eprint.iacr.org/2011/589. Patch contributed by Nicolas Estibals git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@124 e5c1114b-a573-4582-9dac-f72f410959ce commit 9ecdb8163546aa0a9b938f7722722a6e9073d091 Author: thome Date: Sat Dec 11 22:35:45 2010 +0000 support cross-compilation of gf2x git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@123 e5c1114b-a573-4582-9dac-f72f410959ce commit a194a7c60cd9e6df6f692e361c3d86a2d4939aa2 Author: thome Date: Sat Dec 11 21:08:43 2010 +0000 release gf2x-1.0 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@122 e5c1114b-a573-4582-9dac-f72f410959ce commit c2792b1cbabed8efae3043ce530305796ab03ebc Author: zimmerma Date: Mon Nov 29 08:54:14 2010 +0000 [toom2.c] Marco Bodrato agreed to release the code he was involved in under GPL v2+ M toom2.c git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@121 e5c1114b-a573-4582-9dac-f72f410959ce commit ac3b5df89ba97fcbbc45c5f67520e228258dbc4e Author: thome Date: Fri Nov 26 10:08:54 2010 +0000 Changed license text in gf2x source files. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@120 e5c1114b-a573-4582-9dac-f72f410959ce commit 5585fe9150beeabca20770cbca99cf2bc7bb124b Author: thome Date: Fri Nov 26 10:08:49 2010 +0000 move the utility routines for toom functions into toom2.c git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@119 e5c1114b-a573-4582-9dac-f72f410959ce commit a00676c43b6f6440d5c177876abec964ff5bb0ea Author: zimmerma Date: Fri Nov 26 08:47:06 2010 +0000 [toom2.c] new file with GPL code [toom.c] now only contains LGPL code git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@118 e5c1114b-a573-4582-9dac-f72f410959ce commit 23c9012758545e34120f0f38a0f5d9b75afab96e Author: thome Date: Mon Nov 22 12:38:29 2010 +0000 release gf2x-1.0 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@117 e5c1114b-a573-4582-9dac-f72f410959ce commit 0f5088d096589c995ff2abbc86c707a704081dc8 Author: thome Date: Mon Nov 22 12:30:22 2010 +0000 silenced last warnings. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@116 e5c1114b-a573-4582-9dac-f72f410959ce commit 0fb5e2e92726e68a2929e946d27d67bb3b017363 Author: thome Date: Mon Nov 22 12:30:21 2010 +0000 release gf2x-1.0 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@115 e5c1114b-a573-4582-9dac-f72f410959ce commit e9e02c58115094db71059381f5474ad93f621f37 Author: thome Date: Fri Nov 19 13:06:46 2010 +0000 shortened readme lines to avoid untidy linewrap. also changed the encoding to utf-8, it's more usual. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@114 e5c1114b-a573-4582-9dac-f72f410959ce commit 1cbb10f6ea91b56ad814ba66bf800dfcd6a75167 Author: zimmerma Date: Fri Nov 19 12:58:22 2010 +0000 licence -> license git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@113 e5c1114b-a573-4582-9dac-f72f410959ce commit 15a25f248192d5095182cc2bf0372b978f3c34bb Author: thome Date: Fri Nov 19 12:29:02 2010 +0000 added a few more calls to the tfft api, to accomodate cado needs (this change used to exist in the cado tree only, no reason not to have it here as well). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@112 e5c1114b-a573-4582-9dac-f72f410959ce commit b243d9ecf82bdfdd530b7c653f490488607ce817 Author: thome Date: Fri Nov 19 12:16:06 2010 +0000 release gf2x-1.0 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@111 e5c1114b-a573-4582-9dac-f72f410959ce commit ff8c2bfca3d6367d60ee1cb360026b875b4a7d9d Author: thome Date: Fri Nov 19 12:12:47 2010 +0000 various automake changes so that make dist does the right thing. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@110 e5c1114b-a573-4582-9dac-f72f410959ce commit 69a0554e60a77387e8c2d89285ceb411d75ad070 Author: thome Date: Fri Nov 19 10:35:46 2010 +0000 modified include path ; out-of-source builds had been broken at some point. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@109 e5c1114b-a573-4582-9dac-f72f410959ce commit 501bde004568b23be8aa98a15a281ca0605f2d07 Author: thome Date: Fri Nov 19 10:35:44 2010 +0000 updated version number in configure.ac to 1.0 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@108 e5c1114b-a573-4582-9dac-f72f410959ce commit cf186c14f5f462b948bc859408066ec1246deddc Author: thome Date: Tue Oct 5 15:26:13 2010 +0000 disabling mul3k3, as it's really a time bomb. As is, if it wins, it breaks the code. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@107 e5c1114b-a573-4582-9dac-f72f410959ce commit 90ee49a5cc3f4c83b140a7f124ce869ef97a7e32 Author: thome Date: Tue Oct 5 15:21:37 2010 +0000 configfsf* files are gone now git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@106 e5c1114b-a573-4582-9dac-f72f410959ce commit 9cf18eb814081927f59fe5521e0ec717acbe3adf Author: zimmerma Date: Tue Sep 21 09:46:11 2010 +0000 [mul9cl.c] optimized with Maple codegen[optimize] function (now mul9cl takes 199.5ns, whereas mul9k3 takes 197.6, we are close) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@105 e5c1114b-a573-4582-9dac-f72f410959ce commit 27ed99d7d616fd7d2b1c9bb5bb64ba878a2676c6 Author: thome Date: Tue Sep 21 09:08:07 2010 +0000 some pxors, yields an improvement. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@104 e5c1114b-a573-4582-9dac-f72f410959ce commit b3d0b6470edb88b854c29ce9d23c024d2dda9ca2 Author: gaudry Date: Mon Sep 20 17:37:33 2010 +0000 mul9 in 30 mul1. Terribly slow; showed probably write common subexpression optimization manually. Use maple's "optimize" functionality ? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@103 e5c1114b-a573-4582-9dac-f72f410959ce commit a7d72cbab209543401a123e0362ae358da3a772e Author: zimmerma Date: Mon Sep 20 15:42:29 2010 +0000 added references and comments git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@102 e5c1114b-a573-4582-9dac-f72f410959ce commit eff6fea6ca5caaf3b0aefb50aba3fe3da1ae50a6 Author: thome Date: Thu Sep 16 14:09:18 2010 +0000 just having fun with sse-2. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@101 e5c1114b-a573-4582-9dac-f72f410959ce commit 8f881ee5fc6d747dc49808a9f337697cd4ad10d4 Author: zimmerma Date: Thu Sep 16 12:44:06 2010 +0000 added mul7k3 and mul9k3 mul9k3 wins: mul9 -> mul9k.c [ 214.5 ns ] mul9 -> mul9k3.c [ 197.6 ns ] git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@100 e5c1114b-a573-4582-9dac-f72f410959ce commit b4388a44c6b9ec566f0b2977e58843e2698a1949 Author: zimmerma Date: Thu Sep 16 11:57:18 2010 +0000 added mul5k3 (14 muls vs 13 for mul5clk_c) ./tune_mul5clk_c : 74.0 ns ./tune_mul5k3 : 80.9 ns git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@99 e5c1114b-a573-4582-9dac-f72f410959ce commit 760ae82a4caaab60e842e9d2cbab8a2ce32d34d1 Author: zimmerma Date: Thu Sep 16 08:16:54 2010 +0000 [mul2cl.c,mul3k3.c] gross hack to avoid duplicating code from mul2cl.c, feel free to revert or to improve! The idea is to be able to easily replace mul2cl by say mul2cl2 in mul3k3. Ideally if each function has a carry and a borrow variant, we could directly call mul2carry and mul2borrow. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@98 e5c1114b-a573-4582-9dac-f72f410959ce commit 04f1645f73539ef13de5d0a472bc255f509acfc1 Author: zimmerma Date: Thu Sep 16 07:36:50 2010 +0000 [mul3k3.c] oups, I forgot to reuse the cached product! Current timings are promising: ./tune_mul3k : 63.3 ns ./tune_mul3k2 : 38.5 ns ./tune_mul3k3 : 37.2 ns ./tune_mul3cl : 34.7 ns Maybe somebody can improve mul3k3 to beat mul3cl. In the meantime I will work on a mul5 version. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@97 e5c1114b-a573-4582-9dac-f72f410959ce commit 36d5c3773f91fed9038f866599f49e3d84346871 Author: zimmerma Date: Thu Sep 16 07:32:09 2010 +0000 [mul3k3.c] new mul3 code using Montgomery's variant for the odd case git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@96 e5c1114b-a573-4582-9dac-f72f410959ce commit 57341db7b73c822c773d06a04c6730209bb42a7f Author: gaudry Date: Tue Sep 14 13:35:59 2010 +0000 configure tries pclmul support by default git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@95 e5c1114b-a573-4582-9dac-f72f410959ce commit 30d6dafec2cc095ce270c719a71b0767b35110f8 Author: gaudry Date: Tue Sep 14 13:22:33 2010 +0000 tuned on crumble git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@94 e5c1114b-a573-4582-9dac-f72f410959ce commit e1de68a9772c7c5f4ae9f85a7caef9704b3352ca Author: gaudry Date: Tue Sep 14 10:04:19 2010 +0000 how did it work before??? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@93 e5c1114b-a573-4582-9dac-f72f410959ce commit 6a4368294148f5c24d00f206be045b475ad45c19 Author: gaudry Date: Tue Sep 14 09:34:03 2010 +0000 tuning for westmere git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@92 e5c1114b-a573-4582-9dac-f72f410959ce commit 5320c53e3d01d6e26bdeb08b46ce19aea569daf0 Author: thome Date: Tue Sep 14 09:02:35 2010 +0000 tuning for core2 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@91 e5c1114b-a573-4582-9dac-f72f410959ce commit ee26c8507ce27baea1544b70757d982a80d5bb18 Author: thome Date: Tue Sep 14 07:29:14 2010 +0000 bugfix in tune-lowlevel script git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@90 e5c1114b-a573-4582-9dac-f72f410959ce commit 90748b5d3da7c0fa6edced7e821fd7ca4a758728 Author: thome Date: Tue Sep 14 07:21:54 2010 +0000 move mul3cl and mul7cl in the right place git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@89 e5c1114b-a573-4582-9dac-f72f410959ce commit e13fdc0f70e4a4bb0c5eb264241515f2dba46068 Author: gaudry Date: Mon Sep 13 18:39:55 2010 +0000 mul7 in 22, a la Mgy git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@88 e5c1114b-a573-4582-9dac-f72f410959ce commit b9f63939d3f0fe0fe9ccd1134eced25f461ba56d Author: gaudry Date: Mon Sep 13 13:44:35 2010 +0000 faster mul3 with pclmul, about 10% git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@87 e5c1114b-a573-4582-9dac-f72f410959ce commit 704dd217aeb6c5bfd9f5ed3b8ecab866df403aef Author: thome Date: Mon Sep 13 13:39:10 2010 +0000 renamed local functions, and protect them for re-tuning. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@86 e5c1114b-a573-4582-9dac-f72f410959ce commit 3b4abf7844eda1c371bc49f43bd183e9881dd9d3 Author: thome Date: Mon Sep 13 13:21:44 2010 +0000 25% improvement on mul4 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@85 e5c1114b-a573-4582-9dac-f72f410959ce commit 18bb34316cfa58d1e5180a8ed5edb35cf8712dc0 Author: thome Date: Mon Sep 13 13:08:48 2010 +0000 ahem. Better not have a function which does not support f(foo,foo,bar), right ? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@84 e5c1114b-a573-4582-9dac-f72f410959ce commit 432c53c68015a362c086c43b06bd987c11bae3a7 Author: thome Date: Mon Sep 13 12:49:31 2010 +0000 new mul5 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@83 e5c1114b-a573-4582-9dac-f72f410959ce commit a7e43c40eb8b2ca8b2141e7126abfd40b1173801 Author: thome Date: Mon Sep 13 12:19:58 2010 +0000 fixed a few copyright strings git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@82 e5c1114b-a573-4582-9dac-f72f410959ce commit 1e2d3b367b20bff33c8cd45d69e46b1be2ebac06 Author: thome Date: Mon Sep 13 12:19:56 2010 +0000 also remove src/.libs when cleaning up stuff git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@81 e5c1114b-a573-4582-9dac-f72f410959ce commit 6ff1578cb9c87b61fdaef9da9b4395e24c714b2e Author: thome Date: Mon Sep 13 11:55:34 2010 +0000 yet another code, for mul6 manipulates sse-2 data for as long as possible. also removed cruft in several files. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@80 e5c1114b-a573-4582-9dac-f72f410959ce commit c717411c5fb6329dc2f47940673e3fe0a41afa4b Author: thome Date: Mon Sep 13 11:41:55 2010 +0000 who says a file is missing ? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@79 e5c1114b-a573-4582-9dac-f72f410959ce commit fe6c40077513fb8d35b76adbf444933a1f36a3e0 Author: thome Date: Mon Sep 13 11:34:56 2010 +0000 avoid warning git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@78 e5c1114b-a573-4582-9dac-f72f410959ce commit 6268614ea648323b4be2571076514e60f40ebc5a Author: thome Date: Mon Sep 13 11:34:55 2010 +0000 test another variant of mul2cl git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@77 e5c1114b-a573-4582-9dac-f72f410959ce commit ad6d0d73e276f267e455714004baf3e59248a64a Author: gaudry Date: Mon Sep 13 11:01:51 2010 +0000 another mul5, with 13 mul1 (try again) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@76 e5c1114b-a573-4582-9dac-f72f410959ce commit 4f183118884dcffc00aa043cfa5a5eba6e204b84 Author: gaudry Date: Mon Sep 13 11:01:19 2010 +0000 another mul5, with 13 mul1 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@75 e5c1114b-a573-4582-9dac-f72f410959ce commit 2556afab32e58ac53934cf9a61d325dc32d7651c Author: thome Date: Mon Sep 13 10:44:01 2010 +0000 improved mul1cl by about 10% ;-) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@74 e5c1114b-a573-4582-9dac-f72f410959ce commit 28b1ef425590fedc9098220a4fb9b7fbe53a5c86 Author: thome Date: Mon Sep 13 10:07:05 2010 +0000 be more explicit. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@73 e5c1114b-a573-4582-9dac-f72f410959ce commit dfb567eb16b32cadd47aea7241d269fec8d203b4 Author: thome Date: Mon Sep 13 09:59:28 2010 +0000 two new codes. mul5k_d.c: downgrade mul6k_c to a mul5 (previously mul6k_c was faster than the best mul5...) mul2t2.c: use the load/store intrinsics for movdqu. On i7's, it's probably faster. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@72 e5c1114b-a573-4582-9dac-f72f410959ce commit b20d3618a554c93fa5fc024e14f86560367d0c0e Author: thome Date: Mon Sep 13 09:38:46 2010 +0000 removed the ``only one possibility'' test skipping git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@71 e5c1114b-a573-4582-9dac-f72f410959ce commit 541565a294d856f8661b9786837b0e5fa7b9a5bd Author: thome Date: Mon Sep 13 09:33:45 2010 +0000 faster mul9 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@70 e5c1114b-a573-4582-9dac-f72f410959ce commit b107c81f4bcb1d102c2993d2ccaca77383fcdf1a Author: thome Date: Mon Sep 13 09:22:22 2010 +0000 changed default CFLAGS git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@69 e5c1114b-a573-4582-9dac-f72f410959ce commit 522451101a11c582de2f296293e914cfd60e246e Author: thome Date: Mon Sep 13 09:11:46 2010 +0000 new mul6 variant, sligthly faster than mul6k_a git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@68 e5c1114b-a573-4582-9dac-f72f410959ce commit d98b7a2e5716399f6161b776a38725d274a13f82 Author: gaudry Date: Mon Sep 13 09:03:54 2010 +0000 _mm_loadu_si128 is our friend (removed asm). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@67 e5c1114b-a573-4582-9dac-f72f410959ce commit 1ae206b94e053be70e8a18c8b0a358ca90a5f380 Author: thome Date: Mon Sep 13 08:40:30 2010 +0000 see if it's any nicer. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@66 e5c1114b-a573-4582-9dac-f72f410959ce commit 8412737dba0e2d8946da18ae4e8e472fefde289a Author: thome Date: Sun Sep 12 13:02:49 2010 +0000 well, after all fixing the bug wasn't so hard. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@65 e5c1114b-a573-4582-9dac-f72f410959ce commit f0e315ed986e1fc1cc700e2df1d4d0ee8137cacd Author: thome Date: Sun Sep 12 12:57:48 2010 +0000 temporarily disable buggy asm version for mul2cl git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@64 e5c1114b-a573-4582-9dac-f72f410959ce commit 1b5a641525f5e2d9fc626ffde6e9c88063b4c45f Author: zimmerma Date: Sun Sep 12 12:49:17 2010 +0000 [src/tuneup_pre.c] improved error message git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@63 e5c1114b-a573-4582-9dac-f72f410959ce commit c253ff9effbe6260aa2e2f2ea79d335f16bf80ae Author: thome Date: Sat Sep 11 15:57:40 2010 +0000 include all mul5 to mul9 in the tuning mechanism. This kills the middle man. NOTE: Either the mul[56]k_a versions are buggy, or they're revealing a bug in the asm constraints used for mul2cl. Presently tune-lowlevel fails on westmere. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@62 e5c1114b-a573-4582-9dac-f72f410959ce commit 6b988f8ecc7db02ae7d735860ab7f89bd2c1df80 Author: thome Date: Sat Sep 11 15:24:25 2010 +0000 removed unneeded lines and dependencies in mul3k2.c git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@61 e5c1114b-a573-4582-9dac-f72f410959ce commit ef447456c528f6767daecf5d2e8670ccfa7bc47d Author: thome Date: Sat Sep 11 15:24:23 2010 +0000 fixed bug in tune-lowlevel git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@60 e5c1114b-a573-4582-9dac-f72f410959ce commit e0ea1400eae224d7e46acdf3882bdafff93affc3 Author: gaudry Date: Sat Sep 11 09:18:57 2010 +0000 broken link in previous commit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@59 e5c1114b-a573-4582-9dac-f72f410959ce commit 70c9d0cf241ecd8a2384ccf472645a244488c34f Author: gaudry Date: Sat Sep 11 05:45:46 2010 +0000 renamed mul3cl.c since it is generic code git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@58 e5c1114b-a573-4582-9dac-f72f410959ce commit 59eda05437d721811e294c5937f6dd621738e2ec Author: zimmerma Date: Fri Sep 10 19:16:56 2010 +0000 [config/acinclude.m4] fixed typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@57 e5c1114b-a573-4582-9dac-f72f410959ce commit 59004aada90f4b5469d72a4a30f842e19e86630d Author: gaudry Date: Fri Sep 10 15:26:27 2010 +0000 retuned westmere git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@56 e5c1114b-a573-4582-9dac-f72f410959ce commit 1960075db008fe95e6db17daf130b0bedd7a0de7 Author: gaudry Date: Fri Sep 10 14:07:29 2010 +0000 fixed make distclean git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@55 e5c1114b-a573-4582-9dac-f72f410959ce commit f0eaf3d6e273a456133351c92ab2942e656e9aca Author: zimmerma Date: Fri Sep 10 13:58:19 2010 +0000 [src/tuneup_pre.c] typo git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@54 e5c1114b-a573-4582-9dac-f72f410959ce commit 5d696b32287df85b150370126af368b38dcbec2b Author: gaudry Date: Fri Sep 10 13:38:37 2010 +0000 time spend in tune-lowlevel controlled by environment git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@53 e5c1114b-a573-4582-9dac-f72f410959ce commit cc223ca1ee76ef75b9fdfa333936b3283abed1e7 Author: gaudry Date: Fri Sep 10 13:06:32 2010 +0000 fixed buggy asm git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@52 e5c1114b-a573-4582-9dac-f72f410959ce commit 3f5cad80d913405ca15c5a050bb51eaee8d4c1b1 Author: thome Date: Fri Sep 10 11:55:33 2010 +0000 also remove already_tuned/tuned files on make distclean git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@51 e5c1114b-a573-4582-9dac-f72f410959ce commit 6f2ce8c4d0a70e62dfb8644811071b38d8577581 Author: gaudry Date: Fri Sep 10 11:49:33 2010 +0000 slight improvement in mul2cl git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@50 e5c1114b-a573-4582-9dac-f72f410959ce commit e6149b4b5e2b73b85a67e736c25ca780c473b9a7 Author: gaudry Date: Thu Sep 9 18:45:31 2010 +0000 tuned values for westmere (merguez) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@49 e5c1114b-a573-4582-9dac-f72f410959ce commit 0f9c50e3028aebc32b03c8c56d12535fa722515b Author: thome Date: Thu Sep 9 15:27:58 2010 +0000 new doc git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@48 e5c1114b-a573-4582-9dac-f72f410959ce commit bf47dbe5ef086d2c5b28a6af525b1f398fd7f897 Author: gaudry Date: Thu Sep 9 15:17:40 2010 +0000 activate mul3cl in tuning git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@47 e5c1114b-a573-4582-9dac-f72f410959ce commit b090fa9564081b141510f650ad3d4cb3805398b2 Author: thome Date: Thu Sep 9 14:36:32 2010 +0000 tuning/ -> src/ , and hardware/ -> already_tuned/ git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@44 e5c1114b-a573-4582-9dac-f72f410959ce commit 05ccde47241ae440fbf0ceb552c5e8f8061aa3d6 Author: thome Date: Thu Sep 9 14:36:28 2010 +0000 now files under tuning/ are real sources and they are going to move to src/ really soon. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@43 e5c1114b-a573-4582-9dac-f72f410959ce commit eca379dbb73f0d124b2fd8ea7e9722b2840946a1 Author: zimmerma Date: Thu Sep 9 13:25:05 2010 +0000 [check-addmul.c] fixed test according to semantics of gf2x_mul_1_n and gf2x_addmul_1_n git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@42 e5c1114b-a573-4582-9dac-f72f410959ce commit eccb9df19818759a545279a162a3e3bfed539875 Author: thome Date: Thu Sep 9 13:22:29 2010 +0000 plugged in Paul's test. reveals a core2 bug ? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@41 e5c1114b-a573-4582-9dac-f72f410959ce commit 96d373816b4e55bde8899bf94057d1677610d0ef Author: thome Date: Thu Sep 9 13:22:28 2010 +0000 included Changelog info for previous release (0.9.6) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@40 e5c1114b-a573-4582-9dac-f72f410959ce commit f496b24c6213834ea31995b5880427fa7c4c2e89 Author: gaudry Date: Thu Sep 9 09:32:13 2010 +0000 kara variant for mul3, not tested git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@39 e5c1114b-a573-4582-9dac-f72f410959ce commit d982c3e7d2ecd5788d99da255ce0dcee6e66dcb7 Author: gaudry Date: Thu Sep 9 09:09:45 2010 +0000 kara for mul2 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@38 e5c1114b-a573-4582-9dac-f72f410959ce commit e4f19fa98de9dc67b0245903351d795daea081cb Author: zimmerma Date: Thu Sep 9 08:45:09 2010 +0000 added test check-addmul.c git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@37 e5c1114b-a573-4582-9dac-f72f410959ce commit 580a212a672c513ab8286b3683bfc5881f83b75e Author: gaudry Date: Thu Sep 9 08:11:42 2010 +0000 fix bug in mul_1n git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@36 e5c1114b-a573-4582-9dac-f72f410959ce commit c9c7a70966928cb2f3927ab467f22b6e510da2a2 Author: zimmerma Date: Thu Sep 9 06:43:26 2010 +0000 [configure.ac] improved the output of configure --help git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@35 e5c1114b-a573-4582-9dac-f72f410959ce commit f3a0febeb1a2c66e79f909cc10b5f286c9366218 Author: gaudry Date: Wed Sep 8 22:19:37 2010 +0000 Some tuning for westmere with pclmulqdq. The code is still experimental: not really tested. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@34 e5c1114b-a573-4582-9dac-f72f410959ce commit 997f6f2d694f84aac05bb2774c546342c2c498bd Author: gaudry Date: Wed Sep 8 20:50:29 2010 +0000 Here comes pclmulqdq support. Not yet set by default (use --enable-pclmul). Not yet tuned. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@33 e5c1114b-a573-4582-9dac-f72f410959ce commit 77d6ecb9ad3a2948fcda922a6ab19a9aa7de5897 Author: thome Date: Thu Nov 26 10:00:45 2009 +0000 fft2 disappeared, using new interface git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@32 e5c1114b-a573-4582-9dac-f72f410959ce commit 187347e1c1d691b9d8727c78ed0caa93ffb4c6d0 Author: thome Date: Mon Nov 9 15:45:15 2009 +0000 oops git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@31 e5c1114b-a573-4582-9dac-f72f410959ce commit d48b8a62f11cd8f72bd2c5cd8f12de3f70371d69 Author: thome Date: Mon Nov 9 15:36:39 2009 +0000 prepare rev 0.9.6 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@30 e5c1114b-a573-4582-9dac-f72f410959ce commit 5ec267c425127efbac1b5412af23f5e9170c9421 Author: thome Date: Mon Nov 9 15:36:36 2009 +0000 changed license GPLv2+ --> LGPLv2+ except for apps/ which remains GPLv2+ git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@29 e5c1114b-a573-4582-9dac-f72f410959ce commit 3cbc68050ef3081877f0eb98e54380297555cdfc Author: thome Date: Mon Nov 9 15:36:34 2009 +0000 experimental interface for fft transform caching. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@28 e5c1114b-a573-4582-9dac-f72f410959ce commit 36160c3629c73271c562006c54f48ddfbb95ad92 Author: thome Date: Mon Nov 9 15:36:33 2009 +0000 for some reason the TODO file wasn't checked in. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@27 e5c1114b-a573-4582-9dac-f72f410959ce commit df19686c91f7023dde7c5de581d5187b72f2db70 Author: thome Date: Mon Nov 9 15:36:32 2009 +0000 s/echo/AC_MSG_NOTICE, for configure --silent git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@26 e5c1114b-a573-4582-9dac-f72f410959ce commit 7bd11dbec5c9dcb08f6804d0b6364a34ba167902 Author: thome Date: Mon Apr 27 19:30:20 2009 +0000 release gf2x-0.9.5 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@25 e5c1114b-a573-4582-9dac-f72f410959ce commit e0804f8ff8391615a2555bc45361eab9260cf1c4 Author: thome Date: Mon Apr 27 19:27:33 2009 +0000 bump version number. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@24 e5c1114b-a573-4582-9dac-f72f410959ce commit 99bf6c1dacd828d1c56b978ece4a27f09261aa78 Author: thome Date: Mon Apr 27 19:27:31 2009 +0000 Fixed extremely stupid bug in fft. That caused largeish multiplications to call toom above the max tuned fft size (!). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@23 e5c1114b-a573-4582-9dac-f72f410959ce commit 4d7baed74b4de3c31ba660f9f688ddbbf0a8e3ae Author: thome Date: Mon Apr 27 19:27:30 2009 +0000 minor changes, now using libtool 2.2. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@22 e5c1114b-a573-4582-9dac-f72f410959ce commit 4b74c6fd6c50caa044c513a104af52a3e125b025 Author: thome Date: Mon Apr 27 19:27:28 2009 +0000 release gf2x-0.9.4 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@21 e5c1114b-a573-4582-9dac-f72f410959ce commit dea67119bbcd4bec91e922b86fb64e68e5cd3e79 Author: thome Date: Mon Apr 27 19:27:27 2009 +0000 release gf2x-0.9.4 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@20 e5c1114b-a573-4582-9dac-f72f410959ce commit f70cc1d103050fe9d6f8c610eb28bf0d37551e1f Author: thome Date: Thu Apr 2 14:34:42 2009 +0000 increased release number to 0.9.4 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@19 e5c1114b-a573-4582-9dac-f72f410959ce commit 02f34e4c8113b691fbb79f9a0d7e706deb3a4e65 Author: thome Date: Thu Apr 2 14:33:41 2009 +0000 Fixed aggressive hwdir selection. The configure program was too happily selecting the hardware subdir based on the cpu name -- the ABI needs to be checked as well. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@18 e5c1114b-a573-4582-9dac-f72f410959ce commit 7f4ae8ba5f0a8a1121f11ff4fded77b26a1d7fd2 Author: thome Date: Thu Apr 2 14:33:40 2009 +0000 release gf2x-0.9.3 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@17 e5c1114b-a573-4582-9dac-f72f410959ce commit 8a33ac568af058cc2cce18c249d454640f8a7cac Author: thome Date: Tue Mar 31 11:14:58 2009 +0000 bumped version number git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@16 e5c1114b-a573-4582-9dac-f72f410959ce commit d895c83aee802a1eae3de2975194c68f0393e75f Author: thome Date: Tue Mar 31 10:11:58 2009 +0000 very smart -- forgotten another include... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@15 e5c1114b-a573-4582-9dac-f72f410959ce commit 4af36fffe93b0ab7dc3b4f45fe04a92f5f6c75b1 Author: thome Date: Tue Mar 31 10:11:57 2009 +0000 release gf2x-0.9.2 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@14 e5c1114b-a573-4582-9dac-f72f410959ce commit 6fdaa515220c0d03e928d704e313eaf320105231 Author: thome Date: Tue Mar 31 09:41:47 2009 +0000 fixed carriage return problem git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@13 e5c1114b-a573-4582-9dac-f72f410959ce commit 22a47cd7c0ad6ec805185e1dcc5835b5a501a8dd Author: thome Date: Tue Mar 31 09:41:46 2009 +0000 forgotten header git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@12 e5c1114b-a573-4582-9dac-f72f410959ce commit 89cc47ff2def5e82cd703e00d9335c7b31995373 Author: thome Date: Tue Mar 31 09:18:30 2009 +0000 doc fix, + headers cleanup Most notably, gf2x.h does not need gf2x-thresholds.h at all. It rather belongs to gf2x-impl.h Also moved the gcc version check relative to sse-2 to the files actually using sse-2. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@11 e5c1114b-a573-4582-9dac-f72f410959ce commit d086691ee97597a2e619b9eb7ccab9c5010a6597 Author: thome Date: Mon Mar 30 13:59:56 2009 +0000 checks were never failing... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@10 e5c1114b-a573-4582-9dac-f72f410959ce commit 1ddadf0f42c03f88ffdf81018e07dbab936f94e4 Author: thome Date: Mon Mar 30 13:36:22 2009 +0000 primitive ABI selection. lots of trivial changes to fix typography in copyright blobs... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@9 e5c1114b-a573-4582-9dac-f72f410959ce commit 726841a074c9e47cbb50864009256d3a2bbdeded Author: thome Date: Mon Mar 30 13:36:20 2009 +0000 doc fix. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@8 e5c1114b-a573-4582-9dac-f72f410959ce commit 66fb42655ebe3240696d45c3fffc5b2e1fd5bbc7 Author: thome Date: Mon Mar 30 13:36:18 2009 +0000 release gf2x-0.9.1 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@7 e5c1114b-a573-4582-9dac-f72f410959ce commit b12dfdca3d0d38ee7003b0d248137bb308c34191 Author: thome Date: Fri Mar 27 15:01:40 2009 +0000 preparation for 0.9.1 essentially some portability fixes: solaris: accomodate for contrived libc and stupid make windows: add $(EXEEXT) here and there mac os x: added extern statements to header files (a real bug) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@6 e5c1114b-a573-4582-9dac-f72f410959ce commit 405cc80c2678d45aeb94f65cfb18bacff43440f2 Author: thome Date: Fri Mar 27 00:49:34 2009 +0000 added a version.sh script, and corrected a pattern rule git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@5 e5c1114b-a573-4582-9dac-f72f410959ce commit ec080a6451930448cd5d84a111e3b5e4cfb73ec2 Author: thome Date: Fri Mar 27 00:10:20 2009 +0000 some autotools improvements. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@4 e5c1114b-a573-4582-9dac-f72f410959ce commit 56716df4f967b7cf1e295c3a858bd9c75b41206f Author: thome Date: Thu Mar 26 16:24:30 2009 +0000 woops -- bug in tune-lowlevel.pl git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@3 e5c1114b-a573-4582-9dac-f72f410959ce commit - 29b13131cfaf95132f6a0602d3e0575694359d11 Author: thome Date: Thu Mar 26 15:43:38 2009 +0000 first import into the svn tree, from my devel tree. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/gf2x@1 e5c1114b-a573-4582-9dac-f72f410959ce gf2x-1.2/INSTALL0000644000327606072450000003661413126452055010231 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. gf2x-1.2/NEWS0000644000327606072450000000220012725540356007665 00000000000000gf2x-1.2: - changed the type representing the polynomial sizes from "unsigned int" to "unsigned long". On a 64-bit machine, the maximal degree was 2^38-1, now it is 2^70-1. - gf2x_mul is now thread-safe. gf2x_mul_r is here in case auser wants to provide the storage pool and avoid having gf2x_mul do allocation for that. Note that currently, for FFT sizes, gf2x_mul does allocation anyway. - based (strongly) on the first above change and (mildly) on the second one, bump the shared library version number to 1.2.0 - added support for armv7l - made license more clear: only one file is gpl-licensed (toom-gpl.c), all the rest is lgpl-happy. gf2x-1.1: (bugfix release) - We're considering using this file for the first time. - Redone tuning. - Fixed a couple of build failures, and autoconf warnings. - Added a faster mul4 - Added some support for cross compilation (might also have been broken in the meantime, we don't have regression testing for this). The interface is unchanged, so the shared library version has not changed and still is 1.0.0 gf2x-1.2/README0000644000327606072450000002136413125150170010044 00000000000000Authors: Richard Brent, Pierrick Gaudry, Emmanuel Thomé, Paul Zimmermann. License (for the library) is either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License, either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License, either version 2.1 of the License, or (at your option) any later version. License for the apps/ subdir is the GNU General Public License, either version 2 of the License, or (at your option) any later version. This package contains routines for fast arithmetic in GF(2)[x] (multiplication, squaring, gcd). Dependencies ============ gf2x has no external dependencies. Some of the demos in the apps/ subdirectory require the gmp and NTL libraries. # The text below is somewhat outdated, and was originally written for # gf2x 1.0 at best, and was marginally updated since. It is still # "reasonably accurate", but must be followed with caution. ------------------------------------------------------------------------ Summary: ======== This README covers: - Package contents - Caution for gcc users - Instructions to install the package - Caution regarding installation - Hooking gf2x into ntl - Using the library Package contents: ================= It contains the following files: Miscellaneous doc files: README BUGS src/TODO src/README already_tuned/tuned/README AUTHORS ChangeLog Actual code: gf2x.h - main api gf2x-impl.h - internal api gf2x.c - top-level source for multiplication code gf2x-small.h - small-sized inlined multiplication routines toom.c - main file for Karatsuba and Toom-Cook multiplication toom-gpl.c - same, for GPL-tainted distribution fft.c - multiplication using Fast Fourier Transform Code adapted for the selected hardware already_tuned/ - pre-configured codes for selected architectures. already_tuned/*/gf2x-thresholds.h - pre-tuned thresholds files already_tuned/generic/gf2x-thresholds.h - placeholder thresholds already_tuned/generic64/ - code that works on any 64-bit platform already_tuned/generic32/ - code that works on any 32-bit platform already_tuned/x86_64/ - code that works on amd64 and intel core2 already_tuned/x86_sse2/ - code that works on x86 platforms supporting sse2 already_tuned/generic/ - code that works everywhere. Does _not_ include mul1 gf2x/ - place where symlinks to the files above go For testing: tests/check-mul.c - simple check program tests/do-check-mul.sh - shell script driving check-mul For tuning: lowlevel/mul*.c - various candidate code samples for basic routines src/tuneup.c - tuning program for basecase multiplication src/tunetoom.c - tuning program for Karatsuba/Toom-Cook multiplication src/tunefft.c - tuning program for FFT multiplication src/tune-lowlevel.pl src/gen_bb_mul_code.c - program to generate many alternatives for mul1 src/replace.h - helper code src/replace.c - helper code src/tuning-common.h - helper code src/tuning-common.c - helper code src/timing.h - helper code src/timing.c - helper code src/modify-thresholds.c - helper code Applications that use gf2x and NTL. These applications are covered by the GPL. apps/halfgcd.hpp - subquadratic gcd over GF(2)[x] apps/halfgcd.cpp - subquadratic gcd over GF(2)[x] apps/factor.cpp - finds smallest irreducible factor of trinomial over GF(2) apps/check*.sh - some tests using factor Caution for gcc users: ====================== gcc versions 4.3.0 and 4.3.1 have a bug which affects gf2x in a an unpredictable way. It is recommended to upgrade to at least 4.3.2, or configure with --disable-sse2 Instructions to install the package: ==================================== Cautious users follow steps 1 to 5 below. Urged users follow only 1 and 5. 1) Type: ./configure && make A special case: your hardware platform may support several ABIs (Application Binary Interfaces), corresponding to the type ``unsigned long'' being either 32-bit or 64-bit wide. The gf2x package accomodates for this under the assumption that ABI selection is covered by the selection of the appropriate compiler options. In order to compile for an ABI different from the default one, you have to pass additional parameters to the configure script: ./configure ABI= CFLAGS= && make For example on a Mac OS X computer with an Intel Core 2 processor using gcc, one may use: ./configure ABI=64 CFLAGS="-O2 -m64" && make (equivalently, one may also use ABI=64 CC='gcc -m64') Several other flags and arguments can be passed to ./configure (or set as environment variables) ; see ./configure --help 2) Highly recommended ; run make check To guard against possible bugs (either from gf2x or from the compiler). 3) Optional, but recommended: tune low-level routines, Karatsuba/Toom-Cook and FFT multiplication: make tune-lowlevel make tune-toom make tune-fft Note that there are some minor issues related to tuning on amd64 -- see BUGS. Tuning unfortunately takes a long while ; it is possible to decrease the time spent in tuning using additional parameters to the ``make tune-*'' commands, more specifically: make tune-toom TOOM_TUNING_LIMIT= make tune-fft FFT_TUNING_LIMIT= The default values for TOOM_TUNING_LIMIT and FFT_TUNING_LIMIT are 2048 and 8000000, respectively. TOOM_TUNING_LIMIT must be in the range [30,2048], while FFT_TUNING_LIMIT is only limited by the available memory. More detailed information on tuning can be found in the src/tunetoom.c and src/tunefft.c files, as well as src/README. All the tuning targets automatically rebuild the library in order to incorporate the tuned parameters. So an additional ``make'' is unnecessary (although innocuous, since the library should be up to date). 4) Highly recommended ; run make check to see whether everything went ok. 5) Either run: make install Or, if you prefer, keep your build tree, and have your programs include /gf2x.h, and link against the library /.libs/libgf2x.a (static) or /.libs/libgf2x.so (dynamic). Usual pitfalls apply regarding dynamic linking: if you are familiar with none of the "-Wl,-rpath," or "LD_LIBRARY_PATH" ways of making this work, your easiest bet is to stick to the static library approach. Notes for specific systems: =========================== - ABI selection is sometimes tricky. Be sure that you select the proper combination of ABI= and CFLAGS= parameters. You must also make sure that those correspond to the CFLAGS that were used by any other binary object you're linking gf2x with. That applies, in particular, to the GMP library if you intend to compile the files in apps/ - under AIX the following might be required to build the gf2x binaries: $ export OBJECT_MODE=64 Caution regarding installation: =============================== The header files installed in $includedir/gf2x/ are architecure-dependent. Hooking gf2x into ntl: ====================== ntl-5.5 offers the possibility to replace the multiplication of polynomials with the gf2x code. For this, you have to install the gf2x library in your favorite /path/to/gf2x/ (e.g. using gf2x's ./configure --prefix=/path/to/gf2x/ && make && make install). Then configure NTL with ./configure NTL_GF2X_LIB=on GF2X_PREFIX=/path/to/gf2x/ If for some reason gf2x was installed with custom directories, you may also consider the GF2X_INCDIR and GF2X_LIBDIR options ; some setups will typically require GF2X_LIBDIR=/path/to/gf2x/lib64, for example. Using the library: ================== gf2x exports one public header called gf2x.h . This header exports one function gf2x_mul, whose use is documented in gf2x.h . Unlike with versions of gf2x up to 1.1, the function gf2x_mul is now reentrant as of gf2x-1.2, and manages its own allocation needs. The companion function gf2x_mul_r is here if you want to control the allocation needs -- within a call to gf2x_mul_r, below the FFT threshold, no allocation is performed. Above, there is some, and this is an acknowledged bug. Some ``half-public'' headers are in the gf2x/ subdirectory. Some of these headers (gf2x/gf2x-thresholds.h and gf2x/gf2x_mul* are architecture-dependent). In order to use the inlined multiplication routines for small sizes, you may use gf2x/gf2x-small.h. By default, gf2x creates both static and dynamic libraries. gf2x-1.2/TODO0000644000327606072450000000070412725540356007665 00000000000000 - the top-level multiplication routine is fairly dumb, in that the algorithm for handling unbalanced multiplications is sub-optimal. One should consider implementing several unbalanced toom alternatives, and use them as building blocks for the unbalanced multiplications. - there is no addmul_2 routine, and when sse-2 registers are available, there could be a clear win in using it. (or addmul_4 on 32-bit machines). It's even quite easy. gf2x-1.2/gf2x.c0000644000327606072450000001602313124265052010177 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gf2x/gf2x-config.h" #include #include #include #include #include "gf2x.h" #include "gf2x/gf2x-impl.h" /* We _do_ need the inlines here. */ #include "gf2x/gf2x-small.h" void gf2x_mul_basecase(unsigned long * c, const unsigned long * a, long na, const unsigned long * b, long nb) { assert(c != a); assert(c != b); if (na == nb) { switch (na) { case 0: // This can occur in call from KarMul return; case 1: gf2x_mul1(c, a[0], b[0]); return; case 2: gf2x_mul2(c, a, b); return; case 3: gf2x_mul3(c, a, b); return; case 4: gf2x_mul4(c, a, b); return; case 5: gf2x_mul5(c, a, b); return; case 6: gf2x_mul6(c, a, b); return; case 7: gf2x_mul7(c, a, b); return; case 8: gf2x_mul8(c, a, b); return; case 9: gf2x_mul9(c, a, b); return; default: fprintf (stderr, "gf2x_mul_basecase: ran off end of switch\n" "na=nb=%ld ; decrease GF2X_MUL_KARA_THRESHOLD\n", na); abort(); } } else if (na < nb) { /* FIXME -- this does not seem efficient */ long i; /* No need to clear c[], it's filled up progressively */ c[nb] = gf2x_mul_1_n(c, b, nb, a[0]); for (i = 1; i < na; i++) { c[nb + i] = gf2x_addmul_1_n(c + i, c + i, b, nb, a[i]); } } else { gf2x_mul_basecase(c, b, nb, a, na); } } #ifdef GF2X_MUL_FFT_TABLE int64_t T_FFT_TAB[][2] = GF2X_MUL_FFT_TABLE; #endif /* This is the toplevel multiplication routine. It handles the temporary * storage if necessary. */ void gf2x_mul_pool_init(gf2x_mul_pool_t p) { memset(p, 0, sizeof(gf2x_mul_pool_t)); } void gf2x_mul_pool_clear(gf2x_mul_pool_t p) { free(p->stk); p->stk_size = 0; } void gf2x_mul(unsigned long * c, const unsigned long * a, unsigned long sa, const unsigned long * b, unsigned long sb) { gf2x_mul_r(c, a, sa, b, sb, NULL); } void gf2x_mul_r(unsigned long * c, const unsigned long * a, unsigned long sa, const unsigned long * b, unsigned long sb, gf2x_mul_pool_t pool) { unsigned long sc = sa + sb; /* As a starting guess, assume that c may alias a or b */ unsigned long * dst = c; if (sa > sb) { gf2x_mul_r(c, b, sb, a, sa, pool); return; } // now sa <= sb (note: sa and sb are interchanged in Toom3uMul etc) if (sa < GF2X_MUL_KARA_THRESHOLD) { /* This calls the hand-crafted code if sa == sb */ if (dst == a || dst == b) { dst = malloc(sc * sizeof(unsigned long)); } gf2x_mul_basecase(dst, a, sa, b, sb); goto end_of_gf2x_mul_r; } /* This ugly cpp block entirely disables the FFT if it has * not yet been tuned */ #ifdef GF2X_MUL_FFT_TABLE long ix, K, sab = sc / 2; long max_ix = sizeof(T_FFT_TAB)/sizeof(T_FFT_TAB[0]); for (ix = 0; ix + 1 < max_ix && T_FFT_TAB[ix + 1][0] <= sab; ix++); /* now T_FFT_TAB[ix][0] <= sab < T_FFT_TAB[ix+1][0] */ K = T_FFT_TAB[ix][1]; /* gf2x_mul_fft can handle unbalanced operands if not too * small: return the result in {dst, sa+sb} */ /* Note that dst aliasing a or b works with fft. */ if (sc >= GF2X_MUL_FFT_THRESHOLD && K && K != 1) { gf2x_mul_fft(dst, a, sa, b, sb, K); goto end_of_gf2x_mul_r; } #endif unsigned long sp, sp2; sp = gf2x_toomspace(sa); // Space for balanced TC routines if (sa != sb) { sp2 = gf2x_toomuspace(2 * sa); // Space for unbalanced TC routines if (sp < sp2) sp = sp2; /* worst-case required */ sp2 = 2 * sa + gf2x_toomspace(sa); // Space for unbalanced TC routines w/ lazy cut if (sp < sp2) sp = sp2; /* worst-case required */ } gf2x_mul_pool_t xxpool; struct gf2x_mul_pool_s * xpool; if (pool == NULL) { gf2x_mul_pool_init(xxpool); xpool = xxpool; } else { xpool = pool; } if (xpool->stk_size < sp) { xpool->stk = realloc(xpool->stk, sp * sizeof(unsigned long)); xpool->stk_size = sp; } /* None of the alternatives below supports c aliasing a or b */ if (dst == a || dst == b) dst = malloc(sc * sizeof(unsigned long)); if (sa == sb) { // Avoid copy in common case gf2x_mul_toom(dst, a, b, sa, xpool->stk); #if GPL_CODE_PRESENT } else if ((sa == (sb + 1) / 2) && gf2x_best_utoom(sb)) { // Another common case // due to GCD algorithm gf2x_mul_tc3u(dst, b, sb, a, xpool->stk); #endif /* GPL_CODE_PRESENT */ } else { unsigned long *v = xpool->stk + gf2x_toomspace(sa); unsigned long i, j; memset(dst, 0, sc * sizeof(unsigned long)); unsigned long * ptr = dst; for (;;) { if (sa == 0) break; if (sa == 1) { ptr[sb] ^= gf2x_addmul_1_n(ptr, ptr, b, sb, a[0]); break; } // finally: the general case for (i = 0; i + sa <= sb; i += sa) { // Generic (balanced) Toom-Cook mult. gf2x_mul_toom(v, a, b + i, sa, xpool->stk); for (j = 0; j < 2 * sa; j++) ptr[i + j] ^= v[j]; } { const unsigned long *t; unsigned long st; /* Swap a and b, and go for the next spin */ t = a; st = sa; a = b + i; sa = sb - i; b = t; sb = st; } ptr = ptr + i; } } if (pool == NULL) { gf2x_mul_pool_clear(xpool); } end_of_gf2x_mul_r: if (dst && dst != c) { /* Then we have allocated a temp buffer */ memcpy(c, dst, sc * sizeof(unsigned long)); free(dst); } } /* vim: set sw=4 sta et: */ gf2x-1.2/toom.c0000644000327606072450000002035613124153463010315 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* General Toom_Cook multiplication, calls KarMul, Toom3Mul, Toom3WMul or Toom4Mul depending on which is expected to be the fastest. */ #include #include #include #include #include "gf2x.h" #include "gf2x/gf2x-impl.h" /* We need gf2x_addmul_1_n */ #include "gf2x/gf2x-small.h" #if GPL_CODE_PRESENT short best_tab[GF2X_TOOM_TUNING_LIMIT] = GF2X_BEST_TOOM_TABLE; short best_utab[GF2X_TOOM_TUNING_LIMIT] = GF2X_BEST_UTOOM_TABLE; #endif /* GPL_CODE_PRESENT */ #if GF2X_MUL_TOOM4_ALWAYS_THRESHOLD < 30 #error "GF2X_MUL_TOOM4_ALWAYS_THRESHOLD must be >= 30" #endif /* Returns 0 for KarMul, 1 for Toom3Mul, 2 for Toom3WMul, 3 for Toom4Mul depending on which is predicted to be fastest for the given degree n. RPB, 20070511 */ short gf2x_best_toom(unsigned long n GF2X_MAYBE_UNUSED) { // GF2X_BEST_TOOM_TABLE should be generated by the tuning program tunetoom. // // The n-th entry in the list gives the code for the fastest algorithm for // input size n. For example: // #define GF2X_BEST_TOOM_TABLE {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,1,2,2,1,2} // would be reasonable if Toom3Mul was fastest for n = 18, 21, 24. #if GPL_CODE_PRESENT if (n < GF2X_MUL_KARA_THRESHOLD) return GF2X_SELECT_KARA; if (n > GF2X_TOOM_TUNING_LIMIT) return GF2X_SELECT_TC4; // Toom4Mul /* now n <= GF2X_TOOM_TUNING_LIMIT */ return best_tab[n - 1]; // Return table entry #else /* GPL_CODE_PRESENT */ return GF2X_SELECT_KARA; #endif /* GPL_CODE_PRESENT */ } short gf2x_best_utoom(unsigned long n GF2X_MAYBE_UNUSED) { // GF2X_BEST_UTOOM_TABLE should be generated by the tuning program tuneutoom. // // The n-th entry in the list gives the code for the fastest algorithm for // input size n. 0 means the obvious splitting algorithm and 1 means // Toom3uMul. #if GPL_CODE_PRESENT if (n < GF2X_MUL_TOOMU_THRESHOLD) return GF2X_SELECT_UNB_DFLT; // Default if (n >= GF2X_MUL_TOOMU_ALWAYS_THRESHOLD) return GF2X_SELECT_UNB_TC3U; /* This would be a tuning bug */ ASSERT (n <= GF2X_TOOM_TUNING_LIMIT); return best_utab[n - 1]; // Return table entry #else /* GPL_CODE_PRESENT */ return GF2X_SELECT_UNB_DFLT; #endif /* GPL_CODE_PRESENT */ } /* Returns the worst-case space (in words) needed by the Toom-Cook routines KarMul, Toom3Mul, Toom3WMul, Toom4Mul. Copyright 2007 Richard P. Brent. */ /* The memory sp(n) necessary for Toom3WMul satisfies sp(n) <== (n lt 8) ? 19 : 8*(floor(n/3) + 3) + sp(floor(n/3) + 2), sp(7) <= 21. It is assumed that KarMul is called for n < 8 <= GF2X_MUL_TOOMW_THRESHOLD and requires space KarMulMem(n) <= 3*ceil(n/2) + KarMulMem(ceil(n/2)), KarMulMem(7) <= 21. The memory for Toom3Mul and Toom4Mul is no larger than that for Toom3WMul. We use here the simpler bound 5*n+29 (cf toom-gpl.c). Note: KarMulMem(7) is now 0, but would increase if GF2X_MUL_KARA_THRESHOLD were reduced. We have not changed gf2x_ToomSpace as a small overestimate in space is not harmful. */ #if (GF2X_MUL_KARA_THRESHOLD < 5) #error "GF2X_MUL_KARA_THRESHOLD assumed to be at least 5" #endif #if (GF2X_MUL_TOOMW_THRESHOLD < 8) #error "GF2X_MUL_TOOMW_THRESHOLD assumed to be at least 8" #endif long gf2x_toomspace(long n) { long low = (GF2X_MUL_KARA_THRESHOLD < GF2X_MUL_TOOMW_THRESHOLD) ? GF2X_MUL_KARA_THRESHOLD : GF2X_MUL_TOOMW_THRESHOLD; if (n < low) return 0; #ifdef HAVE_KARAX return 5 * n + 30; /* allocate an extra word for 128-bit alignement */ #else return 5 * n + 29; #endif } /* Returns upper bound on space required by Toom3uMul (c, a, sa, b, stk): 2*sa + 32 + gf2x_toomspace(sa/4 + 4) */ long gf2x_toomuspace(long sa) { if (sa < GF2X_MUL_TOOMU_THRESHOLD) return 0; else return 2 * sa + 32 + gf2x_toomspace(sa / 4 + 4); } /* stk should point to a block of sufficient memory for any of these routines (gf2x_toomspace(n) <= 5*n+17 words is enough). Output c must not overlap inputs a, b. The output c is a*b (where a, b and c are in GF(2)[x]). RPB, 20070510 */ void gf2x_mul_toom(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk) { while (n && a[n - 1] == 0 && b[n - 1] == 0) { c[2 * n - 1] = 0; c[2 * n - 2] = 0; n--; } assert(c != a); assert(c != b); #if GPL_CODE_PRESENT switch (gf2x_best_toom(n)) { case GF2X_SELECT_KARA: gf2x_mul_kara(c, a, b, n, stk); break; #ifdef HAVE_KARAX /* gf2x_mul_karax is LGPL, but for simplicity we put it only here */ case GF2X_SELECT_KARAX: gf2x_mul_karax(c, a, b, n, stk); break; /* gf2x_mul_tc3x is copied from gf2x_mul_tc3, thus GPL only */ case GF2X_SELECT_TC3X: gf2x_mul_tc3x(c, a, b, n, stk); break; #endif /* TC3, TC3W, TC4 are GPL'ed code */ case GF2X_SELECT_TC3: gf2x_mul_tc3(c, a, b, n, stk); break; case GF2X_SELECT_TC3W: gf2x_mul_tc3w(c, a, b, n, stk); break; case GF2X_SELECT_TC4: gf2x_mul_tc4(c, a, b, n, stk); break; default: { fprintf (stderr, "Unhandled case %d in gf2x_mul_toom\n", gf2x_best_toom(n)); abort(); } } #else /* GPL_CODE_PRESENT */ gf2x_mul_kara(c, a, b, n, stk); #endif /* GPL_CODE_PRESENT */ } /* Version of Karatsuba multiplication with minimal temporary storage sp(n) = 3*ceil(n/2) + sp(ceil(n/2)) = 3n + O(log n) words. RPB, 20070522 */ void gf2x_mul_kara(unsigned long * c, const unsigned long * a, const unsigned long * b, long n, unsigned long * stk) { unsigned long t; unsigned long *aa, *bb, *cc; long j, d, n2; assert(c != a); assert(c != b); #if 0 if (n <= 0) { /* if turned on this test shows that calls with n == 0 */ /* do occur (e.g from tunefft, FFT(19683)), but don't */ /* seem to be harmful if mul_basecase_n just returns. */ printf("\nWarning: n %ld in call to KarMul\n", n); fflush(stdout); } #endif if (n < GF2X_MUL_KARA_THRESHOLD) { gf2x_mul_basecase(c, a, n, b, n); return; } n2 = (n + 1) / 2; /* ceil(n/2) */ d = n & 1; /* 2*n2 - n = 1 if n odd, 0 if n even */ aa = stk; /* Size n2 */ bb = aa + n2; /* Size n2 */ cc = bb + n2; /* Size n2 */ stk = cc + n2; /* sp(n) = 3*ceil(n/2)) + sp(ceil(n/2)) */ const unsigned long *a1 = a + n2; /* a[n2] */ const unsigned long *b1 = b + n2; /* b[n2] */ unsigned long *c1 = c + n2; /* c[n2] */ unsigned long *c2 = c1 + n2; /* c[2*n2] */ unsigned long *c3 = c2 + n2; /* c[3*n2] */ gf2x_mul_kara(c, a, b, n2, stk); /* Low */ gf2x_mul_kara(c2, a1, b1, n2 - d, stk); /* High */ for (j = 0; j < n2 - d; j++) { aa[j] = a[j] ^ a1[j]; bb[j] = b[j] ^ b1[j]; cc[j] = c1[j] ^ c2[j]; } for (; j < n2; j++) { /* Only when n odd */ aa[j] = a[j]; bb[j] = b[j]; cc[j] = c1[j] ^ c2[j]; } gf2x_mul_kara(c1, aa, bb, n2, stk); /* Middle */ for (j = 0; j < n2 - 2 * d; j++) { t = cc[j]; c1[j] ^= t ^ c[j]; c2[j] ^= t ^ c3[j]; } for (; j < n2; j++) { /* Only when n odd */ c1[j] ^= cc[j] ^ c[j]; c2[j] ^= cc[j]; } } gf2x-1.2/toom128.c0000644000327606072450000001542112725540357010555 00000000000000/* This file is part of the gf2x library. Copyright 2007-2016 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Variants of Toom-Cook using SSE2 128-bit XOR, copied from toom.c. Those routines assume that "unsigned long" is a 64-bit type. */ #include #include /* for memcpy() */ #include "gf2x.h" #include "gf2x/gf2x-impl.h" #ifdef HAVE_KARAX #include /* Let spx(n) be the space requirement (in number of 128-bit words) for stk in gf2x_mul_karax_internal(n), and sp(n) the space requirement (in number of 64-bit words) for stk in the gf2x_mul_kara() routine: (1) if 2*n < GF2X_MUL_KARA_THRESHOLD then spx(n) <= ceil(sp(2*n)/2) (2) otherwise spx(n) <= 3*ceil(n/2) + spx(ceil(n/2)). The parameter 'odd' can be 0 or 1: * if odd=0, then a and b have 2n words of 64 bits, the result c has 4n words of 64 bits, i.e., 2n words of 128 bits * if odd=1, then a and b have 2n-1 words of 64 bits, the result c has 4n-2 words of 64 bits, i.e., 2n-1 words of 128 bits Assumes stk is 128-bit aligned. FIXME: write a 256-bit variant using AVX2: VPXOR: __m256i _mm256_xor_si256 ( __m256i a, __m256i b) */ #define PXOR(a,b) _mm_xor_si128(a,b) static void gf2x_mul_karax_internal (__m128i *c, const __m128i *a, const __m128i *b, long n, __m128i * stk, int odd) { __m128i *aa, *bb, *cc; long j, d, n2; /* since this routine is usually faster than gf2x_mul_kara(), it calls itself recursively instead of calling gf2x_mul_toom(), thus we have to stop the recursion by calling gf2x_mul_basecase() */ if (2 * n - odd < GF2X_MUL_KARA_THRESHOLD) { gf2x_mul_basecase ((unsigned long*) c, (unsigned long*) a, 2 * n - odd, (unsigned long*) b, 2 * n - odd); return; } n2 = (n + 1) / 2; /* ceil(n/2) */ d = n & 1; /* 2*n2 - n = 1 if n odd, 0 if n even */ aa = stk; /* Size n2 */ bb = aa + n2; /* Size n2 */ cc = bb + n2; /* Size n2 */ stk = cc + n2; /* sp(n) = 3*ceil(n/2)) + sp(ceil(n/2)) */ const __m128i *a1 = a + n2; /* a[n2] */ const __m128i *b1 = b + n2; /* b[n2] */ __m128i *c1 = c + n2; /* c[n2] */ __m128i *c2 = c1 + n2; /* c[2*n2] */ __m128i *c3 = c2 + n2; /* c[3*n2] */ gf2x_mul_karax_internal (c, a, b, n2, stk, 0); /* Low */ /* now {c, 2*n2} contains A0 * B0 */ gf2x_mul_karax_internal (c2, a1, b1, n2 - d, stk, odd); /* High */ /* {c2, 2*(n2-d)} contains A1 * B1 */ /* {c2, 2*(n2-d)} contains 2*(n2-d)-odd/2 words of 128 bits, i.e., 4*(n2-d)-odd words of 64 bits */ /* now compute in {aa, n2} the sum A0+A1, and in {bb, n2} the sum B0+B1, and in parallel in {cc, n2} the n2 low 12-bit words of A0*B0 + A1*B1 */ /* {a, n2} has n2 words of 128 bits, i.e., 2*n2 words of 64 bits {a1, n2-d} has n2-d-odd/2 words of 128 bits, i.e., 2*(n2-d)-odd words of 64 bits */ for (j = 0; j < n2 - d - odd; j++) { // aa[j] = PXOR (a[j], a1[j]); // aa is 128-bit aligned, thus we can use aa[j] = ... aa[j] = PXOR (_mm_loadu_si128 (a + j), _mm_loadu_si128 (a1 + j)); // bb[j] = PXOR (b[j], b1[j]); bb[j] = PXOR (_mm_loadu_si128 (b + j), _mm_loadu_si128 (b1 + j)); // cc[j] = PXOR (c1[j], c2[j]); cc[j] = PXOR (_mm_loadu_si128 (c1 + j), _mm_loadu_si128 (c2 + j)); } for (; j < n2 - d; j++) /* one loop only, and only when odd=1 */ { /* zero the upper 64 bits of a1[j] and b1[j] */ // aa[j] = PXOR (a[j], LOW(a1[j])); aa[j] = PXOR (_mm_loadu_si128 (a + j), _mm_loadl_epi64 (a1 + j)); // bb[j] = PXOR (b[j], LOW(b1[j])); bb[j] = PXOR (_mm_loadu_si128 (b + j), _mm_loadl_epi64 (b1 + j)); // cc[j] = PXOR (c1[j], c2[j]); cc[j] = PXOR (_mm_loadu_si128 (c1 + j), _mm_loadu_si128 (c2 + j)); } for (; j < n2; j++) { /* Only when n odd */ // aa[j] = a[j]; aa[j] = _mm_loadu_si128 (a + j); // bb[j] = b[j]; bb[j] = _mm_loadu_si128 (b + j); // cc[j] = PXOR (c1[j], c2[j]); cc[j] = PXOR (_mm_loadu_si128 (c1 + j), _mm_loadu_si128 (c2 + j)); } /* now we have: {c, n2} = low(A0*B0) {c3, n2-2*d} = high(A1*B1) {cc, n2} = high(A0*B0) + low(A1*B1) */ gf2x_mul_karax_internal (c1, aa, bb, n2, stk, 0); /* Middle */ /* now we have: {c, n2} = low(A0*B0) {c1, 2*n2} = (A0+B0)*(A1+B1) {c3, n2-2*d} = high(A1*B1) {cc, n2} = high(A0*B0) + low(A1*B1) It remains to add {cc, n2} + {c, n2} to {c1, n2}, and {cc, n2} + {c3, n2-2*d-odd} to {c2, n2} */ for (j = 0; j < n2 - 2 * d - odd; j++) { // c1[j] = PXOR (c1[j], PXOR (cc[j], c[j])); _mm_storeu_si128 (c1 + j, PXOR (_mm_loadu_si128 (c1 + j), PXOR (cc[j], _mm_loadu_si128 (c + j)))); // c2[j] = PXOR (c2[j], PXOR (cc[j], c3[j])); _mm_storeu_si128 (c2 + j, PXOR (_mm_loadu_si128 (c2 + j), PXOR (cc[j], _mm_loadu_si128 (c3 + j)))); } for (; j < n2; j++) { /* Only when n odd */ // c1[j] = PXOR (c1[j], PXOR (cc[j], c[j])); _mm_storeu_si128 (c1 + j, PXOR (_mm_loadu_si128 (c1 + j), PXOR (cc[j], _mm_loadu_si128 (c + j)))); // c2[j] = PXOR (c2[j], cc[j]); _mm_storeu_si128 (c2 + j, PXOR (_mm_loadu_si128 (c2 + j), cc[j])); } } void gf2x_mul_karax (unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk) { if (((uintptr_t) stk) % 16) stk ++; /* ensure stk is 128-bit aligned */ gf2x_mul_karax_internal ((__m128i*) c, (__m128i*) a, (__m128i*) b, (n + 1) >> 1, (__m128i*) stk, n & 1); } #endif /* HAVE_KARAX */ gf2x-1.2/toom-gpl.c0000644000327606072450000016736513124135743011112 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* General Toom_Cook multiplication, calls KarMul, Toom3Mul, Toom3WMul or Toom4Mul depending on which is expected to be the fastest. */ #include #include /* from https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Functions.html */ #if HAVE_ALLOCA_H # include #elif defined __GNUC__ # define alloca __builtin_alloca #elif defined _AIX # define alloca __alloca #elif defined _MSC_VER # include # define alloca _alloca #else # include void *alloca (size_t); #endif #include "gf2x.h" #include "gf2x/gf2x-impl.h" /* We need gf2x_addmul_1_n */ #include "gf2x/gf2x-small.h" const char * gf2x_toom_gpl_status="GPL-licensed GF2X"; /* the following routines come from the irred-ntl package from Paul Zimmermann, (http://webloria.loria.fr/~zimmerma/irred/), who contributes them under LGPL for gf2x */ /* c <- a + b */ static void Add (unsigned long *c, const unsigned long *a, const unsigned long *b, long n) { long i; for (i = 0; i < n; i++) c[i] = a[i] ^ b[i]; } /* {d,n} <- {a,n} + {b,n} + {c,k} with k <= n */ static void Add2 (unsigned long *d, const unsigned long *a, const unsigned long *b, long n, const unsigned long *c, long k) { long i; for (i = 0; i < k; i++) d[i] = a[i] ^ b[i] ^ c[i]; for (; i < n; i++) d[i] = a[i] ^ b[i]; } /* c <- c + a + b */ static void Add3(unsigned long *c, const unsigned long *a, const unsigned long *b, long n) { long i; for (i = 0; i < n; i++) c[i] ^= a[i] ^ b[i]; } /* c <- a + x * b, return carry out. Warning: c might overlap with b. */ static unsigned long AddLsh1(unsigned long *c, const unsigned long *a, const unsigned long *b, long n) { unsigned long cy = 0UL, t; long i; for (i = 0; i < n; i++) { t = a[i] ^ ((b[i] << 1) | cy); cy = b[i] >> (GF2X_WORDSIZE - 1); c[i] = t; } return cy; } /* c <- x * {a, n} + x^2 * {b, r} with r <= n, return carry out. c should not overlap with a nor b. */ static unsigned long AddLsh12a (unsigned long *c, const unsigned long *a, long n, const unsigned long *b, long r) { unsigned long cy = 0UL; long i; for (i = 0; i < r; i++) { c[i] = (a[i] << 1) ^ (b[i] << 2) ^ cy; cy = a[i] >> (GF2X_WORDSIZE - 1) ^ b[i] >> (GF2X_WORDSIZE - 2); } for (; i < n; i++) { c[i] = (a[i] << 1) ^ cy; cy = a[i] >> (GF2X_WORDSIZE - 1); } return cy; } /* c <- a + cy, return carry out (0 for n > 0, cy for n=0) */ static unsigned long Add1(unsigned long *c, const unsigned long *a, long n, unsigned long cy) { if (n) { long i; c[0] = a[0] ^ cy; for (i = 1; i < n; i++) c[i] = a[i]; return 0; } else return cy; } /* let c = q*(1+x^2) + X^n*r with X = x^GF2X_WORDSIZE and deg(r) < 2 then c <- q, returns r. (Algorithm from Michel Quercia.) */ static unsigned long DivOnePlusX2(unsigned long * c, long n) { unsigned long t = 0; long i; #if (GF2X_WORDSIZE == 64) /* mask[t] = t * (1 + x^2 + x^4 + ... + x^(GF2X_WORDSIZE-2)) */ unsigned long mask[4] = {0UL, 0x5555555555555555UL, 0xAAAAAAAAAAAAAAAAUL, 0xFFFFFFFFFFFFFFFFUL}; #elif (GF2X_WORDSIZE == 32) unsigned long mask[4] = {0UL, 0x55555555UL, 0xAAAAAAAAUL, 0xFFFFFFFFUL}; #else #error "GF2X_WORDSIZE should be 32 or 64" #endif for (i = 0; i < n; i++) { /* invariant: t < 4 */ #ifndef GF2X_HAVE_PCLMUL_SUPPORT unsigned long u; /* u <- c[i] * (1 + x^2 + x^4 + ... + x^(GF2X_WORDSIZE-2)) */ u = c[i] ^ (c[i] << 2); u ^= u << 4; u ^= u << 8; u ^= u << 16; #if (GF2X_WORDSIZE == 64) u ^= u << 32; #endif c[i] = u ^ mask[t]; #else /* use pclmul */ unsigned long cc[2]; gf2x_mul1 (cc, c[i], 0x5555555555555555UL); c[i] = cc[0] ^ mask[t]; #endif t = c[i] >> (GF2X_WORDSIZE - 2); } return t; } /******************************************************************** * Below this line, experimental code * (C) 2007 Marco Bodrato * This code is released under the GPL 2.0 license, or any later version. * Modified by Paul Zimmermann, April 2007. * * Reference: http://bodrato.it/papers/#WAIFI2007 * * "Towards Optimal Toom-Cook Multiplication for Univariate and * Multivariate Polynomials in Characteristic 2 and 0." by Marco * BODRATO; in C.Carlet and B.Sunar, editors, "WAIFI'07 proceedings", * LNCS 4547, pp. 119-136. Springer, Madrid, Spain, June 21-22, 2007. */ #if (GF2X_MUL_TOOM_THRESHOLD < 17) #error "GF2X_MUL_TOOM_THRESHOLD should be at least 17" #endif /* c <- ( c + b )/x, return carry */ static unsigned long Rsh1Add(unsigned long *c, const unsigned long *b, long n) { unsigned long cy = 0, t; long i; for (i = n - 1; i >= 0; i--) { t = c[i] ^ b[i]; cy <<= GF2X_WORDSIZE - 1; c[i] = (t >> 1) | cy; cy = t; } return cy; } /* c <- ( c + b )/x + a, return carry */ static unsigned long Rsh1Adda (unsigned long *c, const unsigned long *b, const unsigned long *a, long n) { unsigned long cy = 0, t; long i; for (i = n - 1; i >= 0; i--) { t = c[i] ^ b[i]; cy <<= GF2X_WORDSIZE - 1; c[i] = (t >> 1) ^ cy ^ a[i]; cy = t; } return cy; } /* c <- c + (1+x^3) * b, return carry out */ static unsigned long AddLsh13(unsigned long *c, const unsigned long *b, long n) { unsigned long cy = 0UL, t; long i; for (i = 0; i < n; i++) { t = b[i]; c[i] ^= t ^ (t << 3) ^ cy; cy = t >> (GF2X_WORDSIZE - 3); } return cy; } /* c <- c + a + b + d */ static void Add4(unsigned long *c, const unsigned long *a, const unsigned long *b, const unsigned long *d, long n) { long i; for (i = 0; i < n; i++) c[i] ^= a[i] ^ b[i] ^ d[i]; } /* let c = q*(1+x) + X^n*r with X = x^GF2X_WORDSIZE and deg(r) < 1 then c <- q, returns r. (Algorithm from Michel Quercia.) */ static unsigned long DivOnePlusX(unsigned long *c, long n) { unsigned long t = 0; long i; #if (GF2X_WORDSIZE == 64) /* mask[t] = t * (1 + x + x^2 + ... + x^(GF2X_WORDSIZE-1)) */ unsigned long mask[2] = {0UL, 0xFFFFFFFFFFFFFFFFUL}; #elif (GF2X_WORDSIZE == 32) unsigned long mask[2] = {0UL, 0xFFFFFFFFUL}; #else #error "GF2X_WORDSIZE should be 32 or 64" #endif for (i = 0; i < n; i++) { /* invariant: t < 2 */ #ifndef GF2X_HAVE_PCLMUL_SUPPORT unsigned long u; /* u <- c[i] * (1 + x + x^2 + ... + x^(GF2X_WORDSIZE-1)) */ u = c[i] ^ (c[i] << 1); u ^= u << 2; u ^= u << 4; u ^= u << 8; u ^= u << 16; #if (GF2X_WORDSIZE == 64) u ^= u << 32; #endif c[i] = u ^ mask[t]; #else /* use pclmul */ unsigned long cc[2]; gf2x_mul1 (cc, c[i], 0xFFFFFFFFFFFFFFFFUL); c[i] = cc[0] ^ mask[t]; #endif t = c[i] >> (GF2X_WORDSIZE - 1); } return t; } #if (defined(DEBUG)) static void dump(const unsigned long *a, long n) { long i; for (i = 0; i < n; i++) { printf("+%lu*X^%lu", a[i], i); if ((i + 1) % 3 == 0) printf("\n"); } printf(":\n"); } #endif /* \\ gp-pari check code. default(echo, 1); A = (a2*x^2 + a1*x + a0)*Mod(1,2) B = (b2*x^2 + b1*x + b0)*Mod(1,2) C = A * B c0 = polcoeff(C, 0) c1 = polcoeff(C, 1) c2 = polcoeff(C, 2) c3 = polcoeff(C, 3) c4 = polcoeff(C, 4) \\ --- Evaluation phase. 10 add, 4 shift, 5 mul. W0 = (a2*y^2+a1*y)*Mod(1,2) W4 = (b2*y^2+b1*y)*Mod(1,2) W3 = (a2+a1+a0) *Mod(1,2) W2 = (b2+b1+b0) *Mod(1,2) W1 = W2 * W3 \\ C(1) W3 = W3 + W0 W2 = W2 + W4 W0 = W0+a0 *Mod(1,2) W4 = W4+b0 *Mod(1,2) W3 = W2 * W3 \\ C(y+1) W2 = W0 * W4 \\ C(y) W4 = a2 * b2 *Mod(1,2) \\ C(\infty) W0 = a0 * b0 *Mod(1,2) \\ C(0) \\ ------ Interpolation phase. 10 add, 2 shift, 2 div. W3 = W3 + W2 W3 == ( c4 + (y^2+y+1)*c3 + c2 + c1 ) \\ check W2 = ( ( W2 + W0 )/y + W3 + W4*(y^3+1) ) / (y+1) \\W2 = ( W2 + W0 + W3*y + W4*(y^4+y) ) / (y^2+y) W2 == ( c2 + c3 ) \\ check W1 = W1 + W0 W1 == ( c4 + c3 + c2 + c1 ) \\ check W3 = ( W3 + W1 ) / (y*(y+1)) W3 == ( c3 ) \\ check W1 = W1 + W4 + W2 W1 == ( c1 ) \\ check W2 = W2 + W3 W2 == ( c2 ) \\ check C == W4*x^4+ W3*x^3+ W2*x^2+ W1*x + W0 \\ check quit; */ /* c must have space for 2n words. stk must have space for max( KarMem(n), 5k+2 + ToomMem(k+1)) where k = ceil(n/3). */ void gf2x_mul_tc3(unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk) { long k = (n + 2) / 3; /* ceil(n/3) */ long r = n - 2 * k; unsigned long cy; unsigned long *W0 = c; unsigned long *W1 = stk; unsigned long *W2 = c + 2 * k; unsigned long *W3 = stk + 2 * k; unsigned long *W4 = c + 4 * k; assert(c != a); assert(c != b); /* \\ --- Evaluation phase. 10 add, 4 shift, 5 mul. */ /* W0 = (a2*y^2+a1*y) */ /* W4 = (b2*y^2+b1*y) */ /* W0 = (a2*y+a1)*y */ /* W4 = (b2*y+b1)*y */ W0[k] = AddLsh12a (W0, a + k, k, a + 2 * k, r); /* x * a1 + x^2 * a2 */ W4[2 + k] = AddLsh12a (W4 + 2, b + k, k, b + 2 * k, r); /* x * b1 + x^2 b2 */ /* using W4[2+k] requires that k+3 words are available at W4=c+4k. Since c contains 2n=4k+2r words, then W4 contains 2r words, thus we need k+3 <= 2r. This is true for n >= 17. Also true for n = 9, 12, 14, 15 but timing tests show that this is not the fastest routine for such small n. */ ASSERT(k + 3 <= 2 * r); /* {c, k+1}: x*a1+x^2*a2, {c+4k, k+1}: x*b1+x^2*b2 */ /* W3 = ((a2+a1)+a0) */ /* W2 = ((b2+b1)+b0) */ Add2 (c + k + 1, a, a + k, k, a + 2 * k, r); /* a0 + a1 + a2 */ Add2 (W2 + 2, b, b + k, k, b + 2 * k, r); /* b0 + b1 + b2 */ /* W1 = W2 * W3 \\ C(1) */ /* {c, k+1}: x*a1+x^2*a2, {c+k+1, k}: a0+a1+a2, {c+2k+2,k}: b0+b1+b2, {c+4k, k+1}: x*b1+x^2*b2 */ gf2x_mul_toom(W1, c + k + 1, W2 + 2, k, W3); /* W1 : 2*k */ /* {c, k+1}: x*a1+x^2*a2, {c+k+1, k}: a0+a1+a2, {c+2k+2,k}: b0+b1+b2, {c+4k, k+1}: x*b1+x^2*b2, {stk, 2k}: C(1) */ /* W3 = W3 + W0 */ /* W2 = W2 + W4 */ Add(c + k + 1, c + k + 1, W0, k); c[2 * k + 1] = W0[k]; /* a0 + (x+1)a1 + (x^2+1)a2 */ Add(W2 + 2, W2 + 2, W4 + 2, k); W2[k + 2] = W4[k + 2]; /* b0 + (x+1)b1 + (x^2+1)b2 */ /* since we use W2[k+2], we need k+3 words in W2, i.e., 3 <= k */ // ASSERT (k >= 3); /* {c, k+1}: x*a1+x^2*a2, {c+k+1, k+1}: a0+(1+x)*a1+(1+x^2)*a2, {c+2k+2,k+1}: b0+(1+x)*b1+(1+x^2)*b2, {c+4k, k+1}: x*b1+x^2*b2, {stk, 2k}: C(1) */ /* W0 = W0+a0 */ /* W4 = W4+b0 */ Add(W0, W0, a, k); /* a0 + (x)a1 + (x^2)a2 */ Add(W4 + 2, W4 + 2, b, k); /* b0 + (x)b1 + (x^2)b2 */ /* {c, k+1}: a0+x*a1+x^2*a2, {c+k+1, k+1}: a0+(1+x)*a1+(1+x^2)*a2, {c+2k+2,k+1}: b0+(1+x)*b1+(1+x^2)*b2, {c+4k, k+1}: b0+x*b1+x^2*b2, {stk, 2k}: C(1) */ /* W3 = W2 * W3 \\ C(y+1) */ /* W2 = W0 * W4 \\ C(y) */ gf2x_mul_toom(W3, W2 + 2, c + k + 1, k + 1, stk + 5 * k + 2); /* W3 : 2*k+1 */ /* {c, k+1}: a0+x*a1+x^2*a2, {c+k+1, k+1}: a0+(1+x)*a1+(1+x^2)*a2, {c+2k+2,k+1}: b0+(1+x)*b1+(1+x^2)*b2, {c+4k, k+1}: b0+x*b1+x^2*b2, {stk, 2k}: C(1), {stk+2k,2k+2}: C(1+x) */ gf2x_mul_toom(W2, W0, W4 + 2, k + 1, stk + 4 * k + 3); cy = W4[0]; /* contains at most 3 bits */ ASSERT(cy <= 7); /* {c, k+1}: a0+x*a1+x^2*a2, {c+2k, 2k+2}: C(x), {c+4k, k+1}: b0+x*b1+x^2*b2, {stk, 2k}: C(1), {stk+2k,2k+2}: C(1+x) */ /* W4 = a2 * b2 \\ C(\infty) */ /* W0 = a0 * b0 \\ C(0) */ gf2x_mul_toom(W0, a, b, k, stk + 4 * k + 3); /* W0 : 2*k */ /* {c, 2k}: C(0), {c+2k, 2k+2}: C(x), {c+4k, k+1}: b0+x*b1+x^2*b2, {stk, 2k}: C(1), {stk+2k,2k+2}: C(1+x) */ gf2x_mul_toom(W4, a + 2 * k, b + 2 * k, r, stk + 4 * k + 3); /* W4 : 2*r */ /* {c, 2k}: C(0), {c+2k, 2k}+cy: C(x), {c+4k, 2r}: C(Inf), {stk, 2k}: C(1), {stk+2k,2k+2}: C(1+x) */ /* \\ ------ Interpolation phase. 10 add, 2 shift, 2 div. */ /* W3 = W3 + W2: W3 has at most 2k words + 3 bits, W2 has 2k words + at most 3 bits (stored in cy). */ Add(W3, W3, W2, 2 * k); W3[2 * k] ^= cy; /* now W3 has at most 2k words + 1 bit, which can be non-zero only if r = k one most significant bit from a2 and b2 is set. */ ASSERT(W3[2 * k] <= 1); /* {c, 2k}: C(0), {c+2k, 2k}+cy: C(x), {c+4k, 2r}: C(Inf), {stk, 2k}: C(1), {stk+2k,2k+2}: C(1+x)+C(x) */ /* W2 = ( ( W2 + W0 )/y + W3 + W4*(y^3+1) ) / (y+1) */ /* \\W2 = ( W2 + W0 + W3*y + W4*(y^4+y) ) / (y^2+y) */ /* W2 has 2k words + at most 3 bits (stored in cy), W0 has 2k words */ Rsh1Adda (W2, W0, W3, 2 * k); W2[2 * k - 1] ^= cy << (GF2X_WORDSIZE - 1); /* now W2 has at most 2k words + 3 bits (cy >> 1), but since the final results will have 2k words only, we can ignore cy. */ cy = AddLsh13(W2, W4, 2 * r); if (r != k) W2[2 * r] ^= cy; /* else ignore the carry, since W2 should have 2k words, taking into account the above ignored cy >> 1. */ DivOnePlusX(W2, 2 * k); /* W1 = W1 + W0 */ /* W1 == ( c4 + c3 + c2 + c1 ) \\ check */ Add(W1, W1, W0, 2 * k); /* W3 = ( W3 + W1 ) / (y*(y+1)) */ /* W3 == ( c3 ) \\ check */ Rsh1Add(W3, W1, 2 * k); W3[2 * k - 1] |= W3[2 * k] << (GF2X_WORDSIZE - 1); DivOnePlusX(W3, 2 * k); /* W1 = W1 + W4 */ Add(W1, W1, W4, 2 * r); /* perform simultaneously W1 <- W1 + W2, W2 <- W2 + W3, and {c + k, 4k} <- {c + k, 4k} + {W1, 4k} */ Add3(c + k, W1, W2, k); Add4(W2, W1 + k, W2 + k, W3, k); Add3(W2 + k, W3, W3 + k, k); Add(W4, W4, W3 + k, k); /* C == W4*x^4+ W3*x^3+ W2*x^2+ W1*x + W0 \\ check */ /* assume 5*k <= 2*n = 4*k + 2*r, i.e., k <= 2*r, which is true for n >= 8 */ ASSERT(k <= 2 * r); } /* * Below this line, experimental code * (C) 2007 Richard Brent * This code is released under the GPL 2.0 license, or any later version. * * Based on Sec. 5.2 of Marco Bodrato's paper (reference below) * but with full-word aligned operations to reduce overheads. * * Reference: http://bodrato.it/papers/#WAIFI2007 * * "Towards Optimal Toom-Cook Multiplication for Univariate and * Multivariate Polynomials in Characteristic 2 and 0." by Marco * BODRATO; in C.Carlet and B.Sunar, editors, "WAIFI'07 proceedings", * LNCS 4547, pp. 119-136. Springer, Madrid, Spain, June 21-22, 2007. */ // Need GF2X_MUL_TOOMU_THRESHOLD >= 11 for internal reasons // but calls to Toom should have size at least 8 so // need GF2X_MUL_TOOMU_THRESHOLD >= 33. #define MINI_GF2X_MUL_TOOMU_THRESHOLD 33 #if (GF2X_MUL_TOOMU_THRESHOLD < MINI_GF2X_MUL_TOOMU_THRESHOLD) #error "GF2X_MUL_TOOMU_THRESHOLD should be at least 33" #endif /* Unbalanced Toom-Cook multiplication, assumes a takes sa words, b takes n = sb = (sa+1)/2 words, returns product c of sa+sb words using five multiplications of size (n/2 + O(1)) by (n/2 + O(1)). See Bodrato, pg. 125, top right. c should not overlap the inputs. stk must have space for sp(sa) = gf2x_toomuspace(sa) words, where sp(sa) = 2*sa + 32 + gf2x_toomspace(sa/4 + 4) >= 4*(2*ceil(n/2) + 3) + gf2x_toomspace(floor(n/2) + 3) and gf2x_toomspace(n) is the maximum space needed for the Toom-Cook routines KarMul, Toom3Mul, Toom3wMul, Toom4Mul. It is assumed that sa >= 33 so n >= 17. */ void gf2x_mul_tc3u(unsigned long * c, const unsigned long * a, long sa, const unsigned long * b, unsigned long * stk) { ASSERT(sa >= MINI_GF2X_MUL_TOOMU_THRESHOLD); // n should be at least 6 for internal // reasons and 17 so calls to Toom // have size at least 9, so need // sa >= 33. long n = (sa + 1) / 2; // Assume sb == n == ceil(sa/2) long k = (n + 1) / 2; // ceil(n/2) long d = n & 1; // d = odd(n) = 2k - n, n = 2k - d long rb = n - k; // Size(b1) = k - d long ra = sa - 3 * k; // Size(a3) = ra = k - 2d - odd(sa) long sc = sa + n; // Size(c) = 6k - 3d - odd(sa) const unsigned long *a0 = a; // Aliases for four parts of a const unsigned long *a1 = a0 + k; const unsigned long *a2 = a1 + k; const unsigned long *a3 = a2 + k; const unsigned long *b0 = b; // Aliases for two parts of b const unsigned long *b1 = b0 + k; long k2 = 2 * (k + 3); // Size of temporary arrays unsigned long *W0 = c; // Overlap W0 (size 2*k) with c unsigned long *W1 = stk; unsigned long *W2 = c + 2 * k; // Overlap W2 with c + 2*k ... unsigned long *W3 = W1 + k2; unsigned long *W4 = W3 + k2; // But not W4 as W2 too large unsigned long *W5 = W4 + k2; // W5 is synonymous with W3 in // Bodrato's paper stk += 4 * k2; // 4 temporaries of size k2 unsigned long s, t; long j; // In the comments y = x**w where w = wordlength = NTL_BITS_PER_LONG // y can be thought of as a w-bit shift operator. // Bodrato's code corresponds to w = 1, which minimises the size of // the arguments in the Toom calls, but requires a lot of fiddly // bit-operations. By choosing w = 32 or 64 we simplify the coding // and obtain opportunities for loop optimisation. Both methods have // the same asymptotic complexity. // // If the equal-size multiplication is O(n^alpha) then we expect Toom3uMul // to be worthwhile when alpha > lg(5/2) = 1.3219... // TC2 has alpha = lg(3) = 1.58..., // TC3 has alpha = lg(5)/lg(3) = 1.46..., // TC4 has alpha = lg(7)/2 = 1.40..., // thus in all these cases Toom3uMul should be worthwhile on average // (saving about 5.5% for the case of TC4, and more for other cases). // However, this analysis does not take O(n) overheads into account // so it is inaccurate for small n. // // In the comments " + " means addition in GF(2) and " ^ " means // exponentiation. // Evaluation phase Size is (max) size in words // W5 = a3 + a2 + a1 + a0 == A(1) // Size(W5) := k // W2 = b1 + b0 == B(1) // Size(W2) := k for (j = 0; j < ra; j++) { W5[j] = a3[j] ^ a2[j] ^ a1[j] ^ a0[j]; W2[j] = b1[j] ^ b0[j]; } for (; j < rb; j++) { W5[j] = a2[j] ^ a1[j] ^ a0[j]; // No a3[j] here W2[j] = b1[j] ^ b0[j]; } for (; j < k; j++) { W5[j] = a2[j] ^ a1[j] ^ a0[j]; W2[j] = b0[j]; // No b1[j] here } // Calls to Toom mixed with further evaluation. There are 5 calls // to Toom with sizes at most k+3-d = n/2 + 3 = (sa+1)/4 + 3. // W1 = W2 * W5 == C(1) gf2x_mul_toom(W1, W2, W5, k, stk); // Size(W1) := 2*k // W0 = a3*y^3 + a2*y^2 + a1*y == A(y) - a0 // Size(W0) := k+3-d (at most) W0[0] = 0; W0[1] = a1[0]; W0[2] = a2[0] ^ a1[1]; for (j = 0; j < k - 3; j++) // Assumes k > 2, i.e. n > 4 W0[j + 3] = a3[j] ^ a2[j + 1] ^ a1[j + 2]; W0[j + 3] = a2[j + 1] ^ a1[j + 2]; // Fix up a3 contribution later j++; W0[j + 3] = a2[j + 1]; // No a1[j+2] here, a3 later for (j++; j < rb; j++) // Size(W0) := k+3-d (at most) W0[j + 3] = 0; // Need k+3-d <= 2*k // which is true if n > 4. for (j = k - 3; j < ra; j++) W0[j + 3] ^= a3[j]; // Fix up a3 contribution // W5 += W0 + a3*(y^2 + y) // Size(W5) := k+3-d // W0 += a0 == A(y) // Size(W0) = k+3-d > k for (j = k; j < rb + 3; j++) // rb == k-d so rb+3 == k+3-d W5[j] = 0; W5[0] ^= W0[0]; W0[0] ^= a0[0]; t = 0; for (j = 1; j < ra; j++) // Usual case, ra-1 iterations { unsigned long u; u = W0[j]; W0[j] = u ^ a0[j]; s = a3[j - 1]; W5[j] ^= s ^ (t ^ u); t = s; } s = a3[j - 1]; W5[j] ^= W0[j] ^ s ^ t; j++; W5[j] ^= s; for (; j < rb + 3; j++) W5[j] ^= W0[j]; for (j = ra; j < k; j++) W0[j] ^= a0[j]; // Pad W2 to size k+3-d for future Toom call (which requires equal-sized // inputs). This is (asymptotically) more efficient that calling AddMul1. for (j = k; j < rb + 3; j++) W2[j] = 0; // Size(W2) := k+3-d // W2 += b1*y // W4 = W2 + b1 == B(y) // Size(W4) := k+3-d // but 2 high words zero W4[0] = W2[0] ^ b1[0]; t = b1[0]; for (j = 1; j < rb; j++) { unsigned long s; s = W2[j] ^ t; W2[j] = s; t = b1[j]; W4[j] = s ^ t; } W2[j] ^= t; for (; j < rb + 3; j++) W4[j] = W2[j]; // W3 = W5 * W2 == C(1+y) // Size(W3) := 2*(k+3-d) // but high 2 words zero gf2x_mul_toom(W3, W5, W2, rb + 3, stk); // W2 = W0 * W4 == C(y) gf2x_mul_toom(W2, W0, W4, rb + 3, stk); // Size(W2) := 2*(k+3-d) // but 2 high words zero // W4 = a3 * b1 == C(infinity) if (ra < rb) { for (j = 0; j < ra; j++) // W5 := a3 padded to W5[j] = a3[j]; // size rb > ra for (; j < rb; j++) W5[j] = 0; // Size(W5) := rb gf2x_mul_toom(W4, W5, b1, rb, stk); // Size(W4) := 2*rb } else gf2x_mul_toom(W4, a3, b1, rb, stk); // Avoid copy if ra == rb // W0 = a0 * b0 == C(0) gf2x_mul_toom(W0, a0, b0, k, stk); // Size(W0) := 2*k; // Interpolation phase // W3 += W2 == c1 + c2 + c3*(1 + y + y^2) + c4 // W2 += W0 == C(y) + C(0) for (j = 0; j < 2 * k; j++) { // First 2*k iterations unsigned long s; s = W2[j]; W3[j] ^= s; // Size(W0) = 2*k W2[j] = s ^ W0[j]; // other sizes 2*rb + 4 } // ignoring known zeros for (; j < 2 * rb + 4; j++) W3[j] ^= W2[j]; // Last 4 - 2*d iterations ASSERT(W2[0] == 0); // Division should be exact // W2 = W2/y + W3 for (j = 0; j < 2 * rb + 3; j++) W2[j] = W2[j + 1] ^ W3[j]; W2[j] = W3[j]; // Size(W2) := 2*rb + 4 // W2 = (W2 + W4*(1+y^3))/(1+y) == c2 + c3 for (j = 0, s = 0; j < 3; j++) { s ^= W2[j] ^ W4[j]; W2[j] = s; // first 3 iterations special } for (; j < 2 * rb; j++) { s ^= W2[j] ^ W4[j] ^ W4[j - 3]; // next 2*rb-3 are usual case W2[j] = s; } for (; j < 2 * rb + 3; j++) { s ^= W2[j] ^ W4[j - 3]; // next 3 are special W2[j] = s; } // W2[j] = 0; // Size(W2) = 2*rb + 4 // but last word zero // so Size(W2) := 2*rb + 3 // W1 += W0 == c1 + c2 + c3 + c4 // W3 += W1 == c3*y*(1+y) for (j = 0; j < 2 * k; j++) { unsigned long s; s = W0[j] ^ W1[j]; W1[j] = s; // Size(W0) = Size(W1) = 2*k W3[j] ^= s; // Size(W3) = 2*rb + 4 > 2*k } ASSERT(W3[0] == 0); // Next division exact // W3 = W3/(y + y^2) == c3 for (j = 0, s = 0; j < 2 * rb + 3; j++) { s ^= W3[j + 1]; W3[j] = s; } // W3[j] = 0; ASSERT(s == 0); // Division exact // Size(W3) := 2*rb + 2 // W1 += W2 + W4 == c1 // Size(W4) == 2*rb // W2 += W3 == c2 // <= Size(W1) == 2*k // <= Size(W3) == 2*rb + 2 // < Size(W2) == 2*rb + 3 for (j = 0; j < 2 * rb; j++) { // Usual case unsigned long s; s = W2[j]; W1[j] ^= s ^ W4[j]; W2[j] = s ^ W3[j]; } for (; j < 2 * k; j++) { // Next 2*d iterations unsigned long s; s = W2[j]; W1[j] ^= s; // No W4[j] here W2[j] = s ^ W3[j]; } for (; j < 2 * rb + 2; j++) { // Next 2*(1-d) iterations unsigned long s; s = W2[j]; W1[j] = s; // Extending size of W1 W2[j] = s ^ W3[j]; } W1[j] = W2[j]; // Size(W1) := 2*rb + 3 // Size(W2) = 2*rb + 3 // c = W0 + W1*y + W2*y^2 + W3*y^3 + W4*y^4 // We already have // W0[j] == c[j] for j = 0 .. 2*k-1 because W0 = c, and // W2[j] == c[j] for j = 2*k .. 2*k+2*rb+2 because W2 = c + 2*k ASSERT(3 - 2 * d + 4 * k <= sc); for (j = 0; j < 3 - 2 * d; j++) // 3 - 2*d words of W2 c[j + 4 * k] ^= W4[j]; // overlap the W4 region for (; j < sc - 4 * k; j++) // Copy rest of W4 c[j + 4 * k] = W4[j]; // Here c was undefined ASSERT(2 * rb + 3 + k <= sc); for (j = 0; j < 2 * rb + 3; j++) c[j + k] ^= W1[j]; ASSERT(2 * rb + 2 + 3 * k <= sc); // True if n >= 6 so need // GF2X_MUL_TOOMU_THRESHOLD >= 6 for (j = 0; j < 2 * rb + 2; j++) c[j + 3 * k] ^= W3[j]; } /* * Below this line, experimental code * (C) 2007 Richard Brent * This code is released under the GPL 2.0 license, or any later version. * * Based on Marco Bodrato's mul-tc3.c but with full-word aligned * operations to reduce overheads. * * Reference: http://bodrato.it/papers/#WAIFI2007 * * "Towards Optimal Toom-Cook Multiplication for Univariate and * Multivariate Polynomials in Characteristic 2 and 0." by Marco * BODRATO; in C.Carlet and B.Sunar, editors, "WAIFI'07 proceedings", * LNCS 4547, pp. 119-136. Springer, Madrid, Spain, June 21-22, 2007. */ #if (GF2X_MUL_TOOMW_THRESHOLD < 8) #error "GF2X_MUL_TOOMW_THRESHOLD should be at least 8" #endif /* c must have space for 2n words and should not overlap the inputs. stk must have space for sp(n) = gf2x_toomspace(n) words sp(n) = (n lt 8) ? KarMem(7) : 8*(n/3 + 3) + sp(n/3 + 2) and KarMem(7) = 19 is the space required by KarMul. A simpler bound on the memory required is 5*n + 17 (equality at n = 19). */ #if 0 void gf2x_mul_tc3w(unsigned long * c, const unsigned long * a, const unsigned long * b, long n, unsigned long * stk) { long k = (n + 2) / 3; // size of a0, a1, b0, b1 long r = n - 2 * k; // size of a2, b2 long d = (r < k) ? 1 : 0; // 1 if r < k, 0 otherwise long kd = k - d; const unsigned long *a0 = a; // Aliases for three parts of a const unsigned long *a1 = a + k; const unsigned long *a2 = a + 2 * k; const unsigned long *b0 = b; // Ditto for b const unsigned long *b1 = b + k; const unsigned long *b2 = b + 2 * k; long k2 = 2 * (k + 2); // Size of temporary arrays unsigned long *W0 = c; // Overlap W0 (size 2*k) with c unsigned long *W1 = stk; unsigned long *W2 = c + 2 * k; // Overlap W2 with c + 2*k ... unsigned long *W3 = W1 + k2; unsigned long *W4 = W3 + k2; // But not W4 as W2 too large unsigned long *W5 = W4 + k2; // W5 is synonymous with W3 in // Bodrato's mul-tc3.c stk += 4 * k2; // 4 temporaries of size k2 long j; unsigned long s, u2, v2; // In the comments y = x**w where w = wordlength = NTL_BITS_PER_LONG // y can be thought of as a w-bit shift operator. // Bodrato's code corresponds to w = 1, which minimises the size of // the arguments in the recursive calls, but requires a lot of fiddly // bit-operations. By choosing w = 32 or 64 we simplify the coding // and obtain opportunities for loop optimisation. Both methods have // the same asymptotic complexity O(n**(ln(5)/ln(3))) = O(n**1.464). // We try to combine loops as far as possible to reduce overheads and memory // references. This often means splitting a loop into the "usual" case and // "special" cases at the start or end, due to different size arrays etc. // In the comments " + " means addition in GF(2) and " ^ " means // exponentiation. // Evaluation phase Size is (max) size in words // W0 = a1*y + a2*y^2 == A(y) - a0 == A(1+y) - A(1) // W4 = b1*y + b2*y^2 == B(y) - b0 == B(1+y) - B(1) // W5 = a0 + a1 + a2 == A(1) // W2 = b0 + b1 + b2 == B(1) W0[0] = W4[0] = 0; W0[1] = a1[0]; W4[1] = b1[0]; // No a2, b2 here W5[0] = a0[0] ^ a1[0] ^ (u2 = a2[0]); W2[0] = b0[0] ^ b1[0] ^ (v2 = b2[0]); for (j = 1; j < r; j++) // Next r-1 iterations { // This is the usual case unsigned long u1, v1; W0[j + 1] = (u1 = a1[j]) ^ u2; // Size(a1) = Size(b1) = k W4[j + 1] = (v1 = b1[j]) ^ v2; W5[j] = a0[j] ^ u1 ^ (u2 = a2[j]); // Size(a2) = Size(b2) = r W2[j] = b0[j] ^ v1 ^ (v2 = b2[j]); } for (; j < k; j++) // Last iterations for W5, W2 { W0[j + 1] = a1[j]; // Omit a2, b2 here W4[j + 1] = b1[j]; W5[j] = a0[j] ^ a1[j]; // Size(W5) := k W2[j] = b0[j] ^ b1[j]; // Size(W2) := k; } W0[k + 1] = W4[k + 1] = 0; // In case r == k W0[r + 1] ^= a2[r - 1]; // Size(W0) := kd+2 W4[r + 1] ^= b2[r - 1]; // Size(W4) := kd+2 // Recursive calls mixed with further evaluation // There are 5 recursive calls with sizes at most k+2. // Thus it is necessary that n > 4 (but we assume that // Karatsuba's method or some other method will be used // for very small n, say n < GF2X_MUL_TOOMW_THRESHOLD). // W1 = W2 * W5 == C(1) gf2x_mul_toom(W1, W2, W5, k, stk); // Size(W1) := 2*k // W5 += W0 == A(1+y) // Size(W5) < Size(W0) // W2 += W4 == B(1+y) // Size(W2) < Size(W4) // W0 += a0 == A(y) // Size(W0) > Size(a0) // W4 += b0 == B(y) // Size(W4) > Size(b0) for (j = 0; j < k; j++) // First k iterations { unsigned long u, v; W5[j] ^= (u = W0[j]); W2[j] ^= (v = W4[j]); W0[j] = u ^ a0[j]; W4[j] = v ^ b0[j]; } for (; j < kd + 2; j++) // Last 2-d iterations { W5[j] = W0[j]; // Size(W5) := kd+2 W2[j] = W4[j]; // Size(W2) := kd+2 } // W3 = W2 * W5 == C(1+y) // Output argument in recursive call must differ from inputs. // That is why we need both W3 and W5. // ASSERT ((kd+2) <= (n/3 + 2)); // Explaining the space bound gf2x_mul_toom(W3, W2, W5, kd + 2, stk); // Size(W3) := 2*kd + 4 // W2 = W0 * W4 == C(y) gf2x_mul_toom(W2, W0, W4, kd + 2, stk); // Size(W2) := 2*kd + 4 // W0 = a0 * b0 == c0 == C(0/1) == C(0) gf2x_mul_toom(W0, a0, b0, k, stk); // Size(W0) := 2*k // so c[0..(2k-1)] defined // W4 = a2 * b2 == c4 == C(1/0) == C(infinity) gf2x_mul_toom(W4, a2, b2, r, stk); // Size(W4) := 2*r // Interpolation phase // W3 += W2 == c1 + c2 + c3*(1 + y + y^2) + c4 // W2 += W0 == C(y) + C(0) for (j = 0; j < 2 * k; j++) { // First 2*k iterations s = W2[j]; W3[j] ^= s; // Size(W0) = 2*k W2[j] = s ^ W0[j]; // other sizes 2*kd + 4 } for (; j < 2 * kd + 4; j++) W3[j] ^= W2[j]; // Last 4 - 2*d iterations // ASSERT (W2[0] == 0); // Division should be exact // W2 = W2/y + W3 for (j = 0; j < 2 * kd + 3; j++) W2[j] = W2[j + 1] ^ W3[j]; W2[j] = W3[j]; // Size(W2) := 2*kd + 4 // W2 = (W2 + W4*(1+y^3))/(1+y) == c2 + c3 for (j = 0, s = 0; j < 3; j++) { s ^= W2[j] ^ W4[j]; W2[j] = s; // first 3 iterations special } for (; j < 2 * r; j++) { s ^= W2[j] ^ W4[j] ^ W4[j - 3]; // next 2r-3 are usual case W2[j] = s; } for (; j < 2 * r + 3; j++) { s ^= W2[j] ^ W4[j - 3]; // next 3 are special W2[j] = s; } for (; j < 2 * kd + 4; j++) { s ^= W2[j]; // last (k-r-d) == 0 or 1 W2[j] = s; // Size(W2) = 2*kd + 3 } // ASSERT (s == 0); // Division should be exact // W1 += W0 == c1 + c2 + c3 + c4 // W3 += W1 == c3*y*(1+y) for (j = 0; j < 2 * k; j++) { s = W0[j] ^ W1[j]; W1[j] = s; // Size(W0) = Size(W1) = 2*k W3[j] ^= s; // Size(W3) = 2*kd + 4 > 2*k } // ASSERT (W3[0] == 0); // Next division exact // W3 = W3/(y + y^2) == c3 for (j = 0, s = 0; j < 2 * kd + 3; j++) { s ^= W3[j + 1]; W3[j] = s; } W3[j] = 0; // ASSERT (s == 0); // Division exact // Size(W3) := 2*kd + 2 // W1 += W2 + W4 == c1 // Size(W4) == 2*r // W2 += W3 == c2 // <= Size(W1) == 2*k // <= Size(W3) == 2*kd + 2 // < Size(W2) == 2*kd + 4 for (j = 0; j < 2 * r; j++) { // Usual case s = W2[j]; W1[j] ^= s ^ W4[j]; W2[j] = s ^ W3[j]; } for (; j < 2 * k; j++) { // Next 2*(k-r) iterations s = W2[j]; W1[j] ^= s; // No W4[j] here W2[j] = s ^ W3[j]; } for (; j < 2 * kd + 2; j++) { // Next 2*(1-d) iterations s = W2[j]; W1[j] = s; // Extending size of W1 W2[j] = s ^ W3[j]; } for (; j < 2 * kd + 4; j++) // Last 2 iterations W1[j] = W2[j]; // Size(W1) := 2*kd + 4 // Size(W2) = 2*kd + 4 // c = W0 + W1*y + W2*y^2 + W3*y^3 + W4*y^4 // We already have // W0[j] == c[j] for j = 0 .. 2*k-1 because W0 = c, and // W2[j] == c[j] for j = 2*k .. 2*k+2*kd+3 because W2 = c + 2*k for (j = 0; j < 4 - 2 * d; j++) // 4 - 2*d words of W2 c[j + 4 * k] ^= W4[j]; // overlap the W4 region for (; j < 2 * r; j++) // Copy rest of W4 c[j + 4 * k] = W4[j]; // Here c was undefined for (j = 0; j < 2 * kd + 4; j++) c[j + k] ^= W1[j]; // ASSERT (2*kd + 2 + 3*k <= 2*n); // True if n >= 8 so need // GF2X_MUL_TOOMW_THRESHOLD >= 8 for (j = 0; j < 2 * kd + 2; j++) c[j + 3 * k] ^= W3[j]; } #else /* * Below this line, experimental code * (C) 2007 Richard Brent * This code is released under the GPL 2.0 license, or any later version. * * Based on Marco Bodrato's mul-tc3.c but with full-word aligned * operations to reduce overheads. * * Reference: http://bodrato.it/papers/#WAIFI2007 * * "Towards Optimal Toom-Cook Multiplication for Univariate and * Multivariate Polynomials in Characteristic 2 and 0." by Marco * BODRATO; in C.Carlet and B.Sunar, editors, "WAIFI'07 proceedings", * LNCS 4547, pp. 119-136. Springer, Madrid, Spain, June 21-22, 2007. */ #if (GF2X_MUL_TOOMW_THRESHOLD < 8) #error "GF2X_MUL_TOOMW_THRESHOLD should be at least 8" #endif /* c must have space for 2n words and should not overlap the inputs. stk must have space for sp(n) = gf2x_toomspace(n) words sp(n) = (n lt 8) ? KarMem(n) : 8*(ceil(n/3) + 2) + sp(floor(n/3) + 2) and KarMem(7) = 21 is the space required by KarMul. A simpler bound on the memory required is 5*n + 29 (equality at n = 25): * this is true for n < 8 since KarMulMem(n) = 3*ceil(n/2) + KarMulMem(ceil(n/2)), which gives KarMulMem(2)=3, KarMulMem(3)=9, KarMulMem(4)=9, KarMulMem(5)=18, KarMulMem(6)=18, KarMulMem(7)=21. This is always <= 5*n+29. * for n >= 8: sp(n) <= 8*(ceil(n/3) + 2) + sp(floor(n/3) + 2) <= 8*(ceil(n/3) + 2) + 5*(floor(n/3) + 2) + 29 [induction] <= 8 * (n/3 + 2/3 + 2) + 5 * (n/3 + 2) + 29 <= 13/3 * n + 94/3 + 29 = 5 * n + 29 - (2*n-94)/3 We first check by exhaustive search that for 8 <= n < 47 we have sp(n) <= 5*n+29, and it follows by induction for n >= 47. */ void gf2x_mul_tc3w (unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk) { long k = (n + 2) / 3; // size of a0, a1, b0, b1 long r = n - 2*k; // size of a2, b2 long d = (r < k) ? 1 : 0; // 1 if r < k, 0 otherwise long kd = k - d; long k2 = 2*(k+2); // Size of 4 temporary arrays /* k = ceil(n/3), kd = floor(n/3) */ const unsigned long *a0 = a; // Aliases for three parts of a const unsigned long *a1 = a + k; const unsigned long *a2 = a + 2*k; const unsigned long *b0 = b; // Ditto for b const unsigned long *b1 = b + k; const unsigned long *b2 = b + 2*k; unsigned long *W0 = c; // Overlap W0 (size 2*k) with c unsigned long *W1 = stk; unsigned long *W2 = c + 2*k; // Overlap W2 with c + 2*k ... unsigned long *W3 = W1 + k2; unsigned long *W4 = W3 + k2; // But not W4 as W2 too large unsigned long *W5 = W4 + k2; // W5 is synonymous with W3 in // Bodrato's mul-tc3.c stk += 4*k2; // 4 temporaries of size k2 long j; unsigned long s; // In the comments y = x**w where w = wordlength = NTL_BITS_PER_LONG // y can be thought of as a w-bit shift operator. // Bodrato's code corresponds to w = 1, which minimises the size of // the arguments in the recursive calls, but requires a lot of fiddly // bit-operations. By choosing w = 32 or 64 we simplify the coding // and obtain opportunities for loop optimisation. Both methods have // the same asymptotic complexity O(n**(ln(5)/ln(3))) = O(n**1.464). // We try to combine loops as far as possible to reduce overheads and memory // references. This often means splitting a loop into the "usual" case and // "special" cases at the start or end, due to different size arrays etc. // In the comments " + " means addition in GF(2) and " ^ " means // exponentiation. // Evaluation phase Size is (max) size in words // W0 = a1*y + a2*y^2 == A(y) - a0 == A(1+y) - A(1) // W4 = b1*y + b2*y^2 == B(y) - b0 == B(1+y) - B(1) // W5 = a0 + a1 + a2 == A(1) // W2 = b0 + b1 + b2 == B(1) W0[0] = W4[0] = 0; W0[1] = a1[0]; W4[1] = b1[0]; // No a2, b2 here W5[0] = a0[0] ^ a1[0] ^ a2[0]; W2[0] = b0[0] ^ b1[0] ^ b2[0]; W5[1] = a0[1] ^ a1[1] ^ a2[1]; W2[1] = b0[1] ^ b1[1] ^ b2[1]; for (j = 2; j < r; j++) // Next r-1 iterations { // This is the usual case W0[j] = a1[j-1] ^ a2[j-2]; // Size(a1) = Size(b1) = k W4[j] = b1[j-1] ^ b2[j-2]; W5[j] = a0[j] ^ a1[j] ^ a2[j]; // Size(a2) = Size(b2) = r W2[j] = b0[j] ^ b1[j] ^ b2[j]; } /* the following loop runs at most twice, since k <= r + 2 */ for (; j < k; j++) { W0[j] = a1[j-1] ^ a2[j-2]; W4[j] = b1[j-1] ^ b2[j-2]; W5[j] = a0[j] ^ a1[j]; W2[j] = b0[j] ^ b1[j]; } W0[k] = a1[k-1] ^ ((k-2 < r) ? a2[k-2] : 0); W4[k] = b1[k-1] ^ ((k-2 < r) ? b2[k-2] : 0); W0[k+1] = (k-1 < r) ? a2[k-1] : 0; W4[k+1] = (k-1 < r) ? b2[k-1] : 0; // Recursive calls mixed with further evaluation // There are 5 recursive calls with sizes at most k+2. // Thus it is necessary that n > 4 (but we assume that // Karatsuba's method or some other method will be used // for very small n, say n < GF2X_MUL_TOOMW_THRESHOLD). // W1 = W2 * W5 == C(1) gf2x_mul_toom (W1, W2, W5, k, stk); // Size(W1) := 2*k // W5 += W0 == A(1+y) // Size(W5) < Size(W0) // W2 += W4 == B(1+y) // Size(W2) < Size(W4) // W0 += a0 == A(y) // Size(W0) > Size(a0) // W4 += b0 == B(y) // Size(W4) > Size(b0) for (j = 0; j < k; j++) // First k iterations { unsigned long u, v; W5[j] ^= (u = W0[j]); W2[j] ^= (v = W4[j]); W0[j] = u ^ a0[j]; W4[j] = v ^ b0[j]; } for (; j < kd+2; j++) // Last 2-d iterations { W5[j] = W0[j]; // Size(W5) := kd+2 W2[j] = W4[j]; // Size(W2) := kd+2 } // W3 = W2 * W5 == C(1+y) // Output argument in recursive call must differ from inputs. // That is why we need both W3 and W5. // ASSERT ((kd+2) <= (n/3 + 2)); // Explaining the space bound gf2x_mul_toom (W3, W2, W5, kd+2, stk); // Size(W3) := 2*kd + 4 // W2 = W0 * W4 == C(y) gf2x_mul_toom (W2, W0, W4, kd+2, stk); // Size(W2) := 2*kd + 4 // W0 = a0 * b0 == c0 == C(0/1) == C(0) gf2x_mul_toom (W0, a0, b0, k, stk); // Size(W0) := 2*k // so c[0..(2k-1)] defined // W4 = a2 * b2 == c4 == C(1/0) == C(infinity) gf2x_mul_toom (W4, a2, b2, r, stk); // Size(W4) := 2*r // Interpolation phase // W3 += W2 == c1 + c2 + c3*(1 + y + y^2) + c4 // W2 += W0 == C(y) + C(0) for (j = 0; j < 2*k; j++) { // First 2*k iterations s = W2[j]; W3[j] ^= s; // Size(W0) = 2*k W2[j] = s ^ W0[j]; // other sizes 2*kd + 4 } for (; j < 2*kd+4; j++) W3[j] ^= W2[j]; // Last 4 - 2*d iterations // ASSERT (W2[0] == 0); // Division should be exact // W2 = W2/y + W3 for (j = 0; j < 2*kd + 3; j++) W2[j] = W2[j+1] ^ W3[j]; W2[j] = W3[j]; // Size(W2) := 2*kd + 4 // W2 = (W2 + W4*(1+y^3))/(1+y) == c2 + c3 for (j = 0, s = 0; j < 3; j++) { s ^= W2[j] ^ W4[j]; W2[j] = s; // first 3 iterations special } for (; j < 2*r; j++) { s ^= W2[j] ^ W4[j] ^ W4[j-3]; // next 2r-3 are usual case W2[j] = s; } for (; j < 2*r+3; j++) { s ^= W2[j] ^ W4[j-3]; // next 3 are special W2[j] = s; } for (; j < 2*kd+4; j++) { s ^= W2[j]; // last (k-r-d) == 0 or 1 W2[j] = s; // Size(W2) = 2*kd + 3 } // ASSERT (s == 0); // Division should be exact // W1 += W0 == c1 + c2 + c3 + c4 // W3 += W1 == c3*y*(1+y) for (long j = 0; j < 2*k; j++) { s = W0[j] ^ W1[j]; W1[j] = s; // Size(W0) = Size(W1) = 2*k W3[j] ^= s; // Size(W3) = 2*kd + 4 > 2*k } // ASSERT (W3[0] == 0); // Next division exact // W3 = W3/(y + y^2) == c3 for (j = 0, s = 0; j < 2*kd + 3; j++) { s ^= W3[j+1]; W3[j] = s; } W3[j] = 0; // ASSERT (s == 0); // Division exact // Size(W3) := 2*kd + 2 // W1 += W2 + W4 == c1 // Size(W4) == 2*r // W2 += W3 == c2 // <= Size(W1) == 2*k // <= Size(W3) == 2*kd + 2 // < Size(W2) == 2*kd + 4 for (j = 0; j < 2*r; j++) { // Usual case s = W2[j]; W1[j] ^= s ^ W4[j]; W2[j] = s ^ W3[j]; } for (; j < 2*k; j++) { // Next 2*(k-r) iterations s = W2[j]; W1[j] ^= s; // No W4[j] here W2[j] = s ^ W3[j]; } for (; j < 2*kd + 2; j++) { // Next 2*(1-d) iterations s = W2[j]; W1[j] = s; // Extending size of W1 W2[j] = s ^ W3[j]; } for (; j < 2*kd + 4; j++) // Last 2 iterations W1[j] = W2[j]; // Size(W1) := 2*kd + 4 // Size(W2) = 2*kd + 4 // c = W0 + W1*y + W2*y^2 + W3*y^3 + W4*y^4 // We already have // W0[j] == c[j] for j = 0 .. 2*k-1 because W0 = c, and // W2[j] == c[j] for j = 2*k .. 2*k+2*kd+3 because W2 = c + 2*k for (j = 0; j < 4 - 2*d; j++) // 4 - 2*d words of W2 c[j+4*k] ^= W4[j]; // overlap the W4 region for (; j < 2*r; j++) // Copy rest of W4 c[j+4*k] = W4[j]; // Here c was undefined for (long j = 0; j < 2*kd + 4; j++) c[j+k] ^= W1[j]; // ASSERT (2*kd + 2 + 3*k <= 2*n); // True if n >= 8 so need // GF2X_MUL_TOOMW_THRESHOLD >= 8 for (long j = 0; j < 2*kd + 2; j++) c[j+3*k] ^= W3[j]; } #endif #ifdef HAVE_KARAX #include /* 128-bit variant, copied from gf2x_mul_tc3w, see the comments in gf2x_mul_tc3w. Assume all parameters are 128-bit aligned. */ static void gf2x_mul_tc3x_internal (__m128i *c, const __m128i *a, const __m128i *b, long n, __m128i *stk) { assert ((((uintptr_t) c) % 16) == 0); assert ((((uintptr_t) a) % 16) == 0); assert ((((uintptr_t) b) % 16) == 0); assert ((((uintptr_t) stk) % 16) == 0); long k = (n + 2) / 3; // size of a0, a1, b0, b1 long r = n - 2*k; // size of a2, b2 long d = (r < k) ? 1 : 0; // 1 if r < k, 0 otherwise long kd = k - d; long k2 = 2*(k+2); // Size of 4 temporary arrays const __m128i *a0 = a; // Aliases for three parts of a const __m128i *a1 = a + k; const __m128i *a2 = a + 2*k; const __m128i *b0 = b; // Ditto for b const __m128i *b1 = b + k; const __m128i *b2 = b + 2*k; __m128i *W0 = c; // Overlap W0 (size 2*k) with c __m128i *W1 = stk; __m128i *W2 = c + 2*k; // Overlap W2 with c + 2*k ... __m128i *W3 = W1 + k2; __m128i *W4 = W3 + k2; // But not W4 as W2 too large __m128i *W5 = W4 + k2; // W5 is synonymous with W3 in // Bodrato's mul-tc3.c stk += 4*k2; // 4 temporaries of size k2 long j; __m128i s; // W0[0] = W4[0] = 0; __m128i zero = _mm_set_epi32 (0, 0, 0, 0); W0[0] = W4[0] = zero; W0[1] = a1[0]; W4[1] = b1[0]; // No a2, b2 here W5[0] = a0[0] ^ a1[0] ^ a2[0]; W2[0] = b0[0] ^ b1[0] ^ b2[0]; W5[1] = a0[1] ^ a1[1] ^ a2[1]; W2[1] = b0[1] ^ b1[1] ^ b2[1]; for (j = 2; j < r; j++) // Next r-1 iterations { // This is the usual case W0[j] = a1[j-1] ^ a2[j-2]; // Size(a1) = Size(b1) = k W4[j] = b1[j-1] ^ b2[j-2]; W5[j] = a0[j] ^ a1[j] ^ a2[j]; // Size(a2) = Size(b2) = r W2[j] = b0[j] ^ b1[j] ^ b2[j]; } /* the following loop runs at most twice, since k <= r + 2 */ for (; j < k; j++) { W0[j] = a1[j-1] ^ a2[j-2]; W4[j] = b1[j-1] ^ b2[j-2]; W5[j] = a0[j] ^ a1[j]; W2[j] = b0[j] ^ b1[j]; } W0[k] = a1[k-1] ^ ((k-2 < r) ? a2[k-2] : zero); W4[k] = b1[k-1] ^ ((k-2 < r) ? b2[k-2] : zero); W0[k+1] = (k-1 < r) ? a2[k-1] : zero; W4[k+1] = (k-1 < r) ? b2[k-1] : zero; gf2x_mul_toom ((unsigned long*) W1, (unsigned long*) W2, (unsigned long*) W5, 2 * k, (unsigned long*) stk); for (j = 0; j < k; j++) // First k iterations { W5[j] ^= W0[j]; W2[j] ^= W4[j]; W0[j] ^= a0[j]; W4[j] ^= b0[j]; } for (; j < kd+2; j++) // Last 2-d iterations { W5[j] = W0[j]; // Size(W5) := kd+2 W2[j] = W4[j]; // Size(W2) := kd+2 } gf2x_mul_toom ((unsigned long*) W3, (unsigned long*) W2, (unsigned long*) W5, 2 * (kd + 2), (unsigned long*) stk); gf2x_mul_toom ((unsigned long*) W2, (unsigned long*) W0, (unsigned long*) W4, 2 * (kd + 2), (unsigned long*) stk); gf2x_mul_toom ((unsigned long*) W0, (unsigned long*) a0, (unsigned long*) b0, 2 * k, (unsigned long*) stk); gf2x_mul_toom ((unsigned long*) W4, (unsigned long*) a2, (unsigned long*) b2, 2 * r, (unsigned long*) stk); for (j = 0; j < 2*k; j++) { // First 2*k iterations W3[j] ^= W2[j]; // Size(W0) = 2*k W2[j] ^= W0[j]; // other sizes 2*kd + 4 } for (; j < 2*kd+4; j++) W3[j] ^= W2[j]; // Last 4 - 2*d iterations for (j = 0; j < 2*kd + 3; j++) W2[j] = W2[j+1] ^ W3[j]; W2[j] = W3[j]; // Size(W2) := 2*kd + 4 for (j = 0, s = zero; j < 3; j++) { s ^= W2[j] ^ W4[j]; W2[j] = s; // first 3 iterations special } for (; j < 2*r; j++) { s ^= W2[j] ^ W4[j] ^ W4[j-3]; // next 2r-3 are usual case W2[j] = s; } for (; j < 2*r+3; j++) { s ^= W2[j] ^ W4[j-3]; // next 3 are special W2[j] = s; } for (; j < 2*kd+4; j++) { s ^= W2[j]; // last (k-r-d) == 0 or 1 W2[j] = s; // Size(W2) = 2*kd + 3 } for (long j = 0; j < 2*k; j++) { s = W0[j] ^ W1[j]; W1[j] = s; // Size(W0) = Size(W1) = 2*k W3[j] ^= s; // Size(W3) = 2*kd + 4 > 2*k } for (j = 0, s = zero; j < 2*kd + 3; j++) { s ^= W3[j+1]; W3[j] = s; } W3[j] = zero; // < Size(W2) == 2*kd + 4 for (j = 0; j < 2*r; j++) { // Usual case s = W2[j]; W1[j] ^= s ^ W4[j]; W2[j] = s ^ W3[j]; } for (; j < 2*k; j++) { // Next 2*(k-r) iterations s = W2[j]; W1[j] ^= s; // No W4[j] here W2[j] = s ^ W3[j]; } for (; j < 2*kd + 2; j++) { // Next 2*(1-d) iterations s = W2[j]; W1[j] = s; // Extending size of W1 W2[j] = s ^ W3[j]; } for (; j < 2*kd + 4; j++) // Last 2 iterations W1[j] = W2[j]; // Size(W1) := 2*kd + 4 // Size(W2) = 2*kd + 4 for (j = 0; j < 4 - 2*d; j++) // 4 - 2*d words of W2 c[j+4*k] ^= W4[j]; // overlap the W4 region for (; j < 2*r; j++) // Copy rest of W4 c[j+4*k] = W4[j]; // Here c was undefined for (long j = 0; j < 2*kd + 4; j++) c[j+k] ^= W1[j]; for (long j = 0; j < 2*kd + 2; j++) c[j+3*k] ^= W3[j]; } /* wrapper for gf2x_mul_tc3x_internal */ void gf2x_mul_tc3x (unsigned long *c, const unsigned long *a, const unsigned long *b, long n, unsigned long *stk) { unsigned long *cc, *aa, *bb; /* ensure stk is 128-bit aligned */ if ((uintptr_t) stk % 16) stk ++; if (n & 1) /* n is odd */ { aa = alloca ((4 * n + 5) * sizeof (unsigned long)); if (((uintptr_t) aa) % 16) aa ++; /* now aa is 128-bit aligned */ memcpy (aa, a, n * sizeof(unsigned long)); aa[n] = 0; bb = aa + n + 1; memcpy (bb, b, n * sizeof(unsigned long)); bb[n] = 0; cc = bb + n + 1; gf2x_mul_tc3x_internal ((__m128i*) cc, (__m128i*) aa, (__m128i*) bb, (n + 1) >> 1, (__m128i*) stk); memcpy (c, cc, 2 * n * sizeof(unsigned long)); } else /* n is even */ { if (((uintptr_t) a % 16) == 0) aa = (unsigned long*) a; else { aa = alloca ((n + 1) * sizeof (unsigned long)); if (((uintptr_t) aa) % 16) aa ++; memcpy (aa, a, n * sizeof(unsigned long)); } if (((uintptr_t) b % 16) == 0) bb = (unsigned long*) b; else { bb = alloca ((n + 1) * sizeof (unsigned long)); if ((uintptr_t) bb % 16) bb ++; memcpy (bb, b, n * sizeof(unsigned long)); } if (((uintptr_t) c % 16) == 0) cc = c; else { cc = alloca ((2 * n + 1) * sizeof (unsigned long)); if ((uintptr_t) cc % 16) cc ++; } gf2x_mul_tc3x_internal ((__m128i*) cc, (__m128i*) aa, (__m128i*) bb, n >> 1, (__m128i*) stk); if (cc != c) memcpy (c, cc, 2 * n * sizeof(unsigned long)); } } #endif /* HAVE_KARAX */ /******************************************************************** * Below this line, experimental code * (C) 2007 Marco Bodrato * Modified by Paul Zimmermann, April 2007. * This code is released under the GPL 2.0 license, or any later version. * * Reference: http://bodrato.it/papers/#WAIFI2007 * * "Towards Optimal Toom-Cook Multiplication for Univariate and * Multivariate Polynomials in Characteristic 2 and 0." by Marco * BODRATO; in C.Carlet and B.Sunar, editors, "WAIFI'07 proceedings", * LNCS 4547, pp. 119-136. Springer, Madrid, Spain, June 21-22, 2007. */ #if (GF2X_MUL_TOOM4_THRESHOLD < 30) #error "GF2X_MUL_TOOM4_THRESHOLD should be at least 30" #endif /* c <- x * a + x^2 * b, return carry out */ static unsigned long AddLsh1Lsh2(unsigned long * c, const unsigned long * a, const unsigned long * b, long n) { unsigned long cy = 0UL, t; long i; for (i = 0; i < n; i++) { t = (a[i] << 1) ^ ((b[i] << 2) | cy); cy = (a[i] >> (GF2X_WORDSIZE - 1)) ^ (b[i] >> (GF2X_WORDSIZE - 2)); c[i] = t; } return cy; } /* c <- a + x^2 * b, return carry out */ static unsigned long AddLsh2(unsigned long * c, const unsigned long * a, const unsigned long * b, long n) { unsigned long cy = 0UL, t; long i; for (i = 0; i < n; i++) { t = a[i] ^ ((b[i] << 2) | cy); cy = b[i] >> (GF2X_WORDSIZE - 2); c[i] = t; } return cy; } /* c <- a + x^6 * b, return carry out */ static unsigned long AddLsh6(unsigned long * c, const unsigned long * a, const unsigned long * b, long n) { unsigned long cy = 0UL, t; long i; for (i = 0; i < n; i++) { t = a[i] ^ ((b[i] << 6) | cy); cy = b[i] >> (GF2X_WORDSIZE - 6); c[i] = t; } return cy; } /* let c = q*(x+x^4) + X^n*r with X = x^GF2X_WORDSIZE and deg(r) < 1 then c <- q, returns r. */ static unsigned long DivExactD1(unsigned long * c, long n) { unsigned long t = 0; long i; for (i = 0; i < n; i++) { t ^= (c[i] >> 1) | ((i + 1 < n) ? (c[i + 1] << (GF2X_WORDSIZE - 1)) : 0); t ^= t << 3 ^ t << 6; t ^= t << 9 ^ t << 18; t ^= t << 27 #if (GF2X_WORDSIZE == 64) ^ t << 54 #elif (GF2X_WORDSIZE != 32) #error "GF2X_WORDSIZE should be 32 or 64" #endif ; c[i] = t; t >>= (GF2X_WORDSIZE - 3); } return t; } /* let c = q*(x^2+x^4) + X^n*r with X = x^GF2X_WORDSIZE and deg(r) < 1 then c <- q, returns r. */ static unsigned long DivExactD2(unsigned long * c, long n) { /* c <- c/x^2 */ unsigned long cy = 0, t; long i; for (i = n - 1; i >= 0; i--) { t = (c[i] >> 2) | (cy << (GF2X_WORDSIZE - 2)); cy = c[i]; /* no need to mask the low 2 bits, since they will disappear with the next cy << (GF2X_WORDSIZE - 2) */ c[i] = t; } return DivOnePlusX2(c, n); } #if 0 /* Same as DivExactD2, but with one pass only. However, does not seem to give a significant speedup, thus disabled for now. */ static unsigned long DivExactD2a(unsigned long * c, long n) { unsigned long t, ci; t = c[0]; t ^= t << 2; t ^= t << 4; t ^= t << 8; t ^= t << 16; #if (GF2X_WORDSIZE == 64) t ^= t << 32; #elif (GF2X_WORDSIZE != 32) #error "GF2X_WORDSIZE should be 32 or 64" #endif ci = t; t >>= (GF2X_WORDSIZE - 2); for (long i = 1; i < n; i++) { t ^= c[i]; t ^= t << 2; t ^= t << 4; t ^= t << 8; t ^= t << 16; #if (GF2X_WORDSIZE == 64) t ^= t << 32; #endif /* now t is the result of the division of c[i] by (1+x^2), and t >> (GF2X_WORDSIZE - 2) the corresponding carry */ c[i - 1] = (ci >> 2) | (t << (GF2X_WORDSIZE - 2)); ci = t; t >>= (GF2X_WORDSIZE - 2); } c[n - 1] = ci >> 2; return t; } #endif /* \\ gp-pari check code. \\ (C) 2007 Marco Bodrato \\ This code is released under the GPL 2.0 license, or any later version. U0=u0*Mod(1,2);U1=u1*Mod(1,2);U2=u2*Mod(1,2);U3=u3*Mod(1,2); V0=v0*Mod(1,2);V1=v1*Mod(1,2);V2=v2*Mod(1,2);V3=v3*Mod(1,2); U = U3*Y^3 + U2*Y^2*X + U1*Y*X^2 + U0*X^3 V = V3*Y^3 + V2*Y^2*X + V1*Y*X^2 + V0*X^3 \\ P(X,Y): P0=(1,0); P1=(x+1,1); P2=(x,1); P3=(1,1); P4=(1,x); P5=(1,x+1); P6=(0,1) \\Evaluation phase: 13*2 add, 7*2 shift, 2Smul; 7 mul (n) W1 = U0 + U1 + U2 + U3 ; W2 = V0 + V1 + V2 + V3 W0 = U1 +(U2 + U3*x)*x ; W6 = V1 +(V2 + V3*x)*x W4 = W1 +(W0 + U3*(x+1))*x; W3 = W2 +(W6 + V3*(x+1))*x W0 = W0*x + U0 ; W6 = W6*x + V0 W5 = W4 * W3 ; W4 = W0 * W6 W3 = W1 * W2 W0 =(U2 +(U1 + U0*x)*x)*x ; W6 =(V2 +(V1 + V0*x)*x)*x W1 = W1 + W0 + U0*(x^2+x) ; W2 = W2 + W6 + V0*(x^2+x) W0 = W0 + U3 ; W6 = W6 + V3 W1 = W1 * W2 ; W2 = W0 * W6 W6 = U3 * V3 ; W0 = U0 * V0 \\Interpolation: 22 add, 4 shift, 5 Smul, 4 div (2n) d1=(x^4+x)*Mod(1,2) ; d1== (x)^1*(x+1)^1*(x^2+x+1)^1 *Mod(1,2) d2=(x^4+x^2)*Mod(1,2) ; d2== (x)^2*(x+1)^2*(x^2+x+1)^0 *Mod(1,2) W1 = W1 + W2 + W0*(x^4+x^2+1) W5 =(W5 + W4 + W1 + W6*(x^4+x^2+1))/d1 W2 = W2 + W6 + W0*(x^6) W4 = W4 + W2 + W0 + W6*(x^6) W4 =(W4 + W5*(x^5+x))/d2 W3 = W3 + W0 + W6 W1 = W1 + W3 W2 = W2 +(W1 + W3*x)*x W3 = W3 + W4 + W5 W1 =(W1 + W3*(x^2+x))/d1 W5 = W5 + W1 W2 =(W2 + W5*(x^2+x))/d2 W4 = W4 + W2 \\Recomposition W = W6*Y^6 + W5*Y^5*X + W4*Y^4*X^2+ W3*Y^3*X^3+ W2*Y^2*X^4+ W1*Y*X^5 + W0*X^6 W == U*V Memory Usage: stk must have space for sp(n), where sp(n) = 6k+2 + sp(k+1) with k = ceil(n/4). */ void gf2x_mul_tc4(unsigned long * c, const unsigned long * a, const unsigned long * b, long n, unsigned long * stk) { long k = (n + 3) / 4; /* ceil(n/4) */ long r = n - 3 * k; unsigned long cy, cy1, cy2, cy3, cy4; unsigned long *W0 = c; unsigned long *W1 = stk; unsigned long *W2 = c + 2 * k; unsigned long *W3 = stk + 2 * k; unsigned long *W4 = c + 4 * k; unsigned long *W5 = stk + 4 * k; unsigned long *W6 = c + 6 * k; unsigned long *newstk = stk + 6 * k + 2; /* \\Evaluation phase: 13*2 add, 7*2 shift, 2Smul; 7 mul (n) */ /* W1 = U0 + U1 + U2 + U3 ; W2 = V0 + V1 + V2 + V3 */ Add(W1, a, a + 3 * k, r); Add1(W1 + r, a + r, k - r, 0); Add3(W1, a + k, a + 2 * k, k); /* U0 + U1 + U2 + U3 */ Add(W2 + 2, b, b + 3 * k, r); Add1(W2 + r + 2, b + r, k - r, 0); Add3(W2 + 2, b + k, b + 2 * k, k); /* V0 + V1 + V2 + V3 */ /* Add (W1, a, a + k, k); */ /* Add (W1, W1, a + 2 * k, k); */ /* Add (W1, W1, a + 3 * k, r); /\* U0 + U1 + U2 + U3 *\/ */ /* Add (W2+2, b, b + k, k); */ /* Add (W2+2,W2+2, b + 2 * k, k); */ /* Add (W2+2,W2+2, b + 3 * k, r); /\* V0 + V1 + V2 + V3 *\/ */ /* W0 = U1 +(U2 + U3*x)*x ; W6 = V1 +(V2 + V3*x)*x */ cy = AddLsh1(W0, a + 2 * k, a + 3 * k, r); /* U2 + x U3 */ cy = Add1(W0 + r, a + 2 * k + r, k - r, cy); W0[k] = (cy << 1) ^ AddLsh1(W0, a + k, W0, k); /* U1+x U2 + x^2 U3 */ cy = AddLsh1(W6 + 2, b + 2 * k, b + 3 * k, r); /* V2 + x V3 */ cy = Add1(W6 + 2 + r, b + 2 * k + r, k - r, cy); W6[k + 2] = (cy << 1) ^ AddLsh1(W6 + 2, b + k, W6 + 2, k); /* V1+x V2 + x^2 V3 */ /* since we use W6[k+2], and we have space for 2r words in W6, we need k+3 <= 2*r, which requires n>=30. */ /* W4 = W1 +(W0 + U3*(x+1))*x; W3 = W2 +(W6 + V3*(x+1))*x */ cy = AddLsh1(W4 + 2, W0, a + 3 * k, r); /* W0 + x U3 */ cy = Add1(W4 + 2 + r, W0 + r, k + 1 - r, cy); /* cy == 0 */ ASSERT(cy == 0); Add(W4 + 2, W4 + 2, a + 3 * k, r); /* W0 + x U3 + U3 */ W4[k + 2] = (W4[k + 2] << 1) ^ AddLsh1(W4 + 2, W1, W4 + 2, k); /* W1+x(W0 +(x+1) U3) */ cy = AddLsh1(W3 + 2, W6 + 2, b + 3 * k, r); /* W6 + x V3 */ cy = Add1(W3 + 2 + r, W6 + 2 + r, k + 1 - r, cy); /* cy == 0 */ Add(W3 + 2, W3 + 2, b + 3 * k, r); /* W6 + x V3 + V3 */ W3[k + 2] = (W3[k + 2] << 1) ^ AddLsh1(W3 + 2, W2 + 2, W3 + 2, k); /* W2+x(W6 + (x+1) V3) */ /* W0 = W0*x + U0 ; W6 = W6*x + V0 */ W0[k] = (W0[k] << 1) ^ AddLsh1(W0, a, W0, k); /* U0+x W0 */ W6[k + 2] = (W6[k + 2] << 1) ^ AddLsh1(W6 + 2, b, W6 + 2, k); /* V0+x W6 */ /* W5 = W4 * W3 ; W4 = W0 * W6 */ gf2x_mul_toom(W5, W4 + 2, W3 + 2, k + 1, newstk); /* W5 : 2*k+1 */ gf2x_mul_toom(W4, W0, W6 + 2, k + 1, newstk); /* W4 : 2*k+1 */ cy4 = W6[0]; /* Take care of overlapping byte. */ /* W3 = W1 * W2 */ gf2x_mul_toom(W3, W1, W2 + 2, k, newstk); /* W3 : 2*k */ /* W0 =(U2 +(U1 + U0*x)*x)*x ; W6 =(V2 +(V1 + V0*x)*x)*x */ cy = AddLsh1(W0, a + 1 * k, a + 0 * k, k); /* U1 + x U0 */ W0[k] = (cy << 2) ^ AddLsh1Lsh2(W0, a + 2 * k, W0, k); /* U2+x U1 + x^2 U0 */ cy = AddLsh1(W6 + 2, b + 1 * k, b + 0 * k, k); /* V1 + x V0 */ W6[k + 2] = (cy << 2) ^ AddLsh1Lsh2(W6 + 2, b + 2 * k, W6 + 2, k); /* V2+x V1 + x^2 V0 */ /* W1 = W1 + W0 + U0*(x^2+x) ; W2 = W2 + W6 + V0*(x^2+x) */ W1[k] = gf2x_addmul_1_n(W1, W1, a, k, 4 + 2); Add(W0 + k + 1, W1, W0, k + 1); W2[k + 2] = gf2x_addmul_1_n(W2 + 2, W2 + 2, b, k, 4 + 2); Add(W2 + 2, W2 + 2, W6 + 2, k + 1); /* W0 = W0 + U3 ; W6 = W6 + V3 */ Add(W0, W0, a + 3 * k, r); /* + U3 */ Add(W6 + 2, W6 + 2, b + 3 * k, r); /* + V3 */ /* W1 = W1 * W2 ; W2 = W0 * W6 */ cy = W3[0]; cy2 = W3[1]; /* Take care of overlapping byte. */ gf2x_mul_toom(W1, W0 + k + 1, W2 + 2, k + 1, newstk); /* W1 : 2*k+1 */ cy1 = W3[0]; W3[0] = cy; W3[1] = cy2; cy = W4[0]; cy2 = W4[1]; /* Take care of overlapping byte. */ gf2x_mul_toom(W2, W0, W6 + 2, k + 1, newstk); /* W2 : 2*k+1 */ W4[1] = cy2; cy2 = W4[0]; W4[0] = cy; /* W6 = U3 * V3 ; W0 = U0 * V0 */ gf2x_mul_toom(W0, a, b, k, newstk); /* W0 : 2*k */ gf2x_mul_toom(W6, a + 3 * k, b + 3 * k, r, newstk); /* W6 : 2*r */ /* \\Interpolation: 22 add, 4 shift, 5 Smul, 4 div (2n) */ /* d1=(x^4+x)*Mod(1,2) ; d1== (x)^1*(x+1)^1*(x^2+x+1)^1 *Mod(1,2) */ /* d2=(x^4+x^2)*Mod(1,2) ; d2== (x)^2*(x+1)^2*(x^2+x+1)^0 *Mod(1,2) */ /* W1 = W1 + W2 + W0*(x^4+x^2+1) */ Add(W1, W1, W2, 2 * k); cy1 ^= cy2 ^ gf2x_addmul_1_n(W1, W1, W0, 2 * k, 16 + 4 + 1); /* W5 =(W5 + W4 + W1 + W6*(x^4+x^2+1))/d1 */ Add3(W5, W4, W1, 2 * k); W5[2 * k] ^= cy1 ^ cy4; W5[2 * r] ^= gf2x_addmul_1_n(W5, W5, W6, 2 * r, 16 + 4 + 1); DivExactD1(W5, 2 * k + 1); /* W2 = W2 + W6 + W0*(x^6) */ Add(W2, W2, W6, 2 * r); cy2 ^= AddLsh6(W2, W2, W0, 2 * k); /* W4 = W4 + W2 + W0 + W6*(x^6) */ Add3(W4, W2, W0, 2 * k); cy3 = AddLsh6(W4, W4, W6, 2 * r); cy = W6[0]; /* save W6[0]=W4[2k]: we cannot do it before the AddLsh6 call because W6 is used as input */ W6[0] = cy4 ^ cy2; W4[2 * r] ^= cy3; /* must come after W6[0] = cy4 in case r=k */ /* W4 =(W4 + W5*(x^5+x))/d2 */ gf2x_addmul_1_n(W4, W4, W5, 2 * k + 1, 32 + 2); DivExactD2(W4, 2 * k + 1); W6[0] = cy; /* W3 = W3 + W0 + W6 */ Add3(W3, W0, W6, 2 * r); if (r != k) Add(W3 + 2 * r, W3 + 2 * r, W0 + 2 * r, 2 * (k - r)); /* warning: 2r instead of r */ /* W1 = W1 + W3 */ Add(W1, W1, W3, 2 * k); /* W2 = W2 +(W1 + W3*x)*x */ cy2 ^= AddLsh1(W2, W2, W1, 2 * k) ^ AddLsh2(W2, W2, W3, 2 * k) ^ (cy1 << 1); /* W3 = W3 + W4 + W5 */ Add3(W3, W4, W5, 2 * k); /* W1 =(W1 + W3*(x^2+x))/d1 */ cy = W3[0]; cy1 ^= gf2x_addmul_1_n(W1, W1, W3, 2 * k, 4 + 2); W3[0] = cy1; DivExactD1(W1, 2 * k + 1); W3[0] = cy; /* W5 = W5 + W1 */ Add(W5, W5, W1, 2 * k); /* W2 =(W2 + W5*(x^2+x))/d2 */ cy = W4[0]; W4[0] = cy2 ^ gf2x_addmul_1_n(W2, W2, W5, 2 * k, 4 + 2); DivExactD2(W2, 2 * k + 1); W4[0] = cy; /* W4 = W4 + W2 */ Add(W4, W4, W2, 2 * k); /* \\Recomposition */ /* W = W6*Y^6 + W5*Y^5 + W4*Y^4+ W3*Y^3+ W2*Y^2+ W1*Y + W0 */ Add(c + k, c + k, W1, 6 * k); } gf2x-1.2/BUGS0000644000327606072450000000015613124746451007657 00000000000000 See the official bug tracker here: https://gforge.inria.fr/tracker/?atid=6979&group_id=1874&func=browse gf2x-1.2/already_tuned/0000755000327606072450000000000012725540356012074 500000000000000gf2x-1.2/already_tuned/x86_64_nosse/0000755000327606072450000000000012725540356014241 500000000000000gf2x-1.2/already_tuned/x86_64_nosse/gf2x-thresholds.h0000644000327606072450000003567012725540356017370 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on tiramisu.loria.fr on Tue Sep 14 09:31:28 2010" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 8000000 run on tiramisu.loria.fr on Tue Sep 14 09:38:49 2010 ; based on lt-tunetoom -s 1.05 2048 2048 run on tiramisu.loria.fr on Tue Sep 14 09:31:28 2010" #define GF2X_WORDSIZE 64 /* Notes on tiramisu.loria.fr: * * Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz */ #define GF2X_STORAGE_CLASS_mul1 static inline #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static inline #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 156 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1949 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 1276 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, \ 0, 0, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, \ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 1736, -81 }, { 1771, 1 }, { 1919, 243 }, \ { 1958, 1 }, { 2307, -81 }, { 2354, 1 }, { 2402, 243 }, \ { 2451, 1 }, { 2552, 243 }, { 2657, -243 }, { 3691, 243 }, \ { 3845, -243 }, { 6459, 729 }, { 6920, -243 }, { 7689, 729 }, \ { 8304, -243 }, { 9929, -729 }, { 22144, 2187 }, { 24912, -729 }, \ { 35983, 2187 }, { 37367, -729 }, { 44287, -2187 }, { 49823, 2187 }, \ { 62279, -2187 }, { 99646, 6561 }, { 112101, -2187 }, { 199291, -6561 }, \ { 224202, -2187 }, { 298936, 6561 }, { 336303, -6561 }, { 448404, 6561 }, \ { 560505, -6561 }, { 896807, 19683 }, { 1008908, -6561 }, { 1569412, -19683 }, \ { 2017816, -6561 }, { 2690421, 19683 }, { 3026723, -19683 }, { 4035631, 19683 }, \ { 5044538, -19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul1.h0000644000327606072450000001633712725540356016150 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 64 4. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul2.h0000644000327606072450000000352412725540356016143 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL2_H_ #define GF2X_MUL2_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul2 void gf2x_mul2(unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long t; unsigned long u[2]; gf2x_mul1 (c, a[0], b[0]); gf2x_mul1 (c+2, a[1], b[1]); t = c[1]^c[2]; gf2x_mul1 (u, a[0]^a[1], b[0]^b[1]); c[1] = c[0]^u[0]^t; c[2] = c[3]^u[1]^t; } #endif /* GF2X_MUL2_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul3.h0000644000327606072450000000377312725540356016152 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL3_H_ #define GF2X_MUL3_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* specialized Karatsuba */ GF2X_STORAGE_CLASS_mul3 void gf2x_mul3 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[2], bb[2], ab[4], c24, c35; gf2x_mul1 (c + 4, a[2], b[2]); gf2x_mul2 (c, a, b); aa[0] = a[0] ^ a[2]; aa[1] = a[1]; bb[0] = b[0] ^ b[2]; bb[1] = b[1]; c24 = c[2] ^ c[4]; c35 = c[3] ^ c[5]; gf2x_mul2 (ab, aa, bb); c[2] = ab[0] ^ c[0] ^ c24; c[3] = ab[1] ^ c[1] ^ c35; c[4] = ab[2] ^ c24; c[5] = ab[3] ^ c35; } #endif /* GF2X_MUL3_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul4.h0000644000327606072450000000421712725540356016145 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL4_H_ #define GF2X_MUL4_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* specialized Karatsuba */ GF2X_STORAGE_CLASS_mul4 void gf2x_mul4 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[2], bb[2], ab[4]; unsigned long lo[4], hi[4]; gf2x_mul2 (lo, a, b); gf2x_mul2 (hi, a + 2, b + 2); aa[0] = a[0] ^ a[2]; aa[1] = a[1] ^ a[3]; bb[0] = b[0] ^ b[2]; bb[1] = b[1] ^ b[3]; unsigned long c24 = lo[2] ^ hi[0]; unsigned long c35 = lo[3] ^ hi[1]; gf2x_mul2 (ab, aa, bb); c[0] = lo[0]; c[1] = lo[1]; c[2] = ab[0] ^ lo[0] ^ c24; c[3] = ab[1] ^ lo[1] ^ c35; c[4] = ab[2] ^ hi[2] ^ c24; c[5] = ab[3] ^ hi[3] ^ c35; c[6] = hi[2]; c[7] = hi[3]; } #endif /* GF2X_MUL4_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul5.h0000644000327606072450000000510612725540356016144 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[6], bb[6]; unsigned long p0[4], p1[4], p2[2]; unsigned long pp0[4], pp1[4], pp2[4]; aa[0] = a[2]^a[4]; aa[1] = a[3]; aa[2] = a[0]^a[4]; aa[3] = a[1]; aa[4] = a[0]^a[2]; aa[5] = a[1]^a[3]; bb[0] = b[2]^b[4]; bb[1] = b[3]; bb[2] = b[0]^b[4]; bb[3] = b[1]; bb[4] = b[0]^b[2]; bb[5] = b[1]^b[3]; gf2x_mul2 (p0, a, b); gf2x_mul2 (p1, a+2, b+2); gf2x_mul1 (p2, a[4], b[4]); gf2x_mul2 (pp0, aa, bb); gf2x_mul2 (pp1, aa+2, bb+2); gf2x_mul2 (pp2, aa+4, bb+4); c[0] = p0[0]; c[1] = p0[1]; c[2] = p0[0]^p1[0]^pp2[0] ^ p0[2]; c[3] = p0[1]^p1[1]^pp2[1] ^ p0[3]; c[4] = p0[0]^p1[0]^p2[0]^pp1[0] ^ p0[2]^p1[2]^pp2[2]; c[5] = p0[1]^p1[1]^p2[1]^pp1[1] ^ p0[3]^p1[3]^pp2[3]; c[6] = pp0[0]^p1[0]^p2[0] ^ p0[2]^p1[2]^pp1[2]; c[7] = pp0[1]^p1[1]^p2[1] ^ p0[3]^p1[3]^pp1[3]; c[8] = p2[0] ^ pp0[2]^p1[2]; c[9] = p2[1] ^ pp0[3]^p1[3]; } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul6.h0000644000327606072450000000531012725540356016142 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL6_H_ #define GF2X_MUL6_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul6 void gf2x_mul6 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[6], bb[6]; unsigned long p0[4], p1[4], p2[4]; unsigned long pp0[4], pp1[4], pp2[4]; aa[0] = a[2]^a[4]; aa[1] = a[3]^a[5]; aa[2] = a[0]^a[4]; aa[3] = a[1]^a[5]; aa[4] = a[0]^a[2]; aa[5] = a[1]^a[3]; bb[0] = b[2]^b[4]; bb[1] = b[3]^b[5]; bb[2] = b[0]^b[4]; bb[3] = b[1]^b[5]; bb[4] = b[0]^b[2]; bb[5] = b[1]^b[3]; gf2x_mul2 (p0, a, b); gf2x_mul2 (p1, a+2, b+2); gf2x_mul2 (p2, a+4, b+4); gf2x_mul2 (pp0, aa, bb); gf2x_mul2 (pp1, aa+2, bb+2); gf2x_mul2 (pp2, aa+4, bb+4); c[0] = p0[0]; c[1] = p0[1]; c[2] = p0[0]^p1[0]^pp2[0] ^ p0[2]; c[3] = p0[1]^p1[1]^pp2[1] ^ p0[3]; c[4] = p0[0]^p1[0]^p2[0]^pp1[0] ^ p0[2]^p1[2]^pp2[2]; c[5] = p0[1]^p1[1]^p2[1]^pp1[1] ^ p0[3]^p1[3]^pp2[3]; c[6] = pp0[0]^p1[0]^p2[0] ^ p0[2]^p1[2]^p2[2]^pp1[2]; c[7] = pp0[1]^p1[1]^p2[1] ^ p0[3]^p1[3]^p2[3]^pp1[3]; c[8] = p2[0] ^ pp0[2]^p1[2]^p2[2]; c[9] = p2[1] ^ pp0[3]^p1[3]^p2[3]; c[10] = p2[2]; c[11] = p2[3]; } #endif /* GF2X_MUL6_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul7.h0000644000327606072450000000455312725540356016153 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL7_H_ #define GF2X_MUL7_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* specialized Karatsuba, RPB 20070518 */ /* slightly faster on bogong than version with loops */ GF2X_STORAGE_CLASS_mul7 void gf2x_mul7 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[4], bb[4], ab[8], ab4, ab5, ab6, ab7; gf2x_mul3 (c+8, a+4, b+4); gf2x_mul4 (c, a, b); aa[0] = a[0] ^ a[4]; aa[1] = a[1] ^ a[5]; aa[2] = a[2] ^ a[6]; aa[3] = a[3]; bb[0] = b[0] ^ b[4]; bb[1] = b[1] ^ b[5]; bb[2] = b[2] ^ b[6]; bb[3] = b[3]; gf2x_mul4 (ab, aa, bb); ab4 = ab[4] ^ c[4]; ab5 = ab[5] ^ c[5]; ab6 = ab[6] ^ c[6]; ab7 = ab[7] ^ c[7]; c[4] ^= ab[0] ^ c[0] ^ c[8]; c[5] ^= ab[1] ^ c[1] ^ c[9]; c[6] ^= ab[2] ^ c[2] ^ c[10]; c[7] ^= ab[3] ^ c[3] ^ c[11]; c[8] ^= ab4 ^ c[12]; c[9] ^= ab5 ^ c[13]; c[10] ^= ab6; c[11] ^= ab7; } #endif /* GF2X_MUL7_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h0000644000327606072450000000475512725540356016160 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL8_H_ #define GF2X_MUL8_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* 3 calls to mul4, i.e., 27 multiplications */ GF2X_STORAGE_CLASS_mul8 void gf2x_mul8 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* specialized Karatsuba, RPB 20070518 */ /* slightly faster on bogong than version with loops */ /* this version uses minimal temporary storage (12 = 3*n/2 words) */ unsigned long aa[4], bb[4], cc[4]; gf2x_mul4 (c+8, a+4, b+4); gf2x_mul4 (c, a, b); cc[0] = c[4] ^ c[8]; cc[1] = c[5] ^ c[9]; cc[2] = c[6] ^ c[10]; cc[3] = c[7] ^ c[11]; aa[0] = a[0] ^ a[4]; aa[1] = a[1] ^ a[5]; aa[2] = a[2] ^ a[6]; aa[3] = a[3] ^ a[7]; bb[0] = b[0] ^ b[4]; bb[1] = b[1] ^ b[5]; bb[2] = b[2] ^ b[6]; bb[3] = b[3] ^ b[7]; gf2x_mul4 (c+4, aa, bb); c[4] ^= c[0] ^ cc[0]; c[5] ^= c[1] ^ cc[1]; c[6] ^= c[2] ^ cc[2]; c[7] ^= c[3] ^ cc[3]; c[8] ^= c[12] ^ cc[0]; c[9] ^= c[13] ^ cc[1]; c[10] ^= c[14] ^ cc[2]; c[11] ^= c[15] ^ cc[3]; } #endif /* GF2X_MUL8_H_ */ gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul9.h0000644000327606072450000000512512725540356016151 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL9_H_ #define GF2X_MUL9_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* 1 call to mul4 and 2 calls to mul5, i.e., 35 multiplications with mul5clk_c */ GF2X_STORAGE_CLASS_mul9 void gf2x_mul9 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* specialized Karatsuba, RPB 20070520 */ /* slightly faster on bogong than version with loops */ unsigned long aa[5], bb[5], ab[10], ab5, ab6, ab7, ab8, ab9; gf2x_mul4 (c+10, a+5, b+5); gf2x_mul5 (c, a, b); aa[0] = a[0] ^ a[5]; aa[1] = a[1] ^ a[6]; aa[2] = a[2] ^ a[7]; aa[3] = a[3] ^ a[8]; aa[4] = a[4]; bb[0] = b[0] ^ b[5]; bb[1] = b[1] ^ b[6]; bb[2] = b[2] ^ b[7]; bb[3] = b[3] ^ b[8]; bb[4] = b[4]; gf2x_mul5 (ab, aa, bb); ab5 = ab[5] ^ c[5]; ab6 = ab[6] ^ c[6]; ab7 = ab[7] ^ c[7]; ab8 = ab[8] ^ c[8]; ab9 = ab[9] ^ c[9]; c[5] ^= ab[0] ^ c[0] ^ c[10]; c[6] ^= ab[1] ^ c[1] ^ c[11]; c[7] ^= ab[2] ^ c[2] ^ c[12]; c[8] ^= ab[3] ^ c[3] ^ c[13]; c[9] ^= ab[4] ^ c[4] ^ c[14]; c[10] ^= ab5 ^ c[15]; c[11] ^= ab6 ^ c[16]; c[12] ^= ab7 ^ c[17]; c[13] ^= ab8; c[14] ^= ab9; } #endif /* GF2X_MUL9_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/0000755000327606072450000000000012725540356014406 500000000000000gf2x-1.2/already_tuned/x86_64_pclmul/gf2x-thresholds.h0000644000327606072450000007074312725540356017535 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 10000 10000 run on andouille on Fri Mar 9 11:46:24 2012" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.01 10000000 run on andouille on Fri Mar 9 11:56:12 2012 ; based on lt-tunetoom -s 1.05 10000 10000 run on andouille on Fri Mar 9 11:46:24 2012" #define GF2X_WORDSIZE 64 /* Notes on merguez.loria.fr: * * Intel(R) Xeon(R) CPU L5640 @ 2.27GHz */ #define GF2X_STORAGE_CLASS_mul1 static inline #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static inline #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 21 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 9948 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 346 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 5683 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 51 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 1880 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 10000 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 4344, -81 }, { 4388, 1 }, { 5844, -243 }, \ { 5998, 1 }, { 6920, -243 }, { 15532, 729 }, { 16608, -243 }, \ { 17285, 729 }, { 17992, -729 }, { 22144, -243 }, { 23528, -729 }, \ { 45671, 2187 }, { 49823, -729 }, { 60895, 2187 }, { 62279, -729 }, \ { 69199, -2187 }, { 74734, -729 }, { 88574, -2187 }, { 99646, 6561 }, \ { 112101, -2187 }, { 199291, -6561 }, { 224202, -2187 }, { 323847, 6561 }, \ { 336303, -2187 }, { 373670, -6561 }, { 448404, -2187 }, { 535593, 6561 }, \ { 560505, -6561 }, { 896807, 19683 }, { 1008908, -6561 }, { 1569412, -19683 }, \ { 2017816, -6561 }, { 2690421, 19683 }, { 3026723, -19683 }, { 4035631, 19683 }, \ { 5044538, -19683 }, { 8071261, 59049 }, { 9080168, -19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul1.h0000644000327606072450000001113312725540356016302 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { __m128i aa = _gf2x_mm_setr_epi64(a, 0); __m128i bb = _gf2x_mm_setr_epi64(b, 0); _mm_storeu_si128((__m128i*)c, _mm_clmulepi64_si128(aa, bb, 0)); } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; typedef union { __m128i s; unsigned long x[2]; } __m128i_proxy; __m128i y = _gf2x_mm_set1_epi64(a); __m128i x; __m128i_proxy cc; // do two at a time for (i = 0; i + 2 < sb; i += 2) { x = _gf2x_mm_setr_epi64(bp[i], bp[i+1]); cc.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) cp[i] = cc.x[0]; else cp[i] ^= cc.x[0]; cp[i+1] = cc.x[1]; cc.s = _mm_clmulepi64_si128(x, y, 1); cp[i+1] ^= cc.x[0]; cp[i+2] = cc.x[1]; } // last is different, to handle carry out unsigned long cy; if (i == sb - 2) { // case bp is even x = _gf2x_mm_setr_epi64(bp[i], bp[i+1]); cc.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) cp[i] = cc.x[0]; else cp[i] ^= cc.x[0]; cp[i+1] = cc.x[1]; cc.s = _mm_clmulepi64_si128(x, y, 1); cp[i+1] ^= cc.x[0]; cy = cc.x[1]; } else { //case bp is odd x = _gf2x_mm_setr_epi64(bp[i], 0); cc.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) cp[i] = cc.x[0]; else cp[i] ^= cc.x[0]; cy = cc.x[1]; } return cy; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; typedef union { __m128i s; unsigned long x[2]; } __m128i_proxy; __m128i y = _gf2x_mm_set1_epi64(a); __m128i x; __m128i_proxy dd; // do two at a time for (i = 0; i + 2 < sb; i += 2) { x = _gf2x_mm_setr_epi64(bp[i], bp[i+1]); dd.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) dp[i] = cp[i] ^ dd.x[0]; else dp[i] ^= dd.x[0]; dp[i+1] = cp[i+1] ^ dd.x[1]; dd.s = _mm_clmulepi64_si128(x, y, 1); dp[i+1] ^= dd.x[0]; dp[i+2] = cp[i+2] ^ dd.x[1]; } unsigned long cy; if (i == sb - 2) { // case bp is even x = _gf2x_mm_setr_epi64(bp[i], bp[i+1]); dd.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) dp[i] = cp[i] ^ dd.x[0]; else dp[i] ^= dd.x[0]; dp[i+1] = cp[i+1] ^ dd.x[1]; dd.s = _mm_clmulepi64_si128(x, y, 1); dp[i+1] ^= dd.x[0]; cy = dd.x[1]; } else { x = _gf2x_mm_setr_epi64(bp[i], 0); dd.s = _mm_clmulepi64_si128(x, y, 0); if (i == 0) dp[i] = cp[i] ^ dd.x[0]; else dp[i] ^= dd.x[0]; cy = dd.x[1]; } return cy; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul2.h0000644000327606072450000000514312725540356016307 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 128x128 -> 256 bit product using pclmulqdq instruction. */ #ifndef GF2X_MUL2_H_ #define GF2X_MUL2_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* Karatsuba with 3 multiplications */ GF2X_STORAGE_CLASS_mul2 void gf2x_mul2(unsigned long * t, unsigned long const * s1, unsigned long const * s2) { #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) __m128i ss1 = _mm_loadu_si128((__m128i *)s1); __m128i ss2 = _mm_loadu_si128((__m128i *)s2); __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1,0,3,2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1,0,3,2))); __m128i tk = PXOR(t00, PXOR(t11, _mm_clmulepi64_si128(ss1, ss2, 0))); /* mul2cl.c is essentially identical, just replaces srli and srli by * unpacklo and unpackhi */ _mm_storeu_si128((__m128i *)t, PXOR(t00, _mm_slli_si128(tk, 8))); _mm_storeu_si128((__m128i *)(t+2), PXOR(t11, _mm_srli_si128(tk, 8))); #undef PXOR } #endif /* GF2X_MUL2_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul3.h0000644000327606072450000000620412725540356016307 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL3_H_ #define GF2X_MUL3_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul3cl_mul1) (unsigned long a, unsigned long b) { __m128i aa = _gf2x_mm_setr_epi64(a, 0); __m128i bb = _gf2x_mm_setr_epi64(b, 0); return _mm_clmulepi64_si128(aa, bb, 0); } /* uses the variant of Karatsuba with 6 multiplications */ GF2X_STORAGE_CLASS_mul3 void gf2x_mul3 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[3], bb[3]; aa[0] = a[1]^a[2]; aa[1] = a[0]^a[2]; aa[2] = a[0]^a[1]; bb[0] = b[1]^b[2]; bb[1] = b[0]^b[2]; bb[2] = b[0]^b[1]; __m128i p0 = GF2X_FUNC(mul3cl_mul1)(a[0], b[0]); __m128i p1 = GF2X_FUNC(mul3cl_mul1)(a[1], b[1]); __m128i p2 = GF2X_FUNC(mul3cl_mul1)(a[2], b[2]); __m128i pp0 = GF2X_FUNC(mul3cl_mul1)(aa[0], bb[0]); __m128i pp1 = GF2X_FUNC(mul3cl_mul1)(aa[1], bb[1]); __m128i pp2 = GF2X_FUNC(mul3cl_mul1)(aa[2], bb[2]); #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) __m128i ce0 = p0; __m128i ce2 = PXOR(p0, PXOR(p1, PXOR(p2, pp1))); __m128i ce4 = p2; __m128i co1 = PXOR(p0, PXOR(p1, pp2)); __m128i co3 = PXOR(pp0, PXOR(p1, p2)); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR(ce2, PXOR(_mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8)))); _mm_storeu_si128((__m128i*)(c+4), PXOR(ce4, _mm_srli_si128(co3, 8))); #undef PXOR } #endif /* GF2X_MUL3_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul4.h0000644000327606072450000000632212725540356016311 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL4_H_ #define GF2X_MUL4_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PZERO _mm_setzero_si128() static inline void GF2X_FUNC(mul4clk_mul2)(__m128i * t, __m128i ss1, __m128i ss2) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1,0,3,2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1,0,3,2))); __m128i tk = PXOR(PXOR(t00, t11), _mm_clmulepi64_si128(ss1, ss2, 0)); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(t11, _mm_unpackhi_epi64(tk, PZERO)); } /* specialized Karatsuba with 3 calls to mul2, i.e., 9 multiplications */ GF2X_STORAGE_CLASS_mul4 void gf2x_mul4 (unsigned long *c, const unsigned long *a, const unsigned long *b) { __m128i ab[2]; __m128i lo[2], hi[2]; __m128i a0 = _mm_loadu_si128((__m128i*)a); __m128i a2 = _mm_loadu_si128((__m128i*)(a+2)); __m128i b0 = _mm_loadu_si128((__m128i*)b); __m128i b2 = _mm_loadu_si128((__m128i*)(b+2)); GF2X_FUNC(mul4clk_mul2)(lo, a0, b0); GF2X_FUNC(mul4clk_mul2)(hi, a2, b2); __m128i middle = PXOR(lo[1], hi[0]); GF2X_FUNC(mul4clk_mul2)(ab, PXOR(a0, a2), PXOR(b0, b2)); _mm_storeu_si128((__m128i*)(c + 0), lo[0]); _mm_storeu_si128((__m128i*)(c + 2), PXOR(ab[0], PXOR(lo[0], middle))); _mm_storeu_si128((__m128i*)(c + 4), PXOR(ab[1], PXOR(hi[1], middle))); _mm_storeu_si128((__m128i*)(c + 6), hi[1]); } #undef PXOR #undef PZERO #endif /* GF2X_MUL4_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul5.h0000644000327606072450000001134712725540356016315 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann, Nicolas Estibals (for this file) This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul5clk_c_mul1) (unsigned long a, unsigned long b) { return _mm_clmulepi64_si128(_gf2x_mm_setr_epi64(a,0), _gf2x_mm_setr_epi64(b,0), 0); } GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) /* Montgomery formulae with 13 multiplications, see Five, Six, and Seven-Term {K}aratsuba-Like Formulae, IEEE Transactions on Computers, volume 54, number 3, p. 362-369, 2005 */ unsigned long ta[3], tb[3]; ta[0] = a[0] ^ a[4] ; tb[0] = b[0] ^ b[4]; ta[1] = a[1] ^ a[2] ; tb[1] = b[1] ^ b[2]; ta[2] = a[3] ^ ta[0] ; tb[2] = b[3] ^ tb[0]; unsigned long pa[8], pb[8]; pa[0] = ta[1] ^ ta[2] ; pb[0] = tb[1] ^ tb[2]; pa[1] = a[2] ^ ta[2] ; pb[1] = b[2] ^ tb[2]; pa[2] = ta[0] ^ ta[1] ; pb[2] = tb[0] ^ tb[1]; pa[3] = a[1] ^ ta[2] ; pb[3] = b[1] ^ tb[2]; pa[4] = a[0] ^ a[2] ^ a[3] ; pb[4] = b[0] ^ b[2] ^ b[3]; pa[5] = a[4] ^ ta[1] ; pb[5] = b[4] ^ tb[1]; pa[6] = a[3] ^ a[4] ; pb[6] = b[3] ^ b[4]; pa[7] = a[0] ^ a[1] ; pb[7] = b[0] ^ b[1]; __m128i p0 = GF2X_FUNC(mul5clk_c_mul1)(pa[0], pb[0]); __m128i p2 = GF2X_FUNC(mul5clk_c_mul1)(pa[1], pb[1]); __m128i p4 = GF2X_FUNC(mul5clk_c_mul1)(pa[2], pb[2]); __m128i p6 = GF2X_FUNC(mul5clk_c_mul1)(pa[3], pb[3]); __m128i p8 = GF2X_FUNC(mul5clk_c_mul1)(pa[4], pb[4]); __m128i p10 = GF2X_FUNC(mul5clk_c_mul1)(pa[5], pb[5]); __m128i p12 = GF2X_FUNC(mul5clk_c_mul1)(pa[6], pb[6]); __m128i p14 = GF2X_FUNC(mul5clk_c_mul1)(pa[7], pb[7]); __m128i p16 = GF2X_FUNC(mul5clk_c_mul1)(ta[0], tb[0]); __m128i p18 = GF2X_FUNC(mul5clk_c_mul1)(a[4], b[4]); __m128i p20 = GF2X_FUNC(mul5clk_c_mul1)(a[3], b[3]); __m128i p22 = GF2X_FUNC(mul5clk_c_mul1)(a[1], b[1]); __m128i p24 = GF2X_FUNC(mul5clk_c_mul1)(a[0], b[0]); __m128i t0 = PXOR(p14, p24); __m128i t2 = PXOR(p12, p18); __m128i t4 = PXOR(p2, p16); __m128i t6 = PXOR(p0, p6); __m128i t8 = PXOR(p4, p16); __m128i t10 = PXOR(p10, t0); __m128i t12 = PXOR(p8, t2); __m128i ce0 = p24; __m128i ce2 = PXOR(p18, PXOR(t8, t10)); __m128i ce4 = PXOR(p0, PXOR(p20, PXOR(p22, PXOR(t10, t12)))); __m128i ce6 = PXOR(p24, PXOR(t4, t12)); __m128i ce8 = p18; __m128i co1 = PXOR(p22, t0); __m128i co3 = PXOR(t2, PXOR(t4, t6)); __m128i co5 = PXOR(t0, PXOR(t6, t8)); __m128i co7 = PXOR(p20, t2); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR(ce2, PXOR(_mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8)))); _mm_storeu_si128((__m128i*)(c+4), PXOR(ce4, PXOR(_mm_srli_si128(co3, 8), _mm_slli_si128(co5, 8)))); _mm_storeu_si128((__m128i*)(c+6), PXOR(ce6, PXOR(_mm_srli_si128(co5, 8), _mm_slli_si128(co7, 8)))); _mm_storeu_si128((__m128i*)(c+8), PXOR(ce8, _mm_srli_si128(co7, 8))); #undef PXOR } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul6.h0000644000327606072450000001036112725540356016311 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL6_H_ #define GF2X_MUL6_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ /* This specialized version avoids loads, and relies on the destination * being aligned, so that aligned stores are possible */ #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PZERO _mm_setzero_si128() static inline void GF2X_FUNC(mul6clk2_mul2)(__m128i * t, __m128i ss1, __m128i ss2) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1,0,3,2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1,0,3,2))); __m128i tk = PXOR(PXOR(t00, t11), _mm_clmulepi64_si128(ss1, ss2, 0)); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(t11, _mm_unpackhi_epi64(tk, PZERO)); } /* variant with 6 calls to mul2, i.e., 18 multiplications */ GF2X_STORAGE_CLASS_mul6 void gf2x_mul6 (unsigned long *c, const unsigned long *a, const unsigned long *b) { __m128i aa[3], bb[3]; __m128i p0[2], p1[2], p2[2]; __m128i pp0[2], pp1[2], pp2[2]; __m128i a0 = _mm_loadu_si128((__m128i*)(a)); __m128i a1 = _mm_loadu_si128((__m128i*)(a+2)); __m128i a2 = _mm_loadu_si128((__m128i*)(a+4)); __m128i b0 = _mm_loadu_si128((__m128i*)(b)); __m128i b1 = _mm_loadu_si128((__m128i*)(b+2)); __m128i b2 = _mm_loadu_si128((__m128i*)(b+4)); aa[0] = PXOR(a1, a2); aa[1] = PXOR(a0, a2); aa[2] = PXOR(a0, a1); bb[0] = PXOR(b1, b2); bb[1] = PXOR(b0, b2); bb[2] = PXOR(b0, b1); GF2X_FUNC(mul6clk2_mul2)(p0, a0, b0); GF2X_FUNC(mul6clk2_mul2)(p1, a1, b1); GF2X_FUNC(mul6clk2_mul2)(p2, a2, b2); GF2X_FUNC(mul6clk2_mul2)(pp0, aa[0], bb[0]); GF2X_FUNC(mul6clk2_mul2)(pp1, aa[1], bb[1]); GF2X_FUNC(mul6clk2_mul2)(pp2, aa[2], bb[2]); _mm_storeu_si128((__m128i*)(c + 0), p0[0]); _mm_storeu_si128((__m128i*)(c + 2), PXOR(PXOR3(p0[0], p1[0], pp2[0]) , p0[1])); _mm_storeu_si128((__m128i*)(c + 4), PXOR(PXOR4(p0[0], p1[0], p2[0], pp1[0]), PXOR3(p0[1], p1[1], pp2[1]))); _mm_storeu_si128((__m128i*)(c + 6), PXOR(PXOR3(pp0[0], p1[0], p2[0]) , PXOR4(p0[1], p1[1], p2[1], pp1[1]))); _mm_storeu_si128((__m128i*)(c + 8), PXOR(p2[0] , PXOR3(pp0[1], p1[1], p2[1]))); _mm_storeu_si128((__m128i*)(c + 10), p2[1]); } #undef PXOR #undef PXOR3 #undef PXOR4 #undef PZERO #endif /* GF2X_MUL6_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul7.h0000644000327606072450000001555612725540356016325 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann Nicolas Estibals (for this file) This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL7_H_ #define GF2X_MUL7_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul7cl_mul1) (unsigned long a, unsigned long b) { return _mm_clmulepi64_si128(_gf2x_mm_setr_epi64(a,0), _gf2x_mm_setr_epi64(b,0), 0); } /* variant with 22 multiplications */ GF2X_STORAGE_CLASS_mul7 void gf2x_mul7 (unsigned long *c, const unsigned long *a, const unsigned long *b) { #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PXOR5(op1, op2, op3, op4, op5) PXOR(op1, PXOR4(op2, op3, op4, op5)) #define PXOR6(op1, op2, op3, op4, op5, op6) PXOR(op1, PXOR5(op2, op3, op4, op5, op6)) #define PZERO _mm_setzero_si128() /* Montgomery formulae with 22 multiplications, see Five, Six, and Seven-Term {K}aratsuba-Like Formulae, IEEE Transactions on Computers, volume 54, number 3, p. 362-369, 2005 */ unsigned long ta[5], tb[5], pa[22], pb[22]; ta[0] = a[0] ^ a[4]; ta[1] = a[3] ^ a[5]; ta[2] = a[2] ^ a[6]; ta[3] = a[1] ^ ta[0]; ta[4] = ta[1] ^ ta[2]; pa[0] = a[6]; pa[1] = a[5]; pa[2] = a[5] ^ a[6]; pa[3] = a[4]; pa[4] = a[4] ^ a[6]; pa[5] = a[3]; pa[6] = ta[1]; pa[7] = a[2]; pa[8] = ta[2]; pa[9] = a[1]; pa[10]= a[1] ^ a[3]; pa[11]= a[1] ^ a[2] ^ a[4] ^ a[5]; pa[12]= a[1] ^ ta[4]; pa[13]= a[0]; pa[14]= ta[0]; pa[15]= a[0] ^ a[2]; pa[16]= a[0] ^ ta[4]; pa[17]= a[3] ^ ta[0] ^ ta[2]; pa[18]= a[0] ^ a[1]; pa[19]= a[3] ^ a[6] ^ ta[3]; pa[20]= ta[1] ^ ta[3]; pa[21]= ta[3] ^ ta[4]; tb[0] = b[0] ^ b[4]; tb[1] = b[3] ^ b[5]; tb[2] = b[2] ^ b[6]; tb[3] = b[1] ^ tb[0]; tb[4] = tb[1] ^ tb[2]; pb[0] = b[6]; pb[1] = b[5]; pb[2] = b[5] ^ b[6]; pb[3] = b[4]; pb[4] = b[4] ^ b[6]; pb[5] = b[3]; pb[6] = tb[1]; pb[7] = b[2]; pb[8] = tb[2]; pb[9] = b[1]; pb[10]= b[1] ^ b[3]; pb[11]= b[1] ^ b[2] ^ b[4] ^ b[5]; pb[12]= b[1] ^ tb[4]; pb[13]= b[0]; pb[14]= tb[0]; pb[15]= b[0] ^ b[2]; pb[16]= b[0] ^ tb[4]; pb[17]= b[3] ^ tb[0] ^ tb[2]; pb[18]= b[0] ^ b[1]; pb[19]= b[3] ^ b[6] ^ tb[3]; pb[20]= tb[1] ^ tb[3]; pb[21]= tb[3] ^ tb[4]; __m128i p[22]; p[0] = GF2X_FUNC(mul7cl_mul1)(pa[0], pb[0]); p[1] = GF2X_FUNC(mul7cl_mul1)(pa[1], pb[1]); p[2] = GF2X_FUNC(mul7cl_mul1)(pa[2], pb[2]); p[3] = GF2X_FUNC(mul7cl_mul1)(pa[3], pb[3]); p[4] = GF2X_FUNC(mul7cl_mul1)(pa[4], pb[4]); p[5] = GF2X_FUNC(mul7cl_mul1)(pa[5], pb[5]); p[6] = GF2X_FUNC(mul7cl_mul1)(pa[6], pb[6]); p[7] = GF2X_FUNC(mul7cl_mul1)(pa[7], pb[7]); p[8] = GF2X_FUNC(mul7cl_mul1)(pa[8], pb[8]); p[9] = GF2X_FUNC(mul7cl_mul1)(pa[9], pb[9]); p[10]= GF2X_FUNC(mul7cl_mul1)(pa[10], pb[10]); p[11]= GF2X_FUNC(mul7cl_mul1)(pa[11], pb[11]); p[12]= GF2X_FUNC(mul7cl_mul1)(pa[12], pb[12]); p[13]= GF2X_FUNC(mul7cl_mul1)(pa[13], pb[13]); p[14]= GF2X_FUNC(mul7cl_mul1)(pa[14], pb[14]); p[15]= GF2X_FUNC(mul7cl_mul1)(pa[15], pb[15]); p[16]= GF2X_FUNC(mul7cl_mul1)(pa[16], pb[16]); p[17]= GF2X_FUNC(mul7cl_mul1)(pa[17], pb[17]); p[18]= GF2X_FUNC(mul7cl_mul1)(pa[18], pb[18]); p[19]= GF2X_FUNC(mul7cl_mul1)(pa[19], pb[19]); p[20]= GF2X_FUNC(mul7cl_mul1)(pa[20], pb[20]); p[21]= GF2X_FUNC(mul7cl_mul1)(pa[21], pb[21]); __m128i t[13]; t[0] = PXOR(p[0], p[1]); t[1] = PXOR(p[9], p[13]); t[2] = PXOR(p[3], p[6]); t[3] = PXOR(p[7], p[10]); t[4] = PXOR(p[11], p[18]); t[5] = PXOR(p[4], t[3]); t[6] = PXOR(p[15], t[2]); t[7] = PXOR(p[20], t[5]); t[8] = PXOR(p[5], p[14]); t[9] = PXOR(p[2], p[17]); t[10] = PXOR(p[5], p[8]); t[11] = PXOR(p[21], t[6]); t[12] = PXOR(p[16], t[4]); __m128i cc[13]; cc[0] = p[13]; cc[2] = PXOR3(p[7], p[15], t[1]); cc[4] = PXOR4(p[3], t[1], t[3], t[8]); cc[6] = PXOR5(p[0], p[12], p[13], t[7], t[11]); cc[8] = PXOR4(p[7], t[0], t[2], t[10]); cc[10] = PXOR3(p[3], p[4], t[0]); cc[12] = p[0]; cc[1] = PXOR(p[18], t[1]); cc[3] = PXOR3(t[7], t[9], t[12]); cc[5] = PXOR6(p[2], p[11], p[19], t[1], t[10], t[11]); cc[7] = PXOR5(p[21], t[0], t[5], t[8], t[12]); cc[9] = PXOR5(p[12], p[19], t[4], t[6], t[9]); cc[11] = PXOR(p[2], t[0]); _mm_storeu_si128((__m128i*)(c), PXOR(cc[0] , _mm_slli_si128(cc[1], 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR(cc[2] , PXOR(_mm_srli_si128(cc[1], 8), _mm_slli_si128(cc[3], 8)))); _mm_storeu_si128((__m128i*)(c+4), PXOR(cc[4] , PXOR(_mm_srli_si128(cc[3], 8), _mm_slli_si128(cc[5], 8)))); _mm_storeu_si128((__m128i*)(c+6), PXOR(cc[6] , PXOR(_mm_srli_si128(cc[5], 8), _mm_slli_si128(cc[7], 8)))); _mm_storeu_si128((__m128i*)(c+8), PXOR(cc[8] , PXOR(_mm_srli_si128(cc[7], 8), _mm_slli_si128(cc[9], 8)))); _mm_storeu_si128((__m128i*)(c+10), PXOR(cc[10], PXOR(_mm_srli_si128(cc[9], 8), _mm_slli_si128(cc[11], 8)))); _mm_storeu_si128((__m128i*)(c+12), PXOR(cc[12], _mm_srli_si128(cc[11], 8))); #undef PXOR #undef PXOR3 #undef PXOR4 #undef PXOR5 #undef PXOR6 #undef PZERO } #endif /* GF2X_MUL7_H_ */ gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul8.h0000644000327606072450000000000012725540356026474 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h00000000000000gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul9.h0000644000327606072450000002642512725540356016324 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL9_H_ #define GF2X_MUL9_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PXOR5(op1, op2, op3, op4, op5) PXOR(op1, PXOR4(op2, op3, op4, op5)) #define PXOR6(op1, op2, op3, op4, op5, op6) PXOR(op1, PXOR5(op2, op3, op4, op5, op6)) #define PXOR7(op1, op2, op3, op4, op5, op6, op7) PXOR(op1, PXOR6(op2, op3, op4, op5, op6, op7)) #define PZERO _mm_setzero_si128() /* variant with 30 multiplications */ GF2X_STORAGE_CLASS_mul9 void gf2x_mul9 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* Taken from Cenk & Ozbudak 2009 */ /* We reserve one more to follow notations of the paper */ __m128i ab[9] = { _gf2x_mm_setr_epi64(a[0], b[0]), _gf2x_mm_setr_epi64(a[1], b[1]), _gf2x_mm_setr_epi64(a[2], b[2]), _gf2x_mm_setr_epi64(a[3], b[3]), _gf2x_mm_setr_epi64(a[4], b[4]), _gf2x_mm_setr_epi64(a[5], b[5]), _gf2x_mm_setr_epi64(a[6], b[6]), _gf2x_mm_setr_epi64(a[7], b[7]), _gf2x_mm_setr_epi64(a[8], b[8]), }; __m128i pab[30]; #if 0 pab[ 0] = ab[0]^ab[1]^ab[2]^ab[3]^ab[4]^ab[5]^ab[6]^ab[7]^ab[8]; pab[ 1] = ab[0]^ ab[2]^ ab[4]^ ab[6]^ ab[8]; pab[ 2] = ab[1]^ab[2]^ab[3]^ ab[5]^ ab[8]; pab[ 3] = ab[0]^ ab[2]^ab[3]^ ab[5]^ab[6]^ ab[8]; pab[ 4] = ab[0]^ab[1]^ ab[3]^ab[4]^ ab[6]^ab[7]; pab[ 5] = ab[0]^ ab[3]^ab[4]^ab[5]^ ab[7]; pab[ 6] = ab[1]^ab[2]^ab[3]^ ab[6]^ ab[8]; pab[ 7] = ab[2]^ ab[4]^ab[5]^ab[6]; pab[ 8] = ab[2]^ab[3]^ab[4]^ ab[6]; pab[ 9] = ab[1]^ ab[3]^ ab[5]^ ab[7]; pab[10] = ab[0]^ab[1]^ ab[4]^ ab[6]^ab[7]^ab[8]; pab[11] = ab[0]^ ab[3]^ ab[5]^ab[6]^ab[7]; pab[12] = ab[0]^ab[1]^ ab[4]^ab[5]^ ab[8]; pab[13] = ab[1]^ab[2]^ ab[4]^ab[5]^ ab[7]^ab[8]; pab[14] = ab[0]^ab[1]^ ab[3]^ ab[6]^ab[7]^ab[8]; pab[15] = ab[1]^ ab[3]^ab[4]^ab[5]^ ab[8]; pab[16] = ab[0]^ ab[2]^ab[3]^ab[4]^ ab[7]; pab[17] = ab[1]^ ab[4]^ab[5]^ab[6]^ ab[8]; pab[18] = ab[0]^ ab[2]^ ab[5]^ab[6]^ab[7]; pab[19] = ab[2]^ab[3]^ ab[6]^ab[7]; pab[20] = ab[6]^ ab[8]; pab[21] = ab[0]^ ab[2]; pab[22] = ab[0]^ab[1]; pab[23] = ab[0]; pab[24] = ab[1]; pab[25] = ab[7]; pab[26] = ab[7]^ab[8]; pab[27] = ab[6]; pab[28] = ab[8]; pab[29] = ab[2]; #else /* same as above, but optimized with Maple's codegen[optimize] function with 'tryhard' option: 89 XORs -> 46 XORs */ __m128i t51, t52, t53, t54, t55, t56, t57, t58, t59, t60, t61, t62, t63, t64, t65, t66, t67, t68, t69, t70, t71, t72, t73, t74, t75; t51 = ab[8]; t55 = ab[4]; t75 = PXOR(t51, t55); t54 = ab[5]; t57 = ab[2]; t74 = PXOR(t54, t57); t56 = ab[3]; t58 = ab[1]; t73 = PXOR(t56, t58); t59 = ab[0]; t72 = PXOR(t59, t57); t71 = PXOR(t58, t75); t52 = ab[7]; t70 = PXOR3(t52, t56, t59); t53 = ab[6]; t69 = PXOR3(t53, t56, t57); t68 = PXOR(t53, t72); t67 = PXOR(t54, t71); t66 = PXOR(t59, t71); t65 = PXOR3(t51, t57, t73); t64 = PXOR(t53, t70); t63 = PXOR(t55, t70); t62 = PXOR(t54, t68); t61 = PXOR(t58, t64); t60 = PXOR(t55, t61); pab[0] = PXOR3(t51, t60, t74); pab[1] = PXOR(t68, t75); pab[2] = PXOR(t54, t65); pab[3] = PXOR3(t56, t51, t62); pab[4] = t60; pab[5] = PXOR(t54, t63); pab[6] = PXOR(t53, t65); pab[7] = PXOR3(t55, t53, t74); pab[8] = PXOR(t55, t69); pab[9] = PXOR3(t54, t52, t73); pab[10] = PXOR3(t53, t52, t66); pab[11] = PXOR(t54, t64); pab[12] = PXOR(t54, t66); pab[13] = PXOR3(t57, t52, t67); pab[14] = PXOR(t51, t61); pab[15] = PXOR(t56, t67); pab[16] = PXOR(t57, t63); pab[17] = PXOR(t53, t67); pab[18] = PXOR(t52, t62); pab[19] = PXOR(t52, t69); pab[20] = PXOR(t53, t51); pab[21] = t72; pab[22] = PXOR(t59, t58); pab[23] = t59; pab[24] = t58; pab[25] = t52; pab[26] = PXOR(t52, t51); pab[27] = t53; pab[28] = t51; pab[29] = t57; #endif int i; for (i = 0; i < 30; ++i) pab[i] = _mm_clmulepi64_si128(pab[i], pab[i], 0x10); __m128i cc[17]; #if 0 cc[0 ] = pab[23]; cc[1 ] = pab[22]^pab[23]^pab[24]; cc[2 ] = pab[21]^pab[23]^pab[24]^pab[29]; cc[3 ] = pab[28]^pab[17]^pab[2]^pab[15]^pab[7]^pab[6]^pab[5]^pab[29]^pab[21]^pab[22]^pab[12]^pab[19]^pab[9]^pab[13]^pab[11]^pab[3]^pab[26]^pab[20]^pab[27]; cc[4 ] = pab[4]^pab[3]^pab[10]^pab[11]^pab[6]^pab[2]^pab[8]^pab[14]^pab[9]^pab[22]^pab[23]^pab[24]^pab[1]^pab[20]^pab[27]^pab[28]^pab[25]; cc[5 ] = pab[26]^pab[25]^pab[28]^pab[0]^pab[9]^pab[21]^pab[23]^pab[29]^pab[24]^pab[1]^pab[3]^pab[13]^pab[14]^pab[5]^pab[18]^pab[16]^pab[11]^pab[15]; cc[6 ] = pab[26]^pab[12]^pab[19]^pab[21]^pab[23]^pab[29]^pab[4]^pab[3]^pab[14]^pab[5]^pab[18]^pab[22]^pab[1]^pab[20]^pab[27]; cc[7 ] = pab[20]^pab[27]^pab[28]^pab[25]^pab[23]^pab[0]^pab[15]^pab[7]^pab[11]^pab[6]^pab[14]^pab[5]^pab[18]; cc[8 ] = pab[0]^pab[23]^pab[24]^pab[10]^pab[15]^pab[7]^pab[2]^pab[18]^pab[14]^pab[17]^pab[22]^pab[26]^pab[25]^pab[28]; cc[9 ] = pab[21]^pab[23]^pab[29]^pab[24]^pab[0]^pab[16]^pab[11]^pab[7]^pab[10]^pab[2]^pab[8]^pab[18]^pab[5]^pab[28]; cc[10] = pab[12]^pab[0]^pab[19]^pab[9]^pab[21]^pab[29]^pab[22]^pab[3]^pab[13]^pab[16]^pab[11]^pab[7]^pab[10]^pab[20]^pab[27]^pab[28]^pab[26]; cc[11] = pab[16]^pab[11]^pab[7]^pab[10]^pab[17]^pab[5]^pab[2]^pab[0]^pab[9]^pab[4]^pab[3]^pab[22]^pab[23]^pab[24]^pab[1]^pab[20]^pab[27]^pab[28]^pab[25]; cc[12] = pab[26]^pab[25]^pab[28]^pab[8]^pab[14]^pab[5]^pab[17]^pab[10]^pab[6]^pab[16]^pab[15]^pab[3]^pab[13]^pab[1]^pab[9]^pab[21]^pab[23]^pab[29]^pab[24]; cc[13] = pab[8]^pab[18]^pab[2]^pab[15]^pab[16]^pab[5]^pab[29]^pab[21]^pab[23]^pab[22]^pab[0]^pab[12]^pab[19]^pab[1]^pab[11]^pab[4]^pab[3]^pab[26]^pab[20]^pab[27]; cc[14] = pab[20]^pab[27]^pab[28]^pab[25]; cc[15] = pab[25]^pab[26]^pab[28]; cc[16] = pab[28]; #else /* same as above, optimized with codegen[optimize] with 'tryhard' */ __m128i t100, t101, t102, t103, t104, t105, t106, t107, t108, t109, t110, t111, t112, t113, t114, t115, t116, t117, t118, t119, t120, t121, t122, t123, t124, t125, t126, t127, t128, t129, t130, t77, t79, t80, t82, t83, t87, t88, t89, t90, t91, t92, t94, t95, t96, t97, t98, t99; t82 = pab[23]; t87 = pab[18]; t130 = PXOR(t82, t87); t77 = pab[28]; t98 = pab[7]; t129 = PXOR(t77, t98); t79 = pab[26]; t83 = pab[22]; t128 = PXOR(t79, t83); t90 = pab[15]; t91 = pab[14]; t127 = PXOR(t90, t91); t97 = pab[8]; t99 = pab[6]; t126 = PXOR(t97, t99); t100 = pab[5]; t125 = PXOR(t100, t90); t117 = PXOR(pab[27], pab[20]); t80 = pab[25]; t118 = PXOR(t77, t80); t112 = PXOR(t117, t118); t94 = pab[11]; t124 = PXOR(t112, t94); t103 = pab[2]; t105 = pab[0]; t123 = PXOR(t103, t105); t89 = pab[16]; t122 = PXOR3(t89, t94, t97); t121 = PXOR3(t100, t105, t98); t102 = pab[3]; t104 = pab[1]; t96 = pab[9]; t120 = PXOR3(t102, t104, t96); t119 = PXOR(pab[29], pab[21]); t116 = PXOR(pab[24], t82); t115 = PXOR(t79, t118); t114 = PXOR(t83, t116); t113 = PXOR(t116, t119); t95 = pab[10]; t111 = PXOR5(t87, t95, t116, t123, t129); t110 = PXOR6(t102, pab[19], pab[12], t117, t119, t128); t92 = pab[13]; t109 = PXOR5(t92, t94, t96, t110, t129); t101 = pab[4]; t108 = PXOR5(t100, t101, t104, t110, t130); t107 = PXOR6(t101, t103, t95, t114, t120, t124); t106 = PXOR7(t89, t91, t92, t113, t115, t120, t125); t88 = pab[17]; cc[0] = t82; cc[1] = t114; cc[2] = t113; cc[3] = PXOR5(t88, t99, t103, t109, t125); cc[4] = PXOR3(t91, t107, t126); cc[5] = PXOR4(t87, t94, t105, t106); cc[6] = PXOR(t91, t108); cc[7] = PXOR5(t99, t121, t124, t127, t130); cc[8] = PXOR5(t88, t80, t111, t127, t128); cc[9] = PXOR4(t100, t111, t119, t122); cc[10] = PXOR4(t89, t95, t105, t109); cc[11] = PXOR4(t88, t89, t107, t121); cc[12] = PXOR4(t88, t95, t106, t126); cc[13] = PXOR4(t90, t108, t122, t123); cc[14] = t112; cc[15] = t115; cc[16] = t77; #endif _mm_storeu_si128((__m128i*)(c), PXOR(cc[0], _mm_slli_si128(cc[1], 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR3(cc[2] , _mm_srli_si128(cc[1], 8), _mm_slli_si128(cc[3], 8))); _mm_storeu_si128((__m128i*)(c+4), PXOR3(cc[4] , _mm_srli_si128(cc[3], 8), _mm_slli_si128(cc[5], 8))); _mm_storeu_si128((__m128i*)(c+6), PXOR3(cc[6] , _mm_srli_si128(cc[5], 8), _mm_slli_si128(cc[7], 8))); _mm_storeu_si128((__m128i*)(c+8), PXOR3(cc[8] , _mm_srli_si128(cc[7], 8), _mm_slli_si128(cc[9], 8))); _mm_storeu_si128((__m128i*)(c+10), PXOR3(cc[10], _mm_srli_si128(cc[9], 8), _mm_slli_si128(cc[11], 8))); _mm_storeu_si128((__m128i*)(c+12), PXOR3(cc[12], _mm_srli_si128(cc[11], 8), _mm_slli_si128(cc[13], 8))); _mm_storeu_si128((__m128i*)(c+14), PXOR3(cc[14], _mm_srli_si128(cc[13], 8), _mm_slli_si128(cc[15], 8))); _mm_storeu_si128((__m128i*)(c+16), PXOR(cc[16], _mm_srli_si128(cc[15], 8))); #undef PXOR #undef PXOR3 #undef PXOR4 #undef PXOR5 #undef PXOR6 #undef PXOR7 #undef PZERO } #endif /* GF2X_MUL9_H_ */ gf2x-1.2/already_tuned/x86_sse2/0000755000327606072450000000000012725540356013455 500000000000000gf2x-1.2/already_tuned/x86_sse2/gf2x-thresholds.h0000644000327606072450000004021312725540356016571 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* This file contains sensible defaults to start with, which are updated * by the tuning program */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on crumble.loria.fr on Tue Sep 14 12:57:40 2010" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 2000000 run on crumble.loria.fr on Tue Sep 14 14:11:13 2010 ; based on lt-tunetoom -s 1.05 2048 2048 run on crumble.loria.fr on Tue Sep 14 12:57:40 2010" #define GF2X_WORDSIZE 32 /* Notes on crumble.loria.fr: * * Intel(R) Pentium(R) 4 CPU 3.20GHz */ #define GF2X_STORAGE_CLASS_mul1 static inline #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 300 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1949 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 1706 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, \ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 2, \ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, \ 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, \ 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, \ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, \ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, \ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, \ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 3516, -81 }, { 3587, 1 }, { 3733, -81 }, \ { 3808, 1 }, { 4614, 243 }, { 4921, 1 }, { 5020, -81 }, \ { 5121, 243 }, { 5224, -243 }, { 5536, 243 }, { 5844, -243 }, \ { 7382, 243 }, { 7689, -243 }, { 13533, 729 }, { 13840, -243 }, \ { 15378, 729 }, { 16608, -243 }, { 18339, -729 }, { 22144, 2187 }, \ { 24912, -729 }, { 44287, 2187 }, { 49823, -729 }, { 66431, 2187 }, \ { 74734, -2187 }, { 99646, 2187 }, { 124557, -2187 }, { 199291, 6561 }, \ { 224202, -2187 }, { 348759, -6561 }, { 448404, -2187 }, { 597872, 6561 }, \ { 672606, -6561 }, { 896807, 6561 }, { 1121009, -6561 }, { 1793614, 19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul1.h0000644000327606072450000001257212725540356015361 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 32 2. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul2.h0000644000327606072450000000000012725540356025527 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul2.h00000000000000gf2x-1.2/already_tuned/x86_sse2/gf2x_mul3.h0000644000327606072450000001434012725540356015356 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 96x96 -> 192 bit product using SSE2 instructions. */ #ifndef GF2X_MUL3_H_ #define GF2X_MUL3_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 32 #error "This code is for 32-bit only" #endif #ifndef GF2X_HAVE_SSE2_SUPPORT #error "This code needs sse-2 support" #endif #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) #warning "Your GCC version is buggy. Binary fields may fail randomly" /* Gcc bug reports 37101 and 37340 -- the only convenient fix is to * upgrade to 4.3.2 */ #endif /* mul4t is so fast on pentium-4s that it's even faster than mul3k. So we * provide a stripped-down version (much similar to mul4 of course) */ /* This has been edited without testing */ GF2X_STORAGE_CLASS_mul3 void gf2x_mul3(unsigned long *t, unsigned long const *s1, unsigned long const *s2) { #define SHL(x, r) _mm_slli_epi64((x), (r)) #define SHR(x, r) _mm_srli_epi64((x), (r)) #define SHLD(x, r) _mm_slli_si128((x), (r) >> 3) #define SHRD(x, r) _mm_srli_si128((x), (r) >> 3) #define PZERO _mm_setzero_si128() #define PADD(x, y) _mm_add_epi64((x), (y)) #define PSUB(x, y) _mm_sub_epi64((x), (y)) #define PNEG(x) PSUB(PZERO, (x)) #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define XOREQ(lop, rop) lop = _mm_xor_si128((lop), (rop)) #define PAND(lop, rop) _mm_and_si128((lop), (rop)) __m128i u; __m128i t0; __m128i t1; __m128i t2; __m128i g[16]; /* sequence update walk */ g[0] = _mm_setzero_si128(); g[1] = _gf2x_mm_setr_epi32(s2[0], s2[1], s2[2], 0); g[2] = SHL(g[1], 1); g[3] = PXOR(g[2], g[1]); g[4] = SHL(g[2], 1); g[5] = PXOR(g[4], g[1]); g[6] = SHL(g[3], 1); g[7] = PXOR(g[6], g[1]); g[8] = SHL(g[4], 1); g[9] = PXOR(g[8], g[1]); g[10] = SHL(g[5], 1); g[11] = PXOR(g[10], g[1]); g[12] = SHL(g[6], 1); g[13] = PXOR(g[12], g[1]); g[14] = SHL(g[7], 1); g[15] = PXOR(g[14], g[1]); /* round 0 */ u = g[s1[0] & 15]; t0 = u; u = g[s1[0] >> 4 & 15]; XOREQ(t0, SHL(u, 4)); t1 = SHR(u, 60); u = g[s1[0] >> 8 & 15]; XOREQ(t0, SHL(u, 8)); XOREQ(t1, SHR(u, 56)); u = g[s1[0] >> 12 & 15]; XOREQ(t0, SHL(u, 12)); XOREQ(t1, SHR(u, 52)); u = g[s1[0] >> 16 & 15]; XOREQ(t0, SHL(u, 16)); XOREQ(t1, SHR(u, 48)); u = g[s1[0] >> 20 & 15]; XOREQ(t0, SHL(u, 20)); XOREQ(t1, SHR(u, 44)); u = g[s1[0] >> 24 & 15]; XOREQ(t0, SHL(u, 24)); XOREQ(t1, SHR(u, 40)); u = g[s1[0] >> 28 & 15]; XOREQ(t0, SHL(u, 28)); XOREQ(t1, SHR(u, 36)); u = g[s1[1] & 15]; XOREQ(t0, SHL(u, 32)); XOREQ(t1, SHR(u, 32)); u = g[s1[1] >> 4 & 15]; XOREQ(t0, SHL(u, 36)); XOREQ(t1, SHR(u, 28)); u = g[s1[1] >> 8 & 15]; XOREQ(t0, SHL(u, 40)); XOREQ(t1, SHR(u, 24)); u = g[s1[1] >> 12 & 15]; XOREQ(t0, SHL(u, 44)); XOREQ(t1, SHR(u, 20)); u = g[s1[1] >> 16 & 15]; XOREQ(t0, SHL(u, 48)); XOREQ(t1, SHR(u, 16)); u = g[s1[1] >> 20 & 15]; XOREQ(t0, SHL(u, 52)); XOREQ(t1, SHR(u, 12)); u = g[s1[1] >> 24 & 15]; XOREQ(t0, SHL(u, 56)); XOREQ(t1, SHR(u, 8)); u = g[s1[1] >> 28 & 15]; XOREQ(t0, SHL(u, 60)); XOREQ(t1, SHR(u, 4)); /* round 1 */ u = g[s1[2] & 15]; XOREQ(t1, u); u = g[s1[2] >> 4 & 15]; XOREQ(t1, SHL(u, 4)); t2 = SHR(u, 60); u = g[s1[2] >> 8 & 15]; XOREQ(t1, SHL(u, 8)); XOREQ(t2, SHR(u, 56)); u = g[s1[2] >> 12 & 15]; XOREQ(t1, SHL(u, 12)); XOREQ(t2, SHR(u, 52)); u = g[s1[2] >> 16 & 15]; XOREQ(t1, SHL(u, 16)); XOREQ(t2, SHR(u, 48)); u = g[s1[2] >> 20 & 15]; XOREQ(t1, SHL(u, 20)); XOREQ(t2, SHR(u, 44)); u = g[s1[2] >> 24 & 15]; XOREQ(t1, SHL(u, 24)); XOREQ(t2, SHR(u, 40)); u = g[s1[2] >> 28 & 15]; XOREQ(t1, SHL(u, 28)); XOREQ(t2, SHR(u, 36)); /* end */ /* repair steps */ /* repair section 200711-200803 */ __m128i v1 = SHR(_gf2x_mm_setr_epi32(s1[0], s1[1], s1[0], s1[1]), 1); __m128i v2 = SHR(_gf2x_mm_setr_epi32(s1[2], 0, s1[2], 0), 1); __m128i m = _gf2x_mm_set1_epi32_c(0x77777777); __m128i w = PNEG(SHR(g[1],63)); v1 = PAND(v1, m); XOREQ(t1, PAND(v1, w)); v2 = PAND(v2, m); XOREQ(t2, PAND(v2, w)); w = PNEG(SHR(g[2],63)); v1 = SHR(v1, 1) & m; XOREQ(t1, PAND(v1, w)); v2 = SHR(v2, 1) & m; XOREQ(t2, PAND(v2, w)); w = PNEG(SHR(g[4],63)); v1 = SHR(v1, 1) & m; XOREQ(t1, PAND(v1, w)); v2 = SHR(v2, 1) & m; XOREQ(t2, PAND(v2, w)); /* store result */ _mm_storeu_si128((__m128i *)(t), PXOR(t0, _mm_unpacklo_epi64(PZERO, t1))); XOREQ(t2, _mm_unpackhi_epi64(t1, PZERO)); t[4] = _mm_cvtsi128_si32(t2); t[5] = _mm_cvtsi128_si32(SHRD(t2, 32)); #undef PAND #undef XOREQ #undef PZERO #undef PADD #undef PSUB #undef PNEG #undef PXOR #undef SHL #undef SHR #undef SHLD #undef SHRD } #endif /* GF2X_MUL3_H_ */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul4.h0000644000327606072450000001524612725540356015365 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 128x128 -> 256 bit product using SSE2 instructions. */ #ifndef GF2X_MUL4_H_ #define GF2X_MUL4_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 32 #error "This code is for 32-bit only" #endif #ifndef GF2X_HAVE_SSE2_SUPPORT #error "This code needs sse-2 support" #endif #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) #warning "Your GCC version is buggy. Binary fields may fail randomly" /* Gcc bug reports 37101 and 37340 -- the only convenient fix is to * upgrade to 4.3.2 */ #endif /* This has been edited without testing */ GF2X_STORAGE_CLASS_mul4 void gf2x_mul4(unsigned long *t, unsigned long const *s1, unsigned long const *s2) { #define SHL(x, r) _mm_slli_epi64((x), (r)) #define SHR(x, r) _mm_srli_epi64((x), (r)) #define SHLD(x, r) _mm_slli_si128((x), (r) >> 3) #define SHRD(x, r) _mm_srli_si128((x), (r) >> 3) #define PZERO _mm_setzero_si128() #define PADD(x, y) _mm_add_epi64((x), (y)) #define PSUB(x, y) _mm_sub_epi64((x), (y)) #define PNEG(x) PSUB(PZERO, (x)) #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define XOREQ(lop, rop) lop = _mm_xor_si128((lop), (rop)) #define PAND(lop, rop) _mm_and_si128((lop), (rop)) __m128i u; __m128i t0; __m128i t1; __m128i t2; __m128i g[16]; /* sequence update walk */ g[0] = _mm_setzero_si128(); g[1] = _gf2x_mm_setr_epi32(s2[0], s2[1], s2[2], s2[3]); g[2] = SHL(g[1], 1); g[3] = PXOR(g[2], g[1]); g[4] = SHL(g[2], 1); g[5] = PXOR(g[4], g[1]); g[6] = SHL(g[3], 1); g[7] = PXOR(g[6], g[1]); g[8] = SHL(g[4], 1); g[9] = PXOR(g[8], g[1]); g[10] = SHL(g[5], 1); g[11] = PXOR(g[10], g[1]); g[12] = SHL(g[6], 1); g[13] = PXOR(g[12], g[1]); g[14] = SHL(g[7], 1); g[15] = PXOR(g[14], g[1]); /* round 0 */ u = g[s1[0] & 15]; t0 = u; u = g[s1[0] >> 4 & 15]; XOREQ(t0, SHL(u, 4)); t1 = SHR(u, 60); u = g[s1[0] >> 8 & 15]; XOREQ(t0, SHL(u, 8)); XOREQ(t1, SHR(u, 56)); u = g[s1[0] >> 12 & 15]; XOREQ(t0, SHL(u, 12)); XOREQ(t1, SHR(u, 52)); u = g[s1[0] >> 16 & 15]; XOREQ(t0, SHL(u, 16)); XOREQ(t1, SHR(u, 48)); u = g[s1[0] >> 20 & 15]; XOREQ(t0, SHL(u, 20)); XOREQ(t1, SHR(u, 44)); u = g[s1[0] >> 24 & 15]; XOREQ(t0, SHL(u, 24)); XOREQ(t1, SHR(u, 40)); u = g[s1[0] >> 28 & 15]; XOREQ(t0, SHL(u, 28)); XOREQ(t1, SHR(u, 36)); u = g[s1[1] & 15]; XOREQ(t0, SHL(u, 32)); XOREQ(t1, SHR(u, 32)); u = g[s1[1] >> 4 & 15]; XOREQ(t0, SHL(u, 36)); XOREQ(t1, SHR(u, 28)); u = g[s1[1] >> 8 & 15]; XOREQ(t0, SHL(u, 40)); XOREQ(t1, SHR(u, 24)); u = g[s1[1] >> 12 & 15]; XOREQ(t0, SHL(u, 44)); XOREQ(t1, SHR(u, 20)); u = g[s1[1] >> 16 & 15]; XOREQ(t0, SHL(u, 48)); XOREQ(t1, SHR(u, 16)); u = g[s1[1] >> 20 & 15]; XOREQ(t0, SHL(u, 52)); XOREQ(t1, SHR(u, 12)); u = g[s1[1] >> 24 & 15]; XOREQ(t0, SHL(u, 56)); XOREQ(t1, SHR(u, 8)); u = g[s1[1] >> 28 & 15]; XOREQ(t0, SHL(u, 60)); XOREQ(t1, SHR(u, 4)); /* round 1 */ u = g[s1[2] & 15]; XOREQ(t1, u); u = g[s1[2] >> 4 & 15]; XOREQ(t1, SHL(u, 4)); t2 = SHR(u, 60); u = g[s1[2] >> 8 & 15]; XOREQ(t1, SHL(u, 8)); XOREQ(t2, SHR(u, 56)); u = g[s1[2] >> 12 & 15]; XOREQ(t1, SHL(u, 12)); XOREQ(t2, SHR(u, 52)); u = g[s1[2] >> 16 & 15]; XOREQ(t1, SHL(u, 16)); XOREQ(t2, SHR(u, 48)); u = g[s1[2] >> 20 & 15]; XOREQ(t1, SHL(u, 20)); XOREQ(t2, SHR(u, 44)); u = g[s1[2] >> 24 & 15]; XOREQ(t1, SHL(u, 24)); XOREQ(t2, SHR(u, 40)); u = g[s1[2] >> 28 & 15]; XOREQ(t1, SHL(u, 28)); XOREQ(t2, SHR(u, 36)); u = g[s1[3] & 15]; XOREQ(t1, SHL(u, 32)); XOREQ(t2, SHR(u, 32)); u = g[s1[3] >> 4 & 15]; XOREQ(t1, SHL(u, 36)); XOREQ(t2, SHR(u, 28)); u = g[s1[3] >> 8 & 15]; XOREQ(t1, SHL(u, 40)); XOREQ(t2, SHR(u, 24)); u = g[s1[3] >> 12 & 15]; XOREQ(t1, SHL(u, 44)); XOREQ(t2, SHR(u, 20)); u = g[s1[3] >> 16 & 15]; XOREQ(t1, SHL(u, 48)); XOREQ(t2, SHR(u, 16)); u = g[s1[3] >> 20 & 15]; XOREQ(t1, SHL(u, 52)); XOREQ(t2, SHR(u, 12)); u = g[s1[3] >> 24 & 15]; XOREQ(t1, SHL(u, 56)); XOREQ(t2, SHR(u, 8)); u = g[s1[3] >> 28 & 15]; XOREQ(t1, SHL(u, 60)); XOREQ(t2, SHR(u, 4)); /* end */ /* repair steps */ /* repair section 200711-200803 */ __m128i v1 = SHR(_gf2x_mm_setr_epi32(s1[0], s1[1], s1[0], s1[1]), 1); __m128i v2 = SHR(_gf2x_mm_setr_epi32(s1[2], s1[3], s1[2], s1[3]), 1); __m128i m = _gf2x_mm_set1_epi32_c(0x77777777); __m128i w = PNEG(SHR(g[1],63)); v1 = PAND(v1, m); XOREQ(t1, PAND(v1, w)); v2 = PAND(v2, m); XOREQ(t2, PAND(v2, w)); w = PNEG(SHR(g[2],63)); v1 = SHR(v1, 1) & m; XOREQ(t1, PAND(v1, w)); v2 = SHR(v2, 1) & m; XOREQ(t2, PAND(v2, w)); w = PNEG(SHR(g[4],63)); v1 = SHR(v1, 1) & m; XOREQ(t1, PAND(v1, w)); v2 = SHR(v2, 1) & m; XOREQ(t2, PAND(v2, w)); /* store result */ _mm_storeu_si128((__m128i *)(t), PXOR(t0, _mm_unpacklo_epi64(PZERO, t1))); _mm_storeu_si128((__m128i *)(t+4),PXOR(t2, _mm_unpackhi_epi64(t1, PZERO))); #undef PAND #undef XOREQ #undef PXOR #undef PZERO #undef PNEG #undef PADD #undef PSUB #undef SHL #undef SHR #undef SHLD #undef SHRD } #endif /* GF2X_MUL4_H_ */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul5.h0000644000327606072450000000425112725540356015360 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* specialized Karatsuba, RPB 20070518 */ unsigned long aa[3], bb[3], ab[6], ab3, ab4, ab5; gf2x_mul2 (c+6, a+3, b+3); gf2x_mul3 (c, a, b); aa[0] = a[0] ^ a[3]; aa[1] = a[1] ^ a[4]; aa[2] = a[2]; bb[0] = b[0] ^ b[3]; bb[1] = b[1] ^ b[4]; bb[2] = b[2]; gf2x_mul3 (ab, aa, bb); ab3 = ab[3] ^ c[3]; ab4 = ab[4] ^ c[4]; ab5 = ab[5] ^ c[5]; c[3] ^= ab[0] ^ c[0] ^ c[6]; c[4] ^= ab[1] ^ c[1] ^ c[7]; c[5] ^= ab[2] ^ c[2] ^ c[8]; c[6] ^= ab3 ^ c[9]; c[7] ^= ab4; c[8] ^= ab5; } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul6.h0000644000327606072450000000430312725540356015357 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL6_H_ #define GF2X_MUL6_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul6 void gf2x_mul6 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* specialized Karatsuba, RPB 20070518 */ unsigned long aa[3], bb[3], ab[6], ab3, ab4, ab5; gf2x_mul3 (c+6, a+3, b+3); gf2x_mul3 (c, a, b); aa[0] = a[0] ^ a[3]; aa[1] = a[1] ^ a[4]; aa[2] = a[2] ^ a[5]; bb[0] = b[0] ^ b[3]; bb[1] = b[1] ^ b[4]; bb[2] = b[2] ^ b[5]; gf2x_mul3 (ab, aa, bb); ab3 = ab[3] ^ c[3]; ab4 = ab[4] ^ c[4]; ab5 = ab[5] ^ c[5]; c[3] ^= ab[0] ^ c[0] ^ c[6]; c[4] ^= ab[1] ^ c[1] ^ c[7]; c[5] ^= ab[2] ^ c[2] ^ c[8]; c[6] ^= ab3 ^ c[9]; c[7] ^= ab4 ^ c[10]; c[8] ^= ab5 ^ c[11]; } #endif /* GF2X_MUL6_H_ */ gf2x-1.2/already_tuned/x86_sse2/gf2x_mul7.h0000644000327606072450000000000012725540356025541 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul7.h00000000000000gf2x-1.2/already_tuned/x86_sse2/gf2x_mul8.h0000644000327606072450000000000012725540356025543 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h00000000000000gf2x-1.2/already_tuned/x86_sse2/gf2x_mul9.h0000644000327606072450000000620012725540356015360 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL9_H_ #define GF2X_MUL9_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* Karatsuba-3 applied to chunks of size 3 */ GF2X_STORAGE_CLASS_mul9 void gf2x_mul9 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[9], bb[9]; unsigned long p0[6], p1[6], p2[6]; unsigned long pp0[6], pp1[6], pp2[6]; aa[0] = a[3]^a[6]; aa[1] = a[4]^a[7]; aa[2] = a[5]^a[8]; aa[3] = a[0]^a[6]; aa[4] = a[1]^a[7]; aa[5] = a[2]^a[8]; aa[6] = a[0]^a[3]; aa[7] = a[1]^a[4]; aa[8] = a[2]^a[5]; bb[0] = b[3]^b[6]; bb[1] = b[4]^b[7]; bb[2] = b[5]^b[8]; bb[3] = b[0]^b[6]; bb[4] = b[1]^b[7]; bb[5] = b[2]^b[8]; bb[6] = b[0]^b[3]; bb[7] = b[1]^b[4]; bb[8] = b[2]^b[5]; gf2x_mul3 (p0, a+0, b+0); gf2x_mul3 (p1, a+3, b+3); gf2x_mul3 (p2, a+6, b+6); gf2x_mul3 (pp0, aa+0, bb+0); gf2x_mul3 (pp1, aa+3, bb+3); gf2x_mul3 (pp2, aa+6, bb+6); c[0] = p0[0]; c[1] = p0[1]; c[2] = p0[2]; c[3] = p0[0]^p1[0]^pp2[0] ^ p0[3]; c[4] = p0[1]^p1[1]^pp2[1] ^ p0[4]; c[5] = p0[2]^p1[2]^pp2[2] ^ p0[5]; c[6] = p0[0]^p1[0]^p2[0]^pp1[0] ^ p0[3]^p1[3]^pp2[3]; c[7] = p0[1]^p1[1]^p2[1]^pp1[1] ^ p0[4]^p1[4]^pp2[4]; c[8] = p0[2]^p1[2]^p2[2]^pp1[2] ^ p0[5]^p1[5]^pp2[5]; c[9] = pp0[0]^p1[0]^p2[0] ^ p0[3]^p1[3]^p2[3]^pp1[3]; c[10] = pp0[1]^p1[1]^p2[1] ^ p0[4]^p1[4]^p2[4]^pp1[4]; c[11] = pp0[2]^p1[2]^p2[2] ^ p0[5]^p1[5]^p2[5]^pp1[5]; c[12] = p2[0] ^ pp0[3]^p1[3]^p2[3]; c[13] = p2[1] ^ pp0[4]^p1[4]^p2[4]; c[14] = p2[2] ^ pp0[5]^p1[5]^p2[5]; c[15] = p2[3]; c[16] = p2[4]; c[17] = p2[5]; } #endif /* GF2X_MUL9_H_ */ gf2x-1.2/already_tuned/armv7l/0000755000327606072450000000000012725540356013304 500000000000000gf2x-1.2/already_tuned/armv7l/gf2x-thresholds.h0000644000327606072450000002566012725540356016431 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* This file contains sensible defaults to start with, which are updated * by the tuning program */ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on calva on Fri Mar 20 17:55:56 2015" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 1000000 run on calva on Fri Mar 20 21:33:39 2015 ; based on lt-tunetoom -s 1.05 2048 2048 run on calva on Fri Mar 20 17:55:56 2015" #define GF2X_WORDSIZE 32 #define GF2X_STORAGE_CLASS_mul1 static #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 42 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 22 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 530 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1949 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 97 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, \ 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, \ 2, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, \ 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, \ 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 1852, -81 }, { 1928, 1 }, { 2089, -81 }, \ { 2174, 1 }, { 2356, -81 }, { 2404, -243 }, { 2453, 1 }, \ { 2503, -81 }, { 2554, 243 }, { 2768, -243 }, { 7997, 729 }, \ { 8304, -729 }, { 11072, 729 }, { 13840, -729 }, { 22144, 2187 }, \ { 24912, -729 }, { 38751, -2187 }, { 49823, -729 }, { 66431, 2187 }, \ { 74734, -2187 }, { 199291, 6561 }, { 224202, -6561 }, { 448404, -2187 }, \ { 597872, 6561 }, { 672606, -6561 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/armv7l/gf2x_mul1.h0000644000327606072450000001257212725540356015210 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 32 2. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/armv7l/gf2x_mul3.h0000644000327606072450000000460512725540356015210 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL3_H_ #define GF2X_MUL3_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" /* uses the variant of Karatsuba with 6 multiplications */ GF2X_STORAGE_CLASS_mul3 void gf2x_mul3 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[3], bb[3]; unsigned long p0[2], p1[2], p2[2]; unsigned long pp0[2], pp1[2], pp2[2]; aa[0] = a[1]^a[2]; aa[1] = a[0]^a[2]; aa[2] = a[0]^a[1]; bb[0] = b[1]^b[2]; bb[1] = b[0]^b[2]; bb[2] = b[0]^b[1]; gf2x_mul1 (p0, a[0], b[0]); gf2x_mul1 (p1, a[1], b[1]); gf2x_mul1 (p2, a[2], b[2]); gf2x_mul1 (pp0, aa[0], bb[0]); gf2x_mul1 (pp1, aa[1], bb[1]); gf2x_mul1 (pp2, aa[2], bb[2]); c[0] = p0[0]; c[1] = p0[0]^p1[0]^pp2[0] ^ p0[1]; c[2] = p0[0]^p1[0]^p2[0]^pp1[0] ^ p0[1]^p1[1]^pp2[1]; c[3] = pp0[0]^p1[0]^p2[0] ^ p0[1]^p1[1]^p2[1]^pp1[1]; c[4] = p2[0] ^ pp0[1]^p1[1]^p2[1]; c[5] = p2[1]; } #endif /* GF2X_MUL3_H_ */ gf2x-1.2/already_tuned/armv7l/gf2x_mul5.h0000644000327606072450000000761712725540356015220 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann, Nicolas Estibals (for this file) This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* Montgomery formulae with 13 multiplications, see Five, Six, and Seven-Term {K}aratsuba-Like Formulae, IEEE Transactions on Computers, volume 54, number 3, p. 362-369, 2005 */ unsigned long ta[3], tb[3], pa[8], pb[8], p[26], t[14]; ta[0] = a[0] ^ a[4] ; tb[0] = b[0] ^ b[4]; ta[1] = a[1] ^ a[2] ; tb[1] = b[1] ^ b[2]; ta[2] = a[3] ^ ta[0] ; tb[2] = b[3] ^ tb[0]; pa[0] = ta[1] ^ ta[2] ; pb[0] = tb[1] ^ tb[2]; pa[1] = a[2] ^ ta[2] ; pb[1] = b[2] ^ tb[2]; pa[2] = ta[0] ^ ta[1] ; pb[2] = tb[0] ^ tb[1]; pa[3] = a[1] ^ ta[2] ; pb[3] = b[1] ^ tb[2]; pa[4] = a[0] ^ a[2] ^ a[3] ; pb[4] = b[0] ^ b[2] ^ b[3]; pa[5] = a[4] ^ ta[1] ; pb[5] = b[4] ^ tb[1]; pa[6] = a[3] ^ a[4] ; pb[6] = b[3] ^ b[4]; pa[7] = a[0] ^ a[1] ; pb[7] = b[0] ^ b[1]; gf2x_mul1(p + 0, pa[0], pb[0]); gf2x_mul1(p + 2, pa[1], pb[1]); gf2x_mul1(p + 4, pa[2], pb[2]); gf2x_mul1(p + 6, pa[3], pb[3]); gf2x_mul1(p + 8, pa[4], pb[4]); gf2x_mul1(p + 10, pa[5], pb[5]); gf2x_mul1(p + 12, pa[6], pb[6]); gf2x_mul1(p + 14, pa[7], pb[7]); gf2x_mul1(p + 16, ta[0], tb[0]); gf2x_mul1(p + 18, a[4], b[4]); gf2x_mul1(p + 20, a[3], b[3]); gf2x_mul1(p + 22, a[1], b[1]); gf2x_mul1(p + 24, a[0], b[0]); t[0] = p[14] ^ p[24]; t[1] = p[15] ^ p[25]; t[2] = p[12] ^ p[18]; t[3] = p[13] ^ p[19]; t[4] = p[2] ^ p[16]; t[5] = p[3] ^ p[17]; t[6] = p[0] ^ p[6]; t[7] = p[1] ^ p[7]; t[8] = p[4] ^ p[16]; t[9] = p[5] ^ p[17]; t[10] = p[10] ^ t[0]; t[11] = p[11] ^ t[1]; t[12] = p[8] ^ t[2]; t[13] = p[9] ^ t[3]; c[0] = p[24]; c[1] = p[22] ^ t[0] ^ p[25]; c[2] = p[18] ^ t[8] ^ t[10] ^ p[23] ^ t[1]; c[3] = t[2] ^ t[4] ^ t[6] ^ p[19] ^ t[9] ^ t[11]; c[4] = p[0] ^ p[20] ^ p[22] ^ t[10] ^ t[12] ^ t[3] ^ t[5] ^ t[7]; c[5] = t[0] ^ t[6] ^ t[8] ^ p[1] ^ p[21] ^ p[23] ^ t[11] ^ t[13]; c[6] = p[24] ^ t[4] ^ t[12] ^ t[1] ^ t[7] ^ t[9]; c[7] = p[20] ^ t[2] ^ p[25] ^ t[5] ^ t[13]; c[8] = p[18] ^ p[21] ^ t[3]; c[9] = p[19]; } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/already_tuned/armv7l/gf2x_mul6.h0000644000327606072450000000607412725540356015215 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL6_H_ #define GF2X_MUL6_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul6 void gf2x_mul6 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* This code uses the K3 formula from Weimerskirch and Paar, http://weimerskirch.org/papers/Weimerskirch_Karatsuba.pdf, which performs only 6 calls to gf2x_mul2. */ unsigned long d01[4], d1[4], d12[4], aa[2], bb[2]; gf2x_mul2 (c, a, b); /* D0 */ gf2x_mul2 (d1, a + 2, b + 2); /* D1 */ gf2x_mul2 (c + 8, a + 4, b + 4); /* D2 */ aa[0] = a[0] ^ a[2]; aa[1] = a[1] ^ a[3]; bb[0] = b[0] ^ b[2]; bb[1] = b[1] ^ b[3]; gf2x_mul2 (d01, aa, bb); /* D01 */ aa[0] = a[0] ^ a[4]; aa[1] = a[1] ^ a[5]; bb[0] = b[0] ^ b[4]; bb[1] = b[1] ^ b[5]; gf2x_mul2 (c + 4, aa, bb); /* D02 */ aa[0] = a[2] ^ a[4]; aa[1] = a[3] ^ a[5]; bb[0] = b[2] ^ b[4]; bb[1] = b[3] ^ b[5]; gf2x_mul2 (d12, aa, bb); /* D12 */ /* low(D1) + high(D0) is used three times */ c[2] ^= d1[0]; c[3] ^= d1[1]; /* low(D1) + high(D0) */ c[4] ^= c[2]; c[5] ^= c[3]; /* low(D02) + low(D1) + high(D0) */ d12[0] ^= c[2]; d12[1] ^= c[3]; /* low(D12) + low(D1) + high(D0) */ /* low(D2) + high(D1) is used three times */ c[8] ^= d1[2]; c[9] ^= d1[3]; /* low(D2) + high(D1) */ c[6] ^= c[8]; c[7] ^= c[9]; /* high(D02) + low(D2) + high(D1) */ d01[2] ^= c[8]; d01[3] ^= c[9]; /* high(D01) + low(D2) + high(D1) */ c[2] ^= d01[0] ^ c[0]; c[3] ^= d01[1] ^ c[1]; /* l(D1)+h(D0)+l(D01)+l(D0) */ c[4] ^= c[0] ^ d01[2]; c[5] ^= c[1] ^ d01[3]; c[6] ^= d12[0] ^ c[10]; c[7] ^= d12[1] ^ c[11]; c[8] ^= d12[2] ^ c[10]; c[9] ^= d12[3] ^ c[11]; } #endif /* GF2X_MUL6_H_ */ gf2x-1.2/already_tuned/coreihwl/0000755000327606072450000000000012725540356013710 500000000000000gf2x-1.2/already_tuned/coreihwl/gf2x-thresholds.h0000644000327606072450000001217712725540356017034 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* This file contains sensible defaults to start with, which are updated * by the tuning program */ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on cassoulet on Fri Nov 15 14:37:02 2013" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 8000000 run on cassoulet on Fri Nov 15 15:13:05 2013 ; based on lt-tunetoom -s 1.05 2048 2048 run on cassoulet on Fri Nov 15 14:37:02 2013" #define GF2X_WORDSIZE 64 #define GF2X_STORAGE_CLASS_mul1 static #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 235 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1600 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 2049 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE {} #define GF2X_BEST_UTOOM_TABLE {} /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 9650, 243 }, { 9844, 1 }, { 16163, -243 }, \ { 17154, 1 }, { 17498, -243 }, { 17848, 1 }, { 18570, -243 }, \ { 18942, 1 }, { 19321, -243 }, { 19708, 1 }, { 21336, 729 }, \ { 21763, -729 }, { 22199, -243 }, { 31095, 729 }, { 31717, -729 }, \ { 33216, -243 }, { 35251, 729 }, { 36677, -243 }, { 38160, -729 }, \ { 38924, 729 }, { 40135, -729 }, { 58127, -243 }, { 59290, -729 }, \ { 60476, 2187 }, { 61686, -729 }, { 86387, 729 }, { 88115, -729 }, \ { 97289, -243 }, { 99235, -729 }, { 118600, -2187 }, { 124557, -729 }, \ { 134826, 2187 }, { 137523, -2187 }, { 149468, -729 }, { 158619, 2187 }, \ { 161792, -2187 }, { 224202, -729 }, { 233261, -2187 }, { 323847, 6561 }, \ { 336303, -2187 }, { 423493, -6561 }, { 448404, -2187 }, { 548049, 6561 }, \ { 560505, -6561 }, { 672606, -2187 }, { 742615, 6561 }, { 784706, -6561 }, \ { 896807, 19683 }, { 1008908, -6561 }, { 1793614, -19683 }, { 2017816, -6561 }, \ { 2690421, 19683 }, { 3026723, -19683 }, { 4035631, -6561 }, { 4708236, -19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/coreihwl/gf2x_mul1.h0000644000327606072450000000000012725540356026125 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul1.h00000000000000gf2x-1.2/already_tuned/coreihwl/gf2x_mul2.h0000644000327606072450000000000012725540356026127 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul2.h00000000000000gf2x-1.2/already_tuned/coreihwl/gf2x_mul3.h0000644000327606072450000000000012725540356026131 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul3.h00000000000000gf2x-1.2/already_tuned/coreihwl/gf2x_mul4.h0000644000327606072450000001002612725540356015607 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL4_H_ #define GF2X_MUL4_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul4cl1_mul1) (unsigned long a, unsigned long b) { __m128i aa = _gf2x_mm_setr_epi64(a, 0); __m128i bb = _gf2x_mm_setr_epi64(b, 0); return _mm_clmulepi64_si128(aa, bb, 0); } #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PXOR5(op1, op2, op3, op4, op5) PXOR(op1, PXOR4(op2, op3, op4, op5)) #define PXOR6(op1, op2, op3, op4, op5, op6) PXOR(op1, PXOR5(op2, op3, op4, op5, op6)) #define PXOR7(op1, op2, op3, op4, op5, op6, op7) PXOR(op1, PXOR6(op2, op3, op4, op5, op6, op7)) #define PZERO _mm_setzero_si128() GF2X_STORAGE_CLASS_mul4 void gf2x_mul4 (unsigned long *c, const unsigned long *a, const unsigned long *b) { // __m128i m0, m1, m2, m3, m4, m5, m6, m7, m8, t0, t1; unsigned long aa4, aa5, aa6, aa7, aa8; unsigned long bb4, bb5, bb6, bb7, bb8; aa4 = a[0] ^ a[1]; bb4 = b[0] ^ b[1]; aa5 = a[2] ^ a[3]; bb5 = b[2] ^ b[3]; aa6 = a[0] ^ a[2]; bb6 = b[0] ^ b[2]; aa7 = a[1] ^ a[3]; bb7 = b[1] ^ b[3]; aa8 = aa4 ^ aa5; bb8 = bb4 ^ bb5; m0 = GF2X_FUNC(mul4cl1_mul1)( a[0], b[0]); m1 = GF2X_FUNC(mul4cl1_mul1)( a[1], b[1]); m2 = GF2X_FUNC(mul4cl1_mul1)( a[2], b[2]); m3 = GF2X_FUNC(mul4cl1_mul1)( a[3], b[3]); m4 = GF2X_FUNC(mul4cl1_mul1)(aa4, bb4); m5 = GF2X_FUNC(mul4cl1_mul1)(aa5, bb5); m6 = GF2X_FUNC(mul4cl1_mul1)(aa6, bb6); m7 = GF2X_FUNC(mul4cl1_mul1)(aa7, bb7); m8 = GF2X_FUNC(mul4cl1_mul1)(aa8, bb8); t0 = PXOR(m0, m1); t1 = PXOR(m2, m3); __m128i ce0 = m0; __m128i ce2 = PXOR3(t0, m2, m6); __m128i ce4 = PXOR3(t1, m1, m7); __m128i ce6 = m3; __m128i co1 = PXOR(t0, m4); __m128i co5 = PXOR(t1, m5); __m128i co3 = PXOR5(co1, co5, m6, m7, m8); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR3(ce2, _mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8))); _mm_storeu_si128((__m128i*)(c+4), PXOR3(ce4, _mm_srli_si128(co3, 8), _mm_slli_si128(co5, 8))); _mm_storeu_si128((__m128i*)(c+6), PXOR(ce6, _mm_srli_si128(co5, 8))); } #undef PXOR #undef PXOR3 #undef PXOR4 #undef PXOR5 #undef PXOR6 #undef PXOR7 #undef PZERO #endif /* GF2X_MUL4_H_ */ gf2x-1.2/already_tuned/coreihwl/gf2x_mul5.h0000644000327606072450000000000012725540356026135 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul5.h00000000000000gf2x-1.2/already_tuned/coreihwl/gf2x_mul6.h0000644000327606072450000000000012725540356026137 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul6.h00000000000000gf2x-1.2/already_tuned/coreihwl/gf2x_mul9.h0000644000327606072450000000000012725540356026145 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul9.h00000000000000gf2x-1.2/already_tuned/generic/0000755000327606072450000000000012725540356013510 500000000000000gf2x-1.2/already_tuned/generic/gf2x_mul2.h0000644000327606072450000000000012725540356025562 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul2.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul3.h0000644000327606072450000000000012725540356025564 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul3.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul4.h0000644000327606072450000000000012725540356025566 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul4.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul5.h0000644000327606072450000000000012725540356025004 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul5.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul6.h0000644000327606072450000000000012725540356025006 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul6.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul7.h0000644000327606072450000000000012725540356025574 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul7.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul8.h0000644000327606072450000000000012725540356025576 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h00000000000000gf2x-1.2/already_tuned/generic/gf2x_mul9.h0000644000327606072450000000000012725540356025600 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul9.h00000000000000gf2x-1.2/already_tuned/generic32/0000755000327606072450000000000012725540356013655 500000000000000gf2x-1.2/already_tuned/generic32/gf2x-thresholds.h0000644000327606072450000001023212725540356016767 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* This file contains sensible defaults to start with, which are updated * by the tuning program */ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "placeholder" #define GF2X_FFT_TUNING_INFO "placeholder" #define GF2X_WORDSIZE 32 #define GF2X_STORAGE_CLASS_mul1 static #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 235 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1600 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 2049 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE {} #define GF2X_BEST_UTOOM_TABLE {} /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ /* these thresholds are just plain crap, but probably better this than * nothing (which would amount to disabling fft altogether) */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 3516, -81 }, { 3587, 1 }, { 3733, -81 }, \ { 3808, 1 }, { 4614, 243 }, { 4921, 1 }, { 5020, -81 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/generic32/gf2x_mul1.h0000644000327606072450000001257212725540356015561 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 32 2. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[4]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 30] << 2) ^ A[(b >> 28) & 3]; hi = lo >> 28; lo = (lo << 4) ^ (A[(b >> 26) & 3] << 2) ^ A[(b >> 24) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 22) & 3] << 2) ^ A[(b >> 20) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 18) & 3] << 2) ^ A[(b >> 16) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 14) & 3] << 2) ^ A[(b >> 12) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 10) & 3] << 2) ^ A[(b >> 8) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 6) & 3] << 2) ^ A[(b >> 4) & 3]; hi = (hi << 4) | (lo >> 28); lo = (lo << 4) ^ (A[(b >> 2) & 3] << 2) ^ A[b & 3]; tmp = -((a >> 31) & 1); tmp &= ((b & 0xeeeeeeee) >> 1); hi = hi ^ tmp; tmp = -((a >> 30) & 1); tmp &= ((b & 0xcccccccc) >> 2); hi = hi ^ tmp; tmp = -((a >> 29) & 1); tmp &= ((b & 0x88888888) >> 3); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/generic64/0000755000327606072450000000000012725540356013662 500000000000000gf2x-1.2/already_tuned/generic64/gf2x-thresholds.h0000644000327606072450000001023212725540356016774 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* This file contains sensible defaults to start with, which are updated * by the tuning program */ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "placeholder" #define GF2X_FFT_TUNING_INFO "placeholder" #define GF2X_WORDSIZE 64 #define GF2X_STORAGE_CLASS_mul1 static #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 235 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1600 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 2049 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE {} #define GF2X_BEST_UTOOM_TABLE {} /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ /* these thresholds are just plain crap, but probably better this than * nothing (which would amount to disabling fft altogether) */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 1736, -81 }, { 1771, 1 }, { 1919, 243 }, \ { 1958, 1 }, { 2307, -81 }, { 2354, 1 }, { 2402, 243 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/generic64/gf2x_mul1.h0000644000327606072450000001602312725540356015561 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 64 3. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[8]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; lo = (A[b >> 63] << 3) ^ A[(b >> 60) & 7]; hi = lo >> 58; lo = (lo << 6) ^ (A[(b >> 57) & 7] << 3) ^ A[(b >> 54) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 51) & 7] << 3) ^ A[(b >> 48) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 45) & 7] << 3) ^ A[(b >> 42) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 39) & 7] << 3) ^ A[(b >> 36) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 33) & 7] << 3) ^ A[(b >> 30) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 27) & 7] << 3) ^ A[(b >> 24) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 21) & 7] << 3) ^ A[(b >> 18) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 15) & 7] << 3) ^ A[(b >> 12) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 9) & 7] << 3) ^ A[(b >> 6) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 3) & 7] << 3) ^ A[b & 7]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xefbefbefbefbefbe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xcf3cf3cf3cf3cf3c) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0x8e38e38e38e38e38) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xc30c30c30c30c30) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0x820820820820820) >> 5); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[8]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 63] << 3) ^ A[(b >> 60) & 7]; hi = lo >> 58; lo = (lo << 6) ^ (A[(b >> 57) & 7] << 3) ^ A[(b >> 54) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 51) & 7] << 3) ^ A[(b >> 48) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 45) & 7] << 3) ^ A[(b >> 42) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 39) & 7] << 3) ^ A[(b >> 36) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 33) & 7] << 3) ^ A[(b >> 30) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 27) & 7] << 3) ^ A[(b >> 24) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 21) & 7] << 3) ^ A[(b >> 18) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 15) & 7] << 3) ^ A[(b >> 12) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 9) & 7] << 3) ^ A[(b >> 6) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 3) & 7] << 3) ^ A[b & 7]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xefbefbefbefbefbe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xcf3cf3cf3cf3cf3c) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0x8e38e38e38e38e38) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xc30c30c30c30c30) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0x820820820820820) >> 5); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[8]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 63] << 3) ^ A[(b >> 60) & 7]; hi = lo >> 58; lo = (lo << 6) ^ (A[(b >> 57) & 7] << 3) ^ A[(b >> 54) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 51) & 7] << 3) ^ A[(b >> 48) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 45) & 7] << 3) ^ A[(b >> 42) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 39) & 7] << 3) ^ A[(b >> 36) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 33) & 7] << 3) ^ A[(b >> 30) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 27) & 7] << 3) ^ A[(b >> 24) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 21) & 7] << 3) ^ A[(b >> 18) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 15) & 7] << 3) ^ A[(b >> 12) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 9) & 7] << 3) ^ A[(b >> 6) & 7]; hi = (hi << 6) | (lo >> 58); lo = (lo << 6) ^ (A[(b >> 3) & 7] << 3) ^ A[b & 7]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xefbefbefbefbefbe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xcf3cf3cf3cf3cf3c) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0x8e38e38e38e38e38) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xc30c30c30c30c30) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0x820820820820820) >> 5); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/opteron/0000755000327606072450000000000012725540356013562 500000000000000gf2x-1.2/already_tuned/opteron/gf2x-thresholds.h0000644000327606072450000003146012725540356016702 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on achille.loria.fr on Wed Mar 25 20:06:09 2009" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 8000000 run on achille.loria.fr on Wed Mar 25 20:15:19 2009 ; based on lt-tunetoom -s 1.05 2048 2048 run on achille.loria.fr on Wed Mar 25 20:06:09 2009" #define GF2X_WORDSIZE 64 /* Notes on achille.loria.fr: * * AMD Opteron(tm) Processor 250 @ 2.4 GHz */ #define GF2X_STORAGE_CLASS_mul1 static inline #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static inline #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 19 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 18 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 125 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1949 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 51 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 536 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, \ 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 1, 2, 2, 2, 2, \ 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0, 2, 2, 1, \ 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, \ 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, \ 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, \ 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, \ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 909, -81 }, { 928, 1 }, { 1569, -81 }, \ { 1667, 1 }, { 1701, -81 }, { 1807, 243 }, { 1844, 1 }, \ { 1919, 243 }, { 1958, 1 }, { 2079, -243 }, { 2121, -81 }, \ { 2164, 1 }, { 2461, 243 }, { 2615, -243 }, { 2922, 1 }, \ { 3076, -243 }, { 3691, 243 }, { 3845, -243 }, { 3999, 729 }, \ { 4152, -243 }, { 5229, 729 }, { 5536, -243 }, { 6613, 729 }, \ { 6920, -243 }, { 7689, -729 }, { 8304, -243 }, { 8991, -729 }, \ { 11072, 2187 }, { 12456, -729 }, { 22144, -2187 }, { 23528, 2187 }, \ { 24912, -729 }, { 33216, 2187 }, { 37367, -2187 }, { 49823, 2187 }, \ { 62279, -2187 }, { 99646, 6561 }, { 112101, -6561 }, { 224202, -2187 }, \ { 298936, 6561 }, { 336303, -6561 }, { 448404, 6561 }, { 560505, -6561 }, \ { 896807, 19683 }, { 1008908, -6561 }, { 1345211, -19683 }, { 2017816, -6561 }, \ { 2690421, 19683 }, { 3026723, -19683 }, { 4035631, -6561 }, { 4484034, 19683 }, \ { 5044538, -19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/opteron/gf2x_mul1.h0000644000327606072450000001633712725540356015471 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 64 4. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/tuned/0000755000327606072450000000000013124153073013201 500000000000000gf2x-1.2/already_tuned/tuned/README0000644000327606072450000000014512725540356014013 00000000000000This directory is intentionally left empty. It is the natural place where tuning results are placed. gf2x-1.2/already_tuned/x86_64/0000755000327606072450000000000012725540356013032 500000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul7.h0000644000327606072450000000000012725540356025116 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul7.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul8.h0000644000327606072450000000000012725540356025120 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul9.h0000644000327606072450000000000012725540356025122 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul9.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x-thresholds.h0000644000327606072450000003567012725540356016161 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef THRESHOLDS_H_ #define THRESHOLDS_H_ /* If you read "placeholder" here, it means that the tuning program has * not been run (or has not completed) */ #define GF2X_TOOM_TUNING_INFO "lt-tunetoom -s 1.05 2048 2048 run on tiramisu.loria.fr on Tue Sep 14 09:31:28 2010" #define GF2X_FFT_TUNING_INFO "lt-tunefft -s 1.02 8000000 run on tiramisu.loria.fr on Tue Sep 14 09:38:49 2010 ; based on lt-tunetoom -s 1.05 2048 2048 run on tiramisu.loria.fr on Tue Sep 14 09:31:28 2010" #define GF2X_WORDSIZE 64 /* Notes on tiramisu.loria.fr: * * Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz */ #define GF2X_STORAGE_CLASS_mul1 static inline #define GF2X_STORAGE_CLASS_mul_1_n static #define GF2X_STORAGE_CLASS_addmul_1_n static #define GF2X_STORAGE_CLASS_mul2 static inline #define GF2X_STORAGE_CLASS_mul3 static #define GF2X_STORAGE_CLASS_mul4 static #define GF2X_STORAGE_CLASS_mul5 static #define GF2X_STORAGE_CLASS_mul6 static #define GF2X_STORAGE_CLASS_mul7 static #define GF2X_STORAGE_CLASS_mul8 static #define GF2X_STORAGE_CLASS_mul9 static /* First size for which KARA is used. Essentially hard-coded, since the * sizes up to 9 words are already karatsuba, unrolled. The unrolled * routines handle their own temporary storage on the stack. */ #define GF2X_MUL_KARA_THRESHOLD 10 /* First size for which TC3W is used. It is assumed that TC3W is used * before TC3 kicks in. */ /* must be >= 8 */ #define GF2X_MUL_TOOMW_THRESHOLD 18 /* First size for which TC3 is used. This threshold is informative, it is * not used in the code */ /* must be >= 17 */ #define GF2X_MUL_TOOM_THRESHOLD 21 /* First size for which TC4 is used. This threshold is informative, it is * not used in the code */ /* must be >= 30 */ #define GF2X_MUL_TOOM4_THRESHOLD 156 /* Size above which TC4 is the only TC variant used. */ #define GF2X_MUL_TOOM4_ALWAYS_THRESHOLD 1949 /* First size for which TC3U is used */ /* must be >= 33 */ #define GF2X_MUL_TOOMU_THRESHOLD 49 /* Size above which TC3U is the only TCU variant used. */ #define GF2X_MUL_TOOMU_ALWAYS_THRESHOLD 1276 /* The default values here are appropriate for the tuning program. * Appropriate values are substituted later on. Note that the tuning * table is always created with this size, to that re-tuning is possible * at any time. */ #define GF2X_TOOM_TUNING_LIMIT 2048 #define GF2X_BEST_TOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, \ 0, 0, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, \ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 3, } #define GF2X_BEST_UTOOM_TABLE { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, } /* This macro is not what you think, and does not completely belong here. * It merely recalls that the FFT code *DOES NOT WORK* below this size. * So GF2X_MUL_FFT_TABLE should not wander in this bleak range. */ #define GF2X_MUL_FFT_THRESHOLD 28 /* {n, K} means use FFT(|K|) up from n words, */ /* where |K|<3 stands for Toom-Cook 3, K < 0 means use FFT2 */ #define GF2X_MUL_FFT_TABLE { \ { 1, 1 }, { 1736, -81 }, { 1771, 1 }, { 1919, 243 }, \ { 1958, 1 }, { 2307, -81 }, { 2354, 1 }, { 2402, 243 }, \ { 2451, 1 }, { 2552, 243 }, { 2657, -243 }, { 3691, 243 }, \ { 3845, -243 }, { 6459, 729 }, { 6920, -243 }, { 7689, 729 }, \ { 8304, -243 }, { 9929, -729 }, { 22144, 2187 }, { 24912, -729 }, \ { 35983, 2187 }, { 37367, -729 }, { 44287, -2187 }, { 49823, 2187 }, \ { 62279, -2187 }, { 99646, 6561 }, { 112101, -2187 }, { 199291, -6561 }, \ { 224202, -2187 }, { 298936, 6561 }, { 336303, -6561 }, { 448404, 6561 }, \ { 560505, -6561 }, { 896807, 19683 }, { 1008908, -6561 }, { 1569412, -19683 }, \ { 2017816, -6561 }, { 2690421, 19683 }, { 3026723, -19683 }, { 4035631, 19683 }, \ { 5044538, -19683 }, } #endif /* THRESHOLDS_H_ */ /* vim: set ft=c: */ gf2x-1.2/already_tuned/x86_64/gf2x_mul1.h0000644000327606072450000001633712725540356014741 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL1_H_ #define GF2X_MUL1_H_ /* This file was generated automatically with ./gen_bb_mul_code 64 4. Don't edit it! */ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul1 void gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b) { unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; c[0] = lo; c[1] = hi; } GF2X_STORAGE_CLASS_mul_1_n unsigned long gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; cp[i] = carry ^ lo; carry = hi; } return carry; } GF2X_STORAGE_CLASS_addmul_1_n unsigned long gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb, unsigned long a) { long i; unsigned long carry = 0, b; unsigned long hi, lo, tmp, A[16]; A[0] = 0; A[1] = a; A[2] = A[1] << 1; A[3] = A[2] ^ a; A[4] = A[2] << 1; A[5] = A[4] ^ a; A[6] = A[3] << 1; A[7] = A[6] ^ a; A[8] = A[4] << 1; A[9] = A[8] ^ a; A[10] = A[5] << 1; A[11] = A[10] ^ a; A[12] = A[6] << 1; A[13] = A[12] ^ a; A[14] = A[7] << 1; A[15] = A[14] ^ a; for (i = 0; i < sb; i++) { b = bp[i]; lo = (A[b >> 60] << 4) ^ A[(b >> 56) & 15]; hi = lo >> 56; lo = (lo << 8) ^ (A[(b >> 52) & 15] << 4) ^ A[(b >> 48) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 44) & 15] << 4) ^ A[(b >> 40) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 36) & 15] << 4) ^ A[(b >> 32) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 28) & 15] << 4) ^ A[(b >> 24) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 20) & 15] << 4) ^ A[(b >> 16) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 12) & 15] << 4) ^ A[(b >> 8) & 15]; hi = (hi << 8) | (lo >> 56); lo = (lo << 8) ^ (A[(b >> 4) & 15] << 4) ^ A[b & 15]; tmp = -((a >> 63) & 1); tmp &= ((b & 0xfefefefefefefefe) >> 1); hi = hi ^ tmp; tmp = -((a >> 62) & 1); tmp &= ((b & 0xfcfcfcfcfcfcfcfc) >> 2); hi = hi ^ tmp; tmp = -((a >> 61) & 1); tmp &= ((b & 0xf8f8f8f8f8f8f8f8) >> 3); hi = hi ^ tmp; tmp = -((a >> 60) & 1); tmp &= ((b & 0xf0f0f0f0f0f0f0f0) >> 4); hi = hi ^ tmp; tmp = -((a >> 59) & 1); tmp &= ((b & 0xe0e0e0e0e0e0e0e0) >> 5); hi = hi ^ tmp; tmp = -((a >> 58) & 1); tmp &= ((b & 0xc0c0c0c0c0c0c0c0) >> 6); hi = hi ^ tmp; tmp = -((a >> 57) & 1); tmp &= ((b & 0x8080808080808080) >> 7); hi = hi ^ tmp; dp[i] = cp[i] ^ (carry ^ lo); carry = hi; } return carry; } #endif /* GF2X_MUL1_H_ */ gf2x-1.2/already_tuned/x86_64/gf2x_mul2.h0000644000327606072450000001546312725540356014741 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 128x128 -> 256 bit product using SSE2 instructions. */ #ifndef GF2X_MUL2_H_ #define GF2X_MUL2_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_SSE2_SUPPORT #error "This code needs sse-2 support" #endif #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) #warning "Your GCC version is buggy. Binary fields may fail randomly" /* Gcc bug reports 37101 and 37340 -- the only convenient fix is to * upgrade to 4.3.2 */ #endif /* This code has been modified in comparison to the previously existing * one, in order to use Intel intrinsics exclusively, and not rely on gcc * syntax. * * The Intel C++ Intrinsics Reference is a good read. However I can't * find the official link right now. An old version can be found in the wild: * * http://www.info.univ-angers.fr/~richer/ens/l3info/ao/intel_intrinsics.pdf * * I don't even know if this document evolved. Probably not. * * It says: ``Document Number: 312482-003US'' */ GF2X_STORAGE_CLASS_mul2 void gf2x_mul2(unsigned long * t, unsigned long const * s1, unsigned long const * s2) { #define SHL(x, r) _mm_slli_epi64((x), (r)) #define SHR(x, r) _mm_srli_epi64((x), (r)) #define SHLD(x, r) _mm_slli_si128((x), (r) >> 3) #define SHRD(x, r) _mm_srli_si128((x), (r) >> 3) #define XOREQ(lop, rop) lop = _mm_xor_si128((lop), (rop)) #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PAND(lop, rop) _mm_and_si128((lop), (rop)) __m128i u; __m128i t0; __m128i t1; __m128i t2; __m128i g[16]; __m128i w; // __m128i m = _mm_set1_epi32(0xeeeeeeee); __m128i m = _gf2x_mm_set1_epi64_c(0xeeeeeeeeeeeeeeee); /* sequence update walk */ __m128i b0 = _mm_loadu_si128((__m128i*) s2); g[ 0] = _mm_setzero_si128(); g[ 1] = b0; __m128i v1 = _mm_loadu_si128((__m128i*) s1); w = _mm_sub_epi64(_mm_setzero_si128(), SHR(b0,63)); __m128i v2 = _mm_unpackhi_epi64(v1, v1); v1 = _mm_unpacklo_epi64(v1, v1); v1 = SHR(PAND(v1, m), 1); t1 = PAND(v1, w); g[ 2] = SHL(b0, 1); g[ 3] = PXOR(g[ 2], b0); v2 = SHR(PAND(v2, m), 1); t2 = PAND(v2, w); g[ 4] = SHL(g[ 2], 1); g[ 5] = PXOR(g[ 4], b0); w = _mm_sub_epi64(_mm_setzero_si128(), SHR(g[ 2],63)); g[ 6] = SHL(g[ 3], 1); g[ 7] = PXOR(g[ 6], b0); v1 = SHR(PAND(v1, m), 1); XOREQ(t1, PAND(v1, w)); g[ 8] = SHL(g[ 4], 1); g[ 9] = PXOR(g[ 8], b0); v2 = SHR(PAND(v2, m), 1); XOREQ(t2, PAND(v2, w)); g[10] = SHL(g[ 5], 1); g[11] = PXOR(g[10], b0); w = _mm_sub_epi64(_mm_setzero_si128(), SHR(g[4],63)); g[12] = SHL(g[ 6], 1); g[13] = PXOR(g[12], b0); v1 = SHR(PAND(v1, m), 1); XOREQ(t1, PAND(v1, w)); g[14] = SHL(g[ 7], 1); g[15] = PXOR(g[14], b0); v2 = SHR(PAND(v2, m), 1); XOREQ(t2, PAND(v2, w)); /* round 0 */ u = g[s1[0] & 15]; t0 = u; u = g[s1[0] >> 4 & 15]; XOREQ(t0, SHL(u, 4)); XOREQ(t1, SHR(u, 60)); u = g[s1[0] >> 8 & 15]; XOREQ(t0, SHL(u, 8)); XOREQ(t1, SHR(u, 56)); u = g[s1[0] >> 12 & 15]; XOREQ(t0, SHL(u, 12)); XOREQ(t1, SHR(u, 52)); u = g[s1[0] >> 16 & 15]; XOREQ(t0, SHL(u, 16)); XOREQ(t1, SHR(u, 48)); u = g[s1[0] >> 20 & 15]; XOREQ(t0, SHL(u, 20)); XOREQ(t1, SHR(u, 44)); u = g[s1[0] >> 24 & 15]; XOREQ(t0, SHL(u, 24)); XOREQ(t1, SHR(u, 40)); u = g[s1[0] >> 28 & 15]; XOREQ(t0, SHL(u, 28)); XOREQ(t1, SHR(u, 36)); u = g[s1[0] >> 32 & 15]; XOREQ(t0, SHL(u, 32)); XOREQ(t1, SHR(u, 32)); u = g[s1[0] >> 36 & 15]; XOREQ(t0, SHL(u, 36)); XOREQ(t1, SHR(u, 28)); u = g[s1[0] >> 40 & 15]; XOREQ(t0, SHL(u, 40)); XOREQ(t1, SHR(u, 24)); u = g[s1[0] >> 44 & 15]; XOREQ(t0, SHL(u, 44)); XOREQ(t1, SHR(u, 20)); u = g[s1[0] >> 48 & 15]; XOREQ(t0, SHL(u, 48)); XOREQ(t1, SHR(u, 16)); u = g[s1[0] >> 52 & 15]; XOREQ(t0, SHL(u, 52)); XOREQ(t1, SHR(u, 12)); u = g[s1[0] >> 56 & 15]; XOREQ(t0, SHL(u, 56)); XOREQ(t1, SHR(u, 8)); u = g[s1[0] >> 60 & 15]; XOREQ(t0, SHL(u, 60)); XOREQ(t1, SHR(u, 4)); /* round 1 */ u = g[s1[1] & 15]; XOREQ(t1, u); u = g[s1[1] >> 4 & 15]; XOREQ(t1, SHL(u, 4)); XOREQ(t2, SHR(u, 60)); u = g[s1[1] >> 8 & 15]; XOREQ(t1, SHL(u, 8)); XOREQ(t2, SHR(u, 56)); u = g[s1[1] >> 12 & 15]; XOREQ(t1, SHL(u, 12)); XOREQ(t2, SHR(u, 52)); u = g[s1[1] >> 16 & 15]; XOREQ(t1, SHL(u, 16)); XOREQ(t2, SHR(u, 48)); u = g[s1[1] >> 20 & 15]; XOREQ(t1, SHL(u, 20)); XOREQ(t2, SHR(u, 44)); u = g[s1[1] >> 24 & 15]; XOREQ(t1, SHL(u, 24)); XOREQ(t2, SHR(u, 40)); u = g[s1[1] >> 28 & 15]; XOREQ(t1, SHL(u, 28)); XOREQ(t2, SHR(u, 36)); u = g[s1[1] >> 32 & 15]; XOREQ(t1, SHL(u, 32)); XOREQ(t2, SHR(u, 32)); u = g[s1[1] >> 36 & 15]; XOREQ(t1, SHL(u, 36)); XOREQ(t2, SHR(u, 28)); u = g[s1[1] >> 40 & 15]; XOREQ(t1, SHL(u, 40)); XOREQ(t2, SHR(u, 24)); u = g[s1[1] >> 44 & 15]; XOREQ(t1, SHL(u, 44)); XOREQ(t2, SHR(u, 20)); u = g[s1[1] >> 48 & 15]; XOREQ(t1, SHL(u, 48)); XOREQ(t2, SHR(u, 16)); u = g[s1[1] >> 52 & 15]; XOREQ(t1, SHL(u, 52)); XOREQ(t2, SHR(u, 12)); u = g[s1[1] >> 56 & 15]; XOREQ(t1, SHL(u, 56)); XOREQ(t2, SHR(u, 8)); u = g[s1[1] >> 60 & 15]; XOREQ(t1, SHL(u, 60)); XOREQ(t2, SHR(u, 4)); /* end */ /* store result */ _mm_storeu_si128((__m128i*)t, PXOR(t0, SHLD(t1, 64))); _mm_storeu_si128((__m128i*)(t+2), PXOR(t2, SHRD(t1, 64))); #undef SHL #undef SHR #undef SHLD #undef SHRD #undef XOREQ #undef PXOR #undef PAND } #endif /* GF2X_MUL2_H_ */ gf2x-1.2/already_tuned/x86_64/gf2x_mul3.h0000644000327606072450000000000012725540356025106 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul3.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul4.h0000644000327606072450000000000012725540356025110 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul4.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul5.h0000644000327606072450000000000012725540356025112 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul5.h00000000000000gf2x-1.2/already_tuned/x86_64/gf2x_mul6.h0000644000327606072450000000000012725540356025114 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul6.h00000000000000gf2x-1.2/toom-gpl-placeholder.c0000644000327606072450000000255012725540357013361 00000000000000/* This file is part of the gf2x library. Copyright 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gf2x.h" #include "gf2x/gf2x-impl.h" const char * gf2x_toom_gpl_status="LGPL-licensed GF2X"; gf2x-1.2/lowlevel/0000755000327606072450000000000013126452066011101 500000000000000gf2x-1.2/lowlevel/Makefile.am0000644000327606072450000000266412725540356013071 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. EXTRA_DIST= # This one is disabled by default, but we include it nevertheless EXTRA_DIST+=mul3k3.c EXTRA_DIST+=README.adding_code gf2x-1.2/lowlevel/Makefile.in0000644000327606072450000003321213126452055013065 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lowlevel ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # This one is disabled by default, but we include it nevertheless EXTRA_DIST = mul3k3.c README.adding_code all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lowlevel/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lowlevel/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/lowlevel/mul3k3.c0000644000327606072450000000555412725540356012320 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL3_H_ #define GF2X_MUL3_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* XXX XXX XXX This is dangerous XXX XXX XXX * * we are here exposing gf2x_mul2b and gf2x_mul2c, with unprotected * prefixes. If another source file happens to also define this functions * with the same mechanism, both cannot coexist. */ #undef GF2X_MUL2_H_ #define CARRY #include "mul2cl.c" #undef CARRY #undef GF2X_MUL2_H_ #define BORROW #include "mul2cl.c" #undef BORROW /* uses Montgomery's variant of Karatsuba for n=2k+1 odd, with M(2k+1) = M(k) + 2M(k+1) - 1, see Five, Six, and Seven-Term {K}aratsuba-Like Formulae, IEEE Transactions on Computers, volume 54, number 3, pages 362-369, 2005 */ GF2X_STORAGE_CLASS_mul3 void gf2x_mul3 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long d[2], aa[2], bb[2], p[4]; /* let A0 = {a, 2}, A1 = {a+2, 1}, B0 = {b, 2}, B1 = {b+2, 1} */ aa[0] = a[0] ^ a[2]; aa[1] = a[1]; bb[0] = b[0] ^ b[2]; bb[1] = b[1]; gf2x_mul2c (c, a, b, d); /* {c, 4} = A0 * B0 and {d, 2} = {a+1, 1} * {b+1, 1} */ gf2x_mul2b (p, aa, bb, d); /* {p, 4} = (A0 + A1) * (B0 + B1) */ gf2x_mul1 (c + 4, a[2], b[2]); p[0] ^= c[0] ^ c[4]; p[1] ^= c[1] ^ c[5]; c[5] ^= p[3] ^ c[3]; c[4] ^= p[2] ^ c[2]; c[2] ^= p[0]; c[3] ^= p[1]; } #endif /* GF2X_MUL3_H_ */ gf2x-1.2/lowlevel/README.adding_code0000644000327606072450000000376512725540356014137 00000000000000 (This documentation is related to the development of gf2x) This lowlevel/ subdirectory is the place where new code may be added to gf2x, in particular new code for lowlevel routines, so-called mul1, mul2, mul3, and so on. The steps for adding code are: * Choose a file name. Assuming you are coding a new version of mul3, for instance, you might choose to name your file mul3foo.c. The file name must match mul[0-9] because probably some scripts rely on it. * Write a skeleton for mul3foo.c based on pre-existing files. There are a couple of very important things in writing this file: - The file must be guarded by a #ifndef GF2X_MUL3_H_ / ... / #endif construct. The name of the macro matters. - The file must include gf2x-small.h - The function included must be called gf2x_mul3, and match the expected prototype. * For inserting this function in the tuning mechanism, edit Makefile.am ; Since the tedious Makefile.am code is now generated by a perl script (albeit not automatically), one just has to add a new line among those starting with #* Then, to regenerate the tedious section of Makefile.am, do: perl -i ./generate-test-list.pl Makefile.am Note that this edits Makefile.am in place, so you'd better quit your text editing section on Makefil.am first. Generated code: It is more complicated to add a new code _generation_ mechanism, and requires the following steps. * Assuming the generator code is in C (but it does not matter much), then it must be codded, and a rule for building the _generator_ must be added to Makefile.am. There is not much to it, probably a matter of adding only a simple line to Makefile.am * Your generator must accept arguments, and output its result to a file whose name matches gen_mul3 (for a mul3 of course). Or possibly write to stdout. Then you have to copy one of the very ugly paragraphs, e.g. the one for tune_gen_mul1_w64k2. The same warnings as above apply. * The generation rule has to be told to generate-test-list.pl somehow. gf2x-1.2/lowlevel/mul1cl.c0000644000327606072450000000000012725540356022706 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul1.h00000000000000gf2x-1.2/lowlevel/mul2cl.c0000644000327606072450000000716512725540356012400 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 128x128 -> 256 bit product using pclmulqdq instruction. */ #ifndef GF2X_MUL2_H_ #define GF2X_MUL2_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif GF2X_STORAGE_CLASS_mul2 #if defined(CARRY) && defined(BORROW) #error "internal error, mul2cl.c can't be included with both BORROW and CARRY!" #endif #if defined(CARRY) /* {t, 4} <- {s1, 2} * {s2, 2}, and {c, 2} <- {s1+1, 1} * {s2+1, 1} */ void gf2x_mul2c (unsigned long *t, unsigned long const *s1, unsigned long const *s2, unsigned long *c) #elif defined(BORROW) void /* {t, 4} <- {s1, 2} * {s2, 2}, knowing {c, 2} = {s1+1, 1} * {s2+1, 1} */ gf2x_mul2b (unsigned long *t, unsigned long const *s1, unsigned long const *s2, unsigned long const *c) #else void gf2x_mul2(unsigned long * t, unsigned long const * s1, unsigned long const * s2) #endif { #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PZERO _mm_setzero_si128() __m128i ss1 = _mm_loadu_si128((__m128i *)s1); __m128i ss2 = _mm_loadu_si128((__m128i *)s2); __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); #ifndef BORROW __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); #endif ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1,0,3,2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1,0,3,2))); __m128i tk = _mm_clmulepi64_si128(ss1, ss2, 0); #ifndef BORROW tk = PXOR(tk, PXOR(t00, t11)); #endif /* store result */ #if defined(BORROW) tk = PXOR(tk, PXOR(t00, _mm_loadu_si128((__m128i*)c))); _mm_storeu_si128((__m128i *)(t), PXOR(t00, _mm_unpacklo_epi64(PZERO, tk))); _mm_storeu_si128((__m128i *)(t+2),PXOR(c, _mm_unpackhi_epi64(tk, PZERO))); #elif defined(CARRY) _mm_storeu_si128((__m128i *)c, t11); _mm_storeu_si128((__m128i *)(t), PXOR(t00, _mm_unpacklo_epi64(PZERO, tk))); _mm_storeu_si128((__m128i *)(t+2),PXOR(t11, _mm_unpackhi_epi64(tk, PZERO))); #else _mm_storeu_si128((__m128i *)(t), PXOR(t00, _mm_unpacklo_epi64(PZERO, tk))); _mm_storeu_si128((__m128i *)(t+2),PXOR(t11, _mm_unpackhi_epi64(tk, PZERO))); #endif #undef PZERO #undef PXOR } #endif /* GF2X_MUL2_H_ */ gf2x-1.2/lowlevel/mul2cl2.c0000644000327606072450000000000012725540356022772 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul2.h00000000000000gf2x-1.2/lowlevel/mul2k.c0000644000327606072450000000000012725540356022377 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul2.h00000000000000gf2x-1.2/lowlevel/mul2t.c0000644000327606072450000001417012725540356012237 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Implements 128x128 -> 256 bit product using SSE2 instructions. */ #ifndef GF2X_MUL2_H_ #define GF2X_MUL2_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_SSE2_SUPPORT #error "This code needs sse-2 support" #endif #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) #warning "Your GCC version is buggy. Binary fields may fail randomly" /* Gcc bug reports 37101 and 37340 -- the only convenient fix is to * upgrade to 4.3.2 */ #endif GF2X_STORAGE_CLASS_mul2 void gf2x_mul2(unsigned long * t, unsigned long const * s1, unsigned long const * s2) { #define SHL(x, r) _mm_slli_epi64((x), (r)) #define SHR(x, r) _mm_srli_epi64((x), (r)) #define SHLD(x, r) _mm_slli_si128((x), (r) >> 3) #define SHRD(x, r) _mm_srli_si128((x), (r) >> 3) #define XOREQ(lop, rop) lop = _mm_xor_si128((lop), (rop)) #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PAND(lop, rop) _mm_and_si128((lop), (rop)) __m128i u; __m128i t0; __m128i t1; __m128i t2; __m128i g[16]; __m128i w; __m128i m = _gf2x_mm_set1_epi64_c(0xeeeeeeeeeeeeeeee); /* sequence update walk */ g[ 0] = _mm_setzero_si128(); __m128i b0 = _gf2x_mm_setr_epi64(s2[0], s2[1]); g[ 1] = b0; __m128i v1 = _gf2x_mm_set1_epi64(s1[0]); w = -SHR(b0,63); __m128i v2 = _gf2x_mm_set1_epi64(s1[1]); v1 = SHR(PAND(v1, m), 1); t1 = PAND(v1, w); g[ 2] = SHL(b0, 1); g[ 3] = PXOR(g[ 2], b0); v2 = SHR(PAND(v2, m), 1); t2 = PAND(v2, w); g[ 4] = SHL(g[ 2], 1); g[ 5] = PXOR(g[ 4], b0); w = -SHR(g[ 2],63); g[ 6] = SHL(g[ 3], 1); g[ 7] = PXOR(g[ 6], b0); v1 = SHR(PAND(v1, m), 1); XOREQ(t1, PAND(v1, w)); g[ 8] = SHL(g[ 4], 1); g[ 9] = PXOR(g[ 8], b0); v2 = SHR(PAND(v2, m), 1); XOREQ(t2, PAND(v2, w)); g[10] = SHL(g[ 5], 1); g[11] = PXOR(g[10], b0); w = -SHR(g[4],63); g[12] = SHL(g[ 6], 1); g[13] = PXOR(g[12], b0); v1 = SHR(PAND(v1, m), 1); XOREQ(t1, PAND(v1, w)); g[14] = SHL(g[ 7], 1); g[15] = PXOR(g[14], b0); v2 = SHR(PAND(v2, m), 1); XOREQ(t2, PAND(v2, w)); /* round 0 */ u = g[s1[0] & 15]; t0 = u; u = g[s1[0] >> 4 & 15]; XOREQ(t0, SHL(u, 4)); XOREQ(t1, SHR(u, 60)); u = g[s1[0] >> 8 & 15]; XOREQ(t0, SHL(u, 8)); XOREQ(t1, SHR(u, 56)); u = g[s1[0] >> 12 & 15]; XOREQ(t0, SHL(u, 12)); XOREQ(t1, SHR(u, 52)); u = g[s1[0] >> 16 & 15]; XOREQ(t0, SHL(u, 16)); XOREQ(t1, SHR(u, 48)); u = g[s1[0] >> 20 & 15]; XOREQ(t0, SHL(u, 20)); XOREQ(t1, SHR(u, 44)); u = g[s1[0] >> 24 & 15]; XOREQ(t0, SHL(u, 24)); XOREQ(t1, SHR(u, 40)); u = g[s1[0] >> 28 & 15]; XOREQ(t0, SHL(u, 28)); XOREQ(t1, SHR(u, 36)); u = g[s1[0] >> 32 & 15]; XOREQ(t0, SHL(u, 32)); XOREQ(t1, SHR(u, 32)); u = g[s1[0] >> 36 & 15]; XOREQ(t0, SHL(u, 36)); XOREQ(t1, SHR(u, 28)); u = g[s1[0] >> 40 & 15]; XOREQ(t0, SHL(u, 40)); XOREQ(t1, SHR(u, 24)); u = g[s1[0] >> 44 & 15]; XOREQ(t0, SHL(u, 44)); XOREQ(t1, SHR(u, 20)); u = g[s1[0] >> 48 & 15]; XOREQ(t0, SHL(u, 48)); XOREQ(t1, SHR(u, 16)); u = g[s1[0] >> 52 & 15]; XOREQ(t0, SHL(u, 52)); XOREQ(t1, SHR(u, 12)); u = g[s1[0] >> 56 & 15]; XOREQ(t0, SHL(u, 56)); XOREQ(t1, SHR(u, 8)); u = g[s1[0] >> 60 & 15]; XOREQ(t0, SHL(u, 60)); XOREQ(t1, SHR(u, 4)); /* round 1 */ u = g[s1[1] & 15]; XOREQ(t1, u); u = g[s1[1] >> 4 & 15]; XOREQ(t1, SHL(u, 4)); XOREQ(t2, SHR(u, 60)); u = g[s1[1] >> 8 & 15]; XOREQ(t1, SHL(u, 8)); XOREQ(t2, SHR(u, 56)); u = g[s1[1] >> 12 & 15]; XOREQ(t1, SHL(u, 12)); XOREQ(t2, SHR(u, 52)); u = g[s1[1] >> 16 & 15]; XOREQ(t1, SHL(u, 16)); XOREQ(t2, SHR(u, 48)); u = g[s1[1] >> 20 & 15]; XOREQ(t1, SHL(u, 20)); XOREQ(t2, SHR(u, 44)); u = g[s1[1] >> 24 & 15]; XOREQ(t1, SHL(u, 24)); XOREQ(t2, SHR(u, 40)); u = g[s1[1] >> 28 & 15]; XOREQ(t1, SHL(u, 28)); XOREQ(t2, SHR(u, 36)); u = g[s1[1] >> 32 & 15]; XOREQ(t1, SHL(u, 32)); XOREQ(t2, SHR(u, 32)); u = g[s1[1] >> 36 & 15]; XOREQ(t1, SHL(u, 36)); XOREQ(t2, SHR(u, 28)); u = g[s1[1] >> 40 & 15]; XOREQ(t1, SHL(u, 40)); XOREQ(t2, SHR(u, 24)); u = g[s1[1] >> 44 & 15]; XOREQ(t1, SHL(u, 44)); XOREQ(t2, SHR(u, 20)); u = g[s1[1] >> 48 & 15]; XOREQ(t1, SHL(u, 48)); XOREQ(t2, SHR(u, 16)); u = g[s1[1] >> 52 & 15]; XOREQ(t1, SHL(u, 52)); XOREQ(t2, SHR(u, 12)); u = g[s1[1] >> 56 & 15]; XOREQ(t1, SHL(u, 56)); XOREQ(t2, SHR(u, 8)); u = g[s1[1] >> 60 & 15]; XOREQ(t1, SHL(u, 60)); XOREQ(t2, SHR(u, 4)); /* end */ /* store result */ _mm_storeu_si128((__m128i*)t, PXOR(t0, SHLD(t1, 64))); _mm_storeu_si128((__m128i*)(t+2), PXOR(t2, SHRD(t1, 64))); #undef SHL #undef SHR #undef SHLD #undef SHRD #undef XOREQ #undef PXOR #undef PAND } #endif /* GF2X_MUL2_H_ */ gf2x-1.2/lowlevel/mul2t2.c0000644000327606072450000000000012725540356021263 1gf2x-1.2/already_tuned/x86_64/gf2x_mul2.h00000000000000gf2x-1.2/lowlevel/mul3cl.c0000644000327606072450000000000012725540356022712 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul3.h00000000000000gf2x-1.2/lowlevel/mul3k.c0000644000327606072450000000000012725540356022401 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul3.h00000000000000gf2x-1.2/lowlevel/mul3k2.c0000644000327606072450000000000012725540356021526 1gf2x-1.2/already_tuned/armv7l/gf2x_mul3.h00000000000000gf2x-1.2/lowlevel/mul3t.c0000644000327606072450000000000012725540356021626 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul3.h00000000000000gf2x-1.2/lowlevel/mul4cl1.c0000644000327606072450000000000012725540356022277 1gf2x-1.2/already_tuned/coreihwl/gf2x_mul4.h00000000000000gf2x-1.2/lowlevel/mul4clk.c0000644000327606072450000000000012725540356023067 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul4.h00000000000000gf2x-1.2/lowlevel/mul4k.c0000644000327606072450000000000012725540356022403 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul4.h00000000000000gf2x-1.2/lowlevel/mul4t.c0000644000327606072450000000000012725540356021630 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul4.h00000000000000gf2x-1.2/lowlevel/mul5clk2.c0000644000327606072450000001057212725540356012634 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ /* This specialized version avoids loads, and relies on the destination * being aligned, so that aligned stores are possible */ #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PZERO _mm_setzero_si128() static inline __m128i GF2X_FUNC(mul5clk2_mul1)(__m128i ss1, __m128i ss2) { return _mm_clmulepi64_si128(ss1, ss2, 0); } static inline void GF2X_FUNC(mul5clk2_mul2)(__m128i * t, __m128i ss1, __m128i ss2) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1,0,3,2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1,0,3,2))); __m128i tk = PXOR(PXOR(t00, t11), _mm_clmulepi64_si128(ss1, ss2, 0)); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(t11, _mm_unpackhi_epi64(tk, PZERO)); } /* variant with 5 calls to mul2 and 1 to mul1, i.e., 16 multiplications */ GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { __m128i aa[3], bb[3]; __m128i p0[2], p1[2], p2[1]; __m128i pp0[2], pp1[2], pp2[2]; __m128i a0 = _mm_loadu_si128((__m128i*)(a)); __m128i a1 = _mm_loadu_si128((__m128i*)(a+2)); /* load lower half only, using movq */ __m128i a2 = _mm_loadl_epi64((__m128i*)(a+4)); __m128i b0 = _mm_loadu_si128((__m128i*)(b)); __m128i b1 = _mm_loadu_si128((__m128i*)(b+2)); /* load lower half only, using movq */ __m128i b2 = _mm_loadl_epi64((__m128i*)(b+4)); aa[0] = PXOR(a1, a2); aa[1] = PXOR(a0, a2); aa[2] = PXOR(a0, a1); bb[0] = PXOR(b1, b2); bb[1] = PXOR(b0, b2); bb[2] = PXOR(b0, b1); GF2X_FUNC(mul5clk2_mul2)(p0, a0, b0); GF2X_FUNC(mul5clk2_mul2)(p1, a1, b1); p2[0] = GF2X_FUNC(mul5clk2_mul1)(a2, b2); GF2X_FUNC(mul5clk2_mul2)(pp0, aa[0], bb[0]); GF2X_FUNC(mul5clk2_mul2)(pp1, aa[1], bb[1]); GF2X_FUNC(mul5clk2_mul2)(pp2, aa[2], bb[2]); _mm_storeu_si128((__m128i*)(c + 0), p0[0]); _mm_storeu_si128((__m128i*)(c + 2), PXOR(PXOR3(p0[0], p1[0], pp2[0]) , p0[1])); _mm_storeu_si128((__m128i*)(c + 4), PXOR(PXOR4(p0[0], p1[0], p2[0], pp1[0]), PXOR3(p0[1], p1[1], pp2[1]))); _mm_storeu_si128((__m128i*)(c + 6), PXOR(PXOR3(pp0[0], p1[0], p2[0]) , PXOR3(p0[1], p1[1], pp1[1]))); _mm_storeu_si128((__m128i*)(c + 8), PXOR(p2[0] , PXOR(pp0[1], p1[1]))); } #undef PXOR #undef PXOR3 #undef PXOR4 #undef PZERO #endif /* GF2X_MUL5_H_ */ gf2x-1.2/lowlevel/mul5clk_c.c0000644000327606072450000000000012725540356023373 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul5.h00000000000000gf2x-1.2/lowlevel/mul5k3.c0000644000327606072450000001204412725540356012312 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul5k3_mul1) (unsigned long a, unsigned long b) { return _mm_clmulepi64_si128(_gf2x_mm_setr_epi64(a,0), _gf2x_mm_setr_epi64(b,0), 0); } #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) /* uses the variant of Karatsuba with 6 multiplications {d, 2} <- {a+2,1} * {b+2,1} */ GF2X_STORAGE_CLASS_mul3 void GF2X_FUNC(mul5k3_mul3c) (unsigned long *c, const unsigned long *a, const unsigned long *b, unsigned long *d) { unsigned long aa[3], bb[3]; __m128i p0, p1, p2; __m128i pp0, pp1, pp2; aa[0] = a[1]^a[2]; aa[1] = a[0]^a[2]; aa[2] = a[0]^a[1]; bb[0] = b[1]^b[2]; bb[1] = b[0]^b[2]; bb[2] = b[0]^b[1]; p0 = GF2X_FUNC(mul5k3_mul1)(a[0], b[0]); p1 = GF2X_FUNC(mul5k3_mul1)(a[1], b[1]); p2 = GF2X_FUNC(mul5k3_mul1)(a[2], b[2]); pp0 = GF2X_FUNC(mul5k3_mul1)(aa[0], bb[0]); pp1 = GF2X_FUNC(mul5k3_mul1)(aa[1], bb[1]); pp2 = GF2X_FUNC(mul5k3_mul1)(aa[2], bb[2]); __m128i ce0 = p0; __m128i ce2 = PXOR(p0, PXOR(p1, PXOR(p2, pp1))); __m128i ce4 = p2; __m128i co1 = PXOR(p0, PXOR(p1, pp2)); __m128i co3 = PXOR(pp0, PXOR(p1, p2)); _mm_storeu_si128((__m128i*)(d), p2); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR(ce2, PXOR(_mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8)))); _mm_storeu_si128((__m128i*)(c+4), PXOR(ce4, _mm_srli_si128(co3, 8))); } /* uses the variant of Karatsuba with 6 multiplications, assumes {d, 2} = {a+2,1} * {b+2,1} */ GF2X_STORAGE_CLASS_mul3 void GF2X_FUNC(mul5k3_mul3b) (unsigned long *c, const unsigned long *a, const unsigned long *b, const unsigned long *d) { unsigned long aa[3], bb[3]; __m128i p0, p1, p2; __m128i pp0, pp1, pp2; aa[0] = a[1]^a[2]; aa[1] = a[0]^a[2]; aa[2] = a[0]^a[1]; bb[0] = b[1]^b[2]; bb[1] = b[0]^b[2]; bb[2] = b[0]^b[1]; p0 = GF2X_FUNC(mul5k3_mul1)(a[0], b[0]); p1 = GF2X_FUNC(mul5k3_mul1)(a[1], b[1]); p2 = _mm_loadu_si128((__m128i *) d); pp0 = GF2X_FUNC(mul5k3_mul1)(aa[0], bb[0]); pp1 = GF2X_FUNC(mul5k3_mul1)(aa[1], bb[1]); pp2 = GF2X_FUNC(mul5k3_mul1)(aa[2], bb[2]); __m128i ce0 = p0; __m128i ce2 = PXOR(p0, PXOR(p1, PXOR(p2, pp1))); __m128i ce4 = p2; __m128i co1 = PXOR(p0, PXOR(p1, pp2)); __m128i co3 = PXOR(pp0, PXOR(p1, p2)); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR(ce2, PXOR(_mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8)))); _mm_storeu_si128((__m128i*)(c+4), PXOR(ce4, _mm_srli_si128(co3, 8))); } #undef PXOR /* based on mul5k_b.c, version with M(5)=M(2)+2M(3)-1=14 multiplications */ GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[3], bb[3], ab[6], ab3, ab4, ab5, d[2]; gf2x_mul2 (c+6, a+3, b+3); GF2X_FUNC(mul5k3_mul3c) (c, a, b, d); aa[0] = a[0] ^ a[3]; aa[1] = a[1] ^ a[4]; aa[2] = a[2]; bb[0] = b[0] ^ b[3]; bb[1] = b[1] ^ b[4]; bb[2] = b[2]; GF2X_FUNC(mul5k3_mul3b) (ab, aa, bb, d); ab3 = ab[3] ^ c[3]; ab4 = ab[4] ^ c[4]; ab5 = ab[5] ^ c[5]; c[3] ^= ab[0] ^ c[0] ^ c[6]; c[4] ^= ab[1] ^ c[1] ^ c[7]; c[5] ^= ab[2] ^ c[2] ^ c[8]; c[6] ^= ab3 ^ c[9]; c[7] ^= ab4; c[8] ^= ab5; } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/lowlevel/mul5k_a.c0000644000327606072450000000571712725540356012540 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL5_H_ #define GF2X_MUL5_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" GF2X_STORAGE_CLASS_mul5 void gf2x_mul5 (unsigned long *c, const unsigned long *a, const unsigned long *b) { /* adapted from gf2x_mul6, with a[5]=b[5]=c[10]=c[11]=0 */ unsigned long d01[4], d1[4], d12[4], aa[2], bb[2]; gf2x_mul2 (c, a, b); /* D0 */ gf2x_mul2 (d1, a + 2, b + 2); /* D1 */ gf2x_mul1 (c + 8, a[4], b[4]); /* D2 has only two words */ aa[0] = a[0] ^ a[2]; aa[1] = a[1] ^ a[3]; bb[0] = b[0] ^ b[2]; bb[1] = b[1] ^ b[3]; gf2x_mul2 (d01, aa, bb); /* D01 */ aa[0] = a[0] ^ a[4]; aa[1] = a[1]; bb[0] = b[0] ^ b[4]; bb[1] = b[1]; gf2x_mul2 (c + 4, aa, bb); /* D02 */ aa[0] = a[2] ^ a[4]; aa[1] = a[3]; bb[0] = b[2] ^ b[4]; bb[1] = b[3]; gf2x_mul2 (d12, aa, bb); /* D12 */ /* low(D1) + high(D0) is used three times */ c[2] ^= d1[0]; c[3] ^= d1[1]; /* low(D1) + high(D0) */ c[4] ^= c[2]; c[5] ^= c[3]; /* low(D02) + low(D1) + high(D0) */ d12[0] ^= c[2]; d12[1] ^= c[3]; /* low(D12) + low(D1) + high(D0) */ /* low(D2) + high(D1) is used three times */ c[8] ^= d1[2]; c[9] ^= d1[3]; /* low(D2) + high(D1) */ c[6] ^= c[8]; c[7] ^= c[9]; /* high(D02) + low(D2) + high(D1) */ d01[2] ^= c[8]; d01[3] ^= c[9]; /* high(D01) + low(D2) + high(D1) */ c[2] ^= d01[0] ^ c[0]; c[3] ^= d01[1] ^ c[1]; /* l(D1)+h(D0)+l(D01)+l(D0) */ c[4] ^= c[0] ^ d01[2]; c[5] ^= c[1] ^ d01[3]; c[6] ^= d12[0]; c[7] ^= d12[1]; c[8] ^= d12[2]; c[9] ^= d12[3]; } #endif /* GF2X_MUL5_H_ */ gf2x-1.2/lowlevel/mul5k_b.c0000644000327606072450000000000012725540356022122 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul5.h00000000000000gf2x-1.2/lowlevel/mul5k_c.c0000644000327606072450000000000012725540356021752 1gf2x-1.2/already_tuned/armv7l/gf2x_mul5.h00000000000000gf2x-1.2/lowlevel/mul5k_d.c0000644000327606072450000000000012725540356022710 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul5.h00000000000000gf2x-1.2/lowlevel/mul6clk2.c0000644000327606072450000000000012725540356023155 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul6.h00000000000000gf2x-1.2/lowlevel/mul6k_a.c0000644000327606072450000000000012725540356021752 1gf2x-1.2/already_tuned/armv7l/gf2x_mul6.h00000000000000gf2x-1.2/lowlevel/mul6k_b.c0000644000327606072450000000000012725540356022124 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul6.h00000000000000gf2x-1.2/lowlevel/mul6k_c.c0000644000327606072450000000000012725540356022711 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul6.h00000000000000gf2x-1.2/lowlevel/mul7cl.c0000644000327606072450000000000012725540356022722 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul7.h00000000000000gf2x-1.2/lowlevel/mul7k.c0000644000327606072450000000000012725540356022411 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul7.h00000000000000gf2x-1.2/lowlevel/mul7k3.c0000644000327606072450000001420712725540356012317 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL7_H_ #define GF2X_MUL7_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PZERO _mm_setzero_si128() /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline void GF2X_FUNC(mul7k3_mul2)(__m128i *t, __m128i ss1, __m128i ss2) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1, 0, 3, 2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1, 0, 3, 2))); __m128i tk = PXOR(PXOR(t00, t11), _mm_clmulepi64_si128(ss1, ss2, 0)); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(t11, _mm_unpackhi_epi64(tk, PZERO)); } static inline void GF2X_FUNC(mul7k3_mul2b)(__m128i *t, __m128i ss1, __m128i ss2, const unsigned long * sc) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1, 0, 3, 2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1, 0, 3, 2))); __m128i c = _mm_loadu_si128((__m128i*)sc); __m128i tk = PXOR(PXOR(t00, c), _mm_clmulepi64_si128(ss1, ss2, 0)); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(c, _mm_unpackhi_epi64(tk, PZERO)); } static inline void GF2X_FUNC(mul7k3_mul2c)(__m128i *t, __m128i ss1, __m128i ss2, unsigned long *sc) { __m128i t00 = _mm_clmulepi64_si128(ss1, ss2, 0); __m128i t11 = _mm_clmulepi64_si128(ss1, ss2, 0x11); ss1 = PXOR(ss1, _mm_shuffle_epi32(ss1, _MM_SHUFFLE(1, 0, 3, 2))); ss2 = PXOR(ss2, _mm_shuffle_epi32(ss2, _MM_SHUFFLE(1, 0, 3, 2))); __m128i tk = PXOR(PXOR(t00, t11), _mm_clmulepi64_si128(ss1, ss2, 0)); _mm_storeu_si128((__m128i*)sc, t11); t[0] = PXOR(t00, _mm_unpacklo_epi64(PZERO, tk)); t[1] = PXOR(t11, _mm_unpackhi_epi64(tk, PZERO)); } /* specialized Karatsuba with 3 calls to mul2, i.e., 9 multiplications {d,2} <- {a+3,1} * {b+3,1} */ GF2X_STORAGE_CLASS_mul4 void GF2X_FUNC(mul7k3_mul4c) (unsigned long *c, const unsigned long *a, const unsigned long *b, unsigned long *d) { __m128i ab[2]; __m128i lo[2], hi[2]; __m128i a0 = _mm_loadu_si128((__m128i*)a); __m128i a2 = _mm_loadu_si128((__m128i*)(a+2)); __m128i b0 = _mm_loadu_si128((__m128i*)b); __m128i b2 = _mm_loadu_si128((__m128i*)(b+2)); GF2X_FUNC(mul7k3_mul2)(lo, a0, b0); GF2X_FUNC(mul7k3_mul2c)(hi, a2, b2, d); __m128i middle = PXOR(lo[1], hi[0]); GF2X_FUNC(mul7k3_mul2)(ab, PXOR(a0, a2), PXOR(b0, b2)); _mm_storeu_si128((__m128i*)(c + 0), lo[0]); _mm_storeu_si128((__m128i*)(c + 2), PXOR3(ab[0], lo[0], middle)); _mm_storeu_si128((__m128i*)(c + 4), PXOR3(ab[1], hi[1], middle)); _mm_storeu_si128((__m128i*)(c + 6), hi[1]); } /* specialized Karatsuba with 3 calls to mul2, i.e., 9 multiplications, assume {d,2} = {a+3,1} * {b+3,1} */ GF2X_STORAGE_CLASS_mul4 void GF2X_FUNC(mul7k3_mul4b) (unsigned long *c, const unsigned long *a, const unsigned long *b, unsigned long *d) { __m128i ab[2]; __m128i lo[2], hi[2]; __m128i a0 = _mm_loadu_si128((__m128i*)a); __m128i a2 = _mm_loadu_si128((__m128i*)(a+2)); __m128i b0 = _mm_loadu_si128((__m128i*)b); __m128i b2 = _mm_loadu_si128((__m128i*)(b+2)); GF2X_FUNC(mul7k3_mul2)(lo, a0, b0); GF2X_FUNC(mul7k3_mul2b)(hi, a2, b2, d); __m128i middle = PXOR(lo[1], hi[0]); GF2X_FUNC(mul7k3_mul2)(ab, PXOR(a0, a2), PXOR(b0, b2)); _mm_storeu_si128((__m128i*)(c + 0), lo[0]); _mm_storeu_si128((__m128i*)(c + 2), PXOR3(ab[0], lo[0], middle)); _mm_storeu_si128((__m128i*)(c + 4), PXOR3(ab[1], hi[1], middle)); _mm_storeu_si128((__m128i*)(c + 6), hi[1]); } #undef PXOR #undef PXOR3 #undef PZERO /* based on mul7k.c, version with M(3)+2M(4)-1=23 multiplications */ GF2X_STORAGE_CLASS_mul7 void gf2x_mul7 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[4], bb[4], ab[8], ab4, ab5, ab6, ab7, d[2]; gf2x_mul3 (c+8, a+4, b+4); GF2X_FUNC(mul7k3_mul4c) (c, a, b, d); aa[0] = a[0] ^ a[4]; aa[1] = a[1] ^ a[5]; aa[2] = a[2] ^ a[6]; aa[3] = a[3]; bb[0] = b[0] ^ b[4]; bb[1] = b[1] ^ b[5]; bb[2] = b[2] ^ b[6]; bb[3] = b[3]; GF2X_FUNC(mul7k3_mul4b) (ab, aa, bb, d); ab4 = ab[4] ^ c[4]; ab5 = ab[5] ^ c[5]; ab6 = ab[6] ^ c[6]; ab7 = ab[7] ^ c[7]; c[4] ^= ab[0] ^ c[0] ^ c[8]; c[5] ^= ab[1] ^ c[1] ^ c[9]; c[6] ^= ab[2] ^ c[2] ^ c[10]; c[7] ^= ab[3] ^ c[3] ^ c[11]; c[8] ^= ab4 ^ c[12]; c[9] ^= ab5 ^ c[13]; c[10] ^= ab6; c[11] ^= ab7; } #endif /* GF2X_MUL7_H_ */ gf2x-1.2/lowlevel/mul8k.c0000644000327606072450000000000012725540356022413 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul8.h00000000000000gf2x-1.2/lowlevel/mul9cl.c0000644000327606072450000000000012725540356022726 1gf2x-1.2/already_tuned/x86_64_pclmul/gf2x_mul9.h00000000000000gf2x-1.2/lowlevel/mul9clk2.c0000644000327606072450000002067712725540356012647 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL9_H_ #define GF2X_MUL9_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul9clk2_mul1) (unsigned long a, unsigned long b) { __m128i aa = _gf2x_mm_setr_epi64(a, 0); __m128i bb = _gf2x_mm_setr_epi64(b, 0); return _mm_clmulepi64_si128(aa, bb, 0); } #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PXOR5(op1, op2, op3, op4, op5) PXOR(op1, PXOR4(op2, op3, op4, op5)) #define PXOR6(op1, op2, op3, op4, op5, op6) PXOR(op1, PXOR5(op2, op3, op4, op5, op6)) #define PXOR7(op1, op2, op3, op4, op5, op6, op7) PXOR(op1, PXOR6(op2, op3, op4, op5, op6, op7)) #define PZERO _mm_setzero_si128() /* uses the variant of Karatsuba with 6 multiplications */ static void GF2X_FUNC(mul9clk2_mul3) (__m128i *ce, __m128i *co, const unsigned long *a, const unsigned long *b) { unsigned long aa[3], bb[3]; __m128i p0, p1, p2; __m128i pp0, pp1, pp2; aa[0] = a[1]^a[2]; aa[1] = a[0]^a[2]; aa[2] = a[0]^a[1]; bb[0] = b[1]^b[2]; bb[1] = b[0]^b[2]; bb[2] = b[0]^b[1]; p0 = GF2X_FUNC(mul9clk2_mul1)(a[0], b[0]); p1 = GF2X_FUNC(mul9clk2_mul1)(a[1], b[1]); p2 = GF2X_FUNC(mul9clk2_mul1)(a[2], b[2]); pp0 = GF2X_FUNC(mul9clk2_mul1)(aa[0], bb[0]); pp1 = GF2X_FUNC(mul9clk2_mul1)(aa[1], bb[1]); pp2 = GF2X_FUNC(mul9clk2_mul1)(aa[2], bb[2]); ce[0] = p0; ce[1] = PXOR4(p0, p1, p2, pp1); ce[2] = p2; co[0] = PXOR3(p0, p1, pp2); co[1] = PXOR3(pp0, p1, p2); } /* recursive application of the Karatsuba-3 algorithm with 6 multiplies, i.e., with a total of 6*6=36 multiplies */ GF2X_STORAGE_CLASS_mul9 void gf2x_mul9 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[9], bb[9]; /* * a = al(t) + t^3 * am(t) + t^6 * ah(t) * b = bl(t) + t^3 * bm(t) + t^6 * bh(t) * * aa0 = am + ah * aa1 = al + ah * aa2 = al + am * * p0e + z^64 * p0o = al * bl * p1e + z^64 * p1o = am * bm * p2e + z^64 * p2o = ah * bh * * aa0 * bb0 = (am*bm + ah*bh + am*bh + ah*bm) * aa1 * bb1 = (al*bl + ah*bh + al*bh + ah*bl) * aa2 * bb2 = (al*bl + am*bm + al*bm + am*bl) * * a*b = al*bl * t^0 * + (aa2*bb2 + al*bl + am*bm) * t^3 * + (am*bm + al*bl + ah*bh + aa1 * bb1) * t^6 * + (aa0*bb0 + ah*bh + am*bm) * t^9 * + ah*bh * t^12 */ aa[0] = a[3]^a[6]; aa[1] = a[4]^a[7]; aa[2] = a[5]^a[8]; aa[3] = a[0]^a[6]; aa[4] = a[1]^a[7]; aa[5] = a[2]^a[8]; aa[6] = a[0]^a[3]; aa[7] = a[1]^a[4]; aa[8] = a[2]^a[5]; bb[0] = b[3]^b[6]; bb[1] = b[4]^b[7]; bb[2] = b[5]^b[8]; bb[3] = b[0]^b[6]; bb[4] = b[1]^b[7]; bb[5] = b[2]^b[8]; bb[6] = b[0]^b[3]; bb[7] = b[1]^b[4]; bb[8] = b[2]^b[5]; __m128i p0e[3], p0o[2]; __m128i p1e[3], p1o[2]; __m128i p2e[3], p2o[2]; __m128i q0e[3], q0o[2]; __m128i q1e[3], q1o[2]; __m128i q2e[3], q2o[2]; GF2X_FUNC(mul9clk2_mul3) (p0e, p0o, a+0, b+0); GF2X_FUNC(mul9clk2_mul3) (p1e, p1o, a+3, b+3); GF2X_FUNC(mul9clk2_mul3) (p2e, p2o, a+6, b+6); GF2X_FUNC(mul9clk2_mul3) (q0e, q0o, aa+0, bb+0); GF2X_FUNC(mul9clk2_mul3) (q1e, q1o, aa+3, bb+3); GF2X_FUNC(mul9clk2_mul3) (q2e, q2o, aa+6, bb+6); __m128i e,h,l; e = p0e[0]; l = p0o[0]; _mm_storeu_si128((__m128i*)(c), PXOR(e, _mm_slli_si128(l, 8))); e = p0e[1]; h=l; l= PXOR4(p0o[1], p1e[0], q2e[0], p0e[0]); _mm_storeu_si128((__m128i*)(c+2), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = PXOR4(p0e[2], p0o[0], p1o[0], q2o[0]); h=l; l= PXOR3(p1e[1], q2e[1], p0e[1]); _mm_storeu_si128((__m128i*)(c+4), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = PXOR7(p0e[0], q1e[0], p2e[0], p1e[0], p0o[1], p1o[1], q2o[1]); h=l; l= PXOR7(p0o[0], q1o[0], p2o[0], p1o[0], p1e[2], q2e[2], p0e[2]); _mm_storeu_si128((__m128i*)(c+6), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = PXOR4(p0e[1], q1e[1], p2e[1], p1e[1]); h=l; l= PXOR7(p0o[1], q1o[1], p2o[1], p1o[1], q0e[0], p1e[0], p2e[0]); _mm_storeu_si128((__m128i*)(c+8), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = PXOR7(p0e[2], q1e[2], p2e[2], p1e[2], q0o[0], p1o[0], p2o[0]); h=l; l= PXOR3(q0e[1], p1e[1], p2e[1]); _mm_storeu_si128((__m128i*)(c+10), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = PXOR4(p2e[0], q0o[1], p1o[1], p2o[1]); h=l; l= PXOR4(p2o[0], q0e[2], p1e[2], p2e[2]); _mm_storeu_si128((__m128i*)(c+12), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = p2e[1]; h=l; l=p2o[1]; _mm_storeu_si128((__m128i*)(c+14), PXOR3(e, _mm_slli_si128(l, 8), _mm_srli_si128(h, 8))); e = p2e[2]; h=l; _mm_storeu_si128((__m128i*)(c+16), PXOR(e, _mm_srli_si128(h, 8))); /* * a*b = al*bl * t^0 * + (aa2*bb2 + al*bl + am*bm) * t^3 * + (am*bm + al*bl + ah*bh + aa1 * bb1) * t^6 * + (aa0*bb0 + ah*bh + am*bm) * t^9 * + ah*bh * t^12 * * this is the 64-bit breakdown c[0] = p0e[0] ^ ; c[1] = p0e[1] ^ p0o[0] ; c[2] = p0e[2] ^ p0o[1] ; c[3] = p0e[3] ^ p0o[2]p1e[0]q2e[0]p0e[0]; c[4] = p0e[4]p0o[0]p1o[0]q2o[0] ^ p0o[3]p1e[1]q2e[1]p0e[1]; c[5] = p0e[5]p0o[1]p1o[1]q2o[1] ^ p1e[2]q2e[2]p0e[2]; c[6] = p0e[0]q1e[0]p2e[0]p1e[0]p0o[2]p1o[2]q2o[2] ^ p1e[3]q2e[3]p0e[3]; c[7] = p0e[1]q1e[1]p2e[1]p1e[1]p0o[3]p1o[3]q2o[3] ^ p0o[0]q1o[0]p2o[0]p1o[0]p1e[4]q2e[4]p0e[4]; c[8] = p0e[2]q1e[2]p2e[2]p1e[2] ^ p0o[1]q1o[1]p2o[1]p1o[1]p1e[5]q2e[5]p0e[5]; c[9] = p0e[3]q1e[3]p2e[3]p1e[3] ^ p0o[2]q1o[2]p2o[2]p1o[2]q0e[0]p1e[0]p2e[0]; c[10] = p0e[4]q1e[4]p2e[4]p1e[4]q0o[0]p1o[0]p2o[0] ^ p0o[3]q1o[3]p2o[3]p1o[3]q0e[1]p1e[1]p2e[1]; c[11] = p0e[5]q1e[5]p2e[5]p1e[5]q0o[1]p1o[1]p2o[1] ^ q0e[2]p1e[2]p2e[2]; c[12] = p2e[0] q0o[2]p1o[2]p2o[2] ^ q0e[3]p1e[3]p2e[3]; c[13] = p2e[1] q0o[3]p1o[3]p2o[3] ^ p2o[0]q0e[4]p1e[4]p2e[4]; c[14] = p2e[2] ^ p2o[1]q0e[5]p1e[5]p2e[5]; c[15] = p2e[3] ^ p2o[2] ; c[16] = p2e[4] ^ p2o[3] ; c[17] = p2e[5] ^ ; */ } #undef PXOR #undef PXOR3 #undef PXOR4 #undef PXOR5 #undef PXOR6 #undef PXOR7 #undef PZERO #endif /* GF2X_MUL9_H_ */ gf2x-1.2/lowlevel/mul9k.c0000644000327606072450000000000012725540356022415 1gf2x-1.2/already_tuned/x86_64_nosse/gf2x_mul9.h00000000000000gf2x-1.2/lowlevel/mul9k2.c0000644000327606072450000000000012725540356021713 1gf2x-1.2/already_tuned/x86_sse2/gf2x_mul9.h00000000000000gf2x-1.2/lowlevel/mul9k3.c0000644000327606072450000002100112725540356012307 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2012, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GF2X_MUL9_H_ #define GF2X_MUL9_H_ #include "gf2x.h" /* All gf2x source files for lowlevel functions must include gf2x-small.h * This is mandatory for the tuning mechanism. */ #include "gf2x/gf2x-small.h" #if GF2X_WORDSIZE != 64 #error "This code is for 64-bit only" #endif #ifndef GF2X_HAVE_PCLMUL_SUPPORT #error "This code needs pclmul support" #endif /* TODO: if somebody comes up with a neat way to improve the interface so * as to remove the false dependency on pclmul, that would be nice. */ static inline __m128i GF2X_FUNC(mul9k3_mul1) (unsigned long a, unsigned long b) { __m128i aa = _gf2x_mm_setr_epi64(a, 0); __m128i bb = _gf2x_mm_setr_epi64(b, 0); return _mm_clmulepi64_si128(aa, bb, 0); } #define PXOR(lop, rop) _mm_xor_si128((lop), (rop)) #define PXOR3(op1, op2, op3) PXOR(op1, PXOR(op2, op3)) #define PXOR4(op1, op2, op3, op4) PXOR(op1, PXOR3(op2, op3, op4)) #define PXOR5(op1, op2, op3, op4, op5) PXOR(op1, PXOR4(op2, op3, op4, op5)) #define PZERO _mm_setzero_si128() /* same as mul5, but stores a[4]*b[4] into {d,2} */ GF2X_STORAGE_CLASS_mul5 void GF2X_FUNC(mul9k3_mul5c) (unsigned long *c, const unsigned long *a, const unsigned long *b, unsigned long *d) { /* Montgomery formulae with 13 multiplications */ unsigned long ta[3], tb[3], pa[8], pb[8]; __m128i p0, p2, p4, p6, p8, p10, p12, p14, p16, p18, p20, p22, p24; __m128i t0, t2, t4, t6, t8, t10, t12; ta[0] = a[0] ^ a[4] ; tb[0] = b[0] ^ b[4]; ta[1] = a[1] ^ a[2] ; tb[1] = b[1] ^ b[2]; ta[2] = a[3] ^ ta[0] ; tb[2] = b[3] ^ tb[0]; pa[0] = ta[1] ^ ta[2] ; pb[0] = tb[1] ^ tb[2]; pa[1] = a[2] ^ ta[2] ; pb[1] = b[2] ^ tb[2]; pa[2] = ta[0] ^ ta[1] ; pb[2] = tb[0] ^ tb[1]; pa[3] = a[1] ^ ta[2] ; pb[3] = b[1] ^ tb[2]; pa[4] = a[0] ^ a[2] ^ a[3] ; pb[4] = b[0] ^ b[2] ^ b[3]; pa[5] = a[4] ^ ta[1] ; pb[5] = b[4] ^ tb[1]; pa[6] = a[3] ^ a[4] ; pb[6] = b[3] ^ b[4]; pa[7] = a[0] ^ a[1] ; pb[7] = b[0] ^ b[1]; p0 = GF2X_FUNC(mul9k3_mul1)(pa[0], pb[0]); p2 = GF2X_FUNC(mul9k3_mul1)(pa[1], pb[1]); p4 = GF2X_FUNC(mul9k3_mul1)(pa[2], pb[2]); p6 = GF2X_FUNC(mul9k3_mul1)(pa[3], pb[3]); p8 = GF2X_FUNC(mul9k3_mul1)(pa[4], pb[4]); p10 = GF2X_FUNC(mul9k3_mul1)(pa[5], pb[5]); p12 = GF2X_FUNC(mul9k3_mul1)(pa[6], pb[6]); p14 = GF2X_FUNC(mul9k3_mul1)(pa[7], pb[7]); p16 = GF2X_FUNC(mul9k3_mul1)(ta[0], tb[0]); p18 = GF2X_FUNC(mul9k3_mul1)(a[4], b[4]); p20 = GF2X_FUNC(mul9k3_mul1)(a[3], b[3]); p22 = GF2X_FUNC(mul9k3_mul1)(a[1], b[1]); p24 = GF2X_FUNC(mul9k3_mul1)(a[0], b[0]); t0 = PXOR(p14, p24); t2 = PXOR(p12, p18); t4 = PXOR(p2, p16); t6 = PXOR(p0, p6); t8 = PXOR(p4, p16); t10 = PXOR(p10, t0); t12 = PXOR(p8, t2); __m128i ce0 = p24; __m128i ce2 = PXOR3(p18, t8, t10); __m128i ce4 = PXOR5(p0, p20, p22, t10, t12); __m128i ce6 = PXOR3(p24, t4, t12); __m128i ce8 = p18; __m128i co1 = PXOR(p22, t0); __m128i co3 = PXOR3(t2, t4, t6); __m128i co5 = PXOR3(t0, t6, t8); __m128i co7 = PXOR(p20, t2); _mm_storeu_si128((__m128i*)(d), p18); /* a[4] * b[4] */ _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR3(ce2 , _mm_srli_si128(co1, 8) , _mm_slli_si128(co3, 8))); _mm_storeu_si128((__m128i*)(c+4), PXOR3(ce4 , _mm_srli_si128(co3, 8) , _mm_slli_si128(co5, 8))); _mm_storeu_si128((__m128i*)(c+6), PXOR3(ce6 , _mm_srli_si128(co5, 8) , _mm_slli_si128(co7, 8))); _mm_storeu_si128((__m128i*)(c+8), PXOR(ce8 , _mm_srli_si128(co7, 8))); } /* same as mul5, but assumes {d,2} contains a[4]*b[4] */ GF2X_STORAGE_CLASS_mul5 void GF2X_FUNC(mul9k3_mul5b) (unsigned long *c, const unsigned long *a, const unsigned long *b, const unsigned long *d) { /* Montgomery formulae with 13 multiplications */ unsigned long ta[3], tb[3], pa[8], pb[8]; __m128i p0, p2, p4, p6, p8, p10, p12, p14, p16, p18, p20, p22, p24; __m128i t0, t2, t4, t6, t8, t10, t12; ta[0] = a[0] ^ a[4] ; tb[0] = b[0] ^ b[4]; ta[1] = a[1] ^ a[2] ; tb[1] = b[1] ^ b[2]; ta[2] = a[3] ^ ta[0] ; tb[2] = b[3] ^ tb[0]; pa[0] = ta[1] ^ ta[2] ; pb[0] = tb[1] ^ tb[2]; pa[1] = a[2] ^ ta[2] ; pb[1] = b[2] ^ tb[2]; pa[2] = ta[0] ^ ta[1] ; pb[2] = tb[0] ^ tb[1]; pa[3] = a[1] ^ ta[2] ; pb[3] = b[1] ^ tb[2]; pa[4] = a[0] ^ a[2] ^ a[3] ; pb[4] = b[0] ^ b[2] ^ b[3]; pa[5] = a[4] ^ ta[1] ; pb[5] = b[4] ^ tb[1]; pa[6] = a[3] ^ a[4] ; pb[6] = b[3] ^ b[4]; pa[7] = a[0] ^ a[1] ; pb[7] = b[0] ^ b[1]; p0 = GF2X_FUNC(mul9k3_mul1)(pa[0], pb[0]); p2 = GF2X_FUNC(mul9k3_mul1)(pa[1], pb[1]); p4 = GF2X_FUNC(mul9k3_mul1)(pa[2], pb[2]); p6 = GF2X_FUNC(mul9k3_mul1)(pa[3], pb[3]); p8 = GF2X_FUNC(mul9k3_mul1)(pa[4], pb[4]); p10 = GF2X_FUNC(mul9k3_mul1)(pa[5], pb[5]); p12 = GF2X_FUNC(mul9k3_mul1)(pa[6], pb[6]); p14 = GF2X_FUNC(mul9k3_mul1)(pa[7], pb[7]); p16 = GF2X_FUNC(mul9k3_mul1)(ta[0], tb[0]); /* p18 = GF2X_FUNC(mul9k3_mul1)(a[4], b[4]); */ p18 = _mm_loadu_si128((__m128i *) d); p20 = GF2X_FUNC(mul9k3_mul1)(a[3], b[3]); p22 = GF2X_FUNC(mul9k3_mul1)(a[1], b[1]); p24 = GF2X_FUNC(mul9k3_mul1)(a[0], b[0]); t0 = PXOR(p14, p24); t2 = PXOR(p12, p18); t4 = PXOR(p2, p16); t6 = PXOR(p0, p6); t8 = PXOR(p4, p16); t10 = PXOR(p10, t0); t12 = PXOR(p8, t2); __m128i ce0 = p24; __m128i ce2 = PXOR3(p18, t8, t10); __m128i ce4 = PXOR5(p0, p20, p22, t10, t12); __m128i ce6 = PXOR3(p24, t4, t12); __m128i ce8 = p18; __m128i co1 = PXOR(p22, t0); __m128i co3 = PXOR3(t2, t4, t6); __m128i co5 = PXOR3(t0, t6, t8); __m128i co7 = PXOR(p20, t2); _mm_storeu_si128((__m128i*)(c), PXOR(ce0, _mm_slli_si128(co1, 8))); _mm_storeu_si128((__m128i*)(c+2), PXOR3(ce2, _mm_srli_si128(co1, 8), _mm_slli_si128(co3, 8))); _mm_storeu_si128((__m128i*)(c+4), PXOR3(ce4, _mm_srli_si128(co3, 8), _mm_slli_si128(co5, 8))); _mm_storeu_si128((__m128i*)(c+6), PXOR3(ce6, _mm_srli_si128(co5, 8), _mm_slli_si128(co7, 8))); _mm_storeu_si128((__m128i*)(c+8), PXOR(ce8, _mm_srli_si128(co7, 8))); } /* (based on mul9k.c) 1 call to mul4 and 2 calls to mul5 minus one multiplication, i.e., 34 multiplications with mul5clk_c */ GF2X_STORAGE_CLASS_mul9 void gf2x_mul9 (unsigned long *c, const unsigned long *a, const unsigned long *b) { unsigned long aa[5], bb[5], ab[10], ab5, ab6, ab7, ab8, ab9, d[2]; gf2x_mul4 (c+10, a+5, b+5); GF2X_FUNC(mul9k3_mul5c) (c, a, b, d); /* a[4]*b[4] is cached in d */ aa[0] = a[0] ^ a[5]; aa[1] = a[1] ^ a[6]; aa[2] = a[2] ^ a[7]; aa[3] = a[3] ^ a[8]; aa[4] = a[4]; bb[0] = b[0] ^ b[5]; bb[1] = b[1] ^ b[6]; bb[2] = b[2] ^ b[7]; bb[3] = b[3] ^ b[8]; bb[4] = b[4]; GF2X_FUNC(mul9k3_mul5b) (ab, aa, bb, d); ab5 = ab[5] ^ c[5]; ab6 = ab[6] ^ c[6]; ab7 = ab[7] ^ c[7]; ab8 = ab[8] ^ c[8]; ab9 = ab[9] ^ c[9]; c[5] ^= ab[0] ^ c[0] ^ c[10]; c[6] ^= ab[1] ^ c[1] ^ c[11]; c[7] ^= ab[2] ^ c[2] ^ c[12]; c[8] ^= ab[3] ^ c[3] ^ c[13]; c[9] ^= ab[4] ^ c[4] ^ c[14]; c[10] ^= ab5 ^ c[15]; c[11] ^= ab6 ^ c[16]; c[12] ^= ab7 ^ c[17]; c[13] ^= ab8; c[14] ^= ab9; } #undef PXOR #undef PXOR3 #undef PXOR4 #undef PXOR5 #undef PZERO #endif /* GF2X_MUL9_H_ */ gf2x-1.2/lowlevel/gen_bb_mul_code.c0000644000327606072450000001536712725540356014270 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generates low-level multiplication routines over GF(2)[x]. */ #include #include #include int main(int argc, char *argv[]) { unsigned long i; unsigned long w, K, CHOP, REM, fn; unsigned long MASK, mask2; if (argc != 3) { fprintf(stderr, "Usage: %s k\n", argv[0]); exit(1); } w = atoi(argv[1]); K = atoi(argv[2]); printf( "/* This file is part of the gf2x library.\n" "\n" " Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013\n" " Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann\n" "\n" " This program is free software; you can redistribute it and/or modify it\n" " under the terms of either:\n" " - If the archive contains a file named toom-gpl.c (not a trivial\n" " placeholder), the GNU General Public License as published by the Free\n" " Software Foundation; either version 3 of the License, or (at your\n" " option) any later version.\n" " - If the archive contains a file named toom-gpl.c which is a trivial\n" " placeholder, the GNU Lesser General Public License as published by\n" " the Free Software Foundation; either version 2.1 of the License, or\n" " (at your option) any later version.\n" "\n" " This program is distributed in the hope that it will be useful, but WITHOUT\n" " ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" " FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details.\n" "\n" " You should have received a copy of the GNU General Public License as\n" " well as the GNU Lesser General Public License along with this program;\n" " see the files COPYING and COPYING.LIB. If not, write to the Free\n" " Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n" " 02110-1301, USA.\n" "*/\n" "\n"); printf("#ifndef GF2X_MUL1_H_\n"); printf("#define GF2X_MUL1_H_\n"); printf("\n"); printf("/* This file was generated automatically with\n"); printf(" %s %lu %lu. Don't edit it! */\n", argv[0], w, K); printf("\n"); printf( "#include \"gf2x.h\"\n" "/* All gf2x source files for lowlevel functions must include gf2x-small.h\n" " * This is mandatory for the tuning mechanism. */\n" "#include \"gf2x/gf2x-small.h\"\n" "\n"); for (fn = 0; fn < 3; fn++) { if (fn == 0) { printf("GF2X_STORAGE_CLASS_mul1 void\n"); printf("gf2x_mul1 (unsigned long *c, unsigned long a, unsigned long b)\n"); } else if (fn == 1) { // continue; /* mul_1_n is no longer used */ printf("GF2X_STORAGE_CLASS_mul_1_n unsigned long\n"); printf ("gf2x_mul_1_n (unsigned long *cp, const unsigned long *bp, long sb, unsigned long a)\n"); } else if (fn == 2) { printf("GF2X_STORAGE_CLASS_addmul_1_n unsigned long\n"); printf ("gf2x_addmul_1_n (unsigned long *dp, const unsigned long *cp, const unsigned long* bp, long sb,\n"); printf(" unsigned long a)\n"); } printf("{\n"); if (fn > 0) { /* Mul1/AddMul1 */ printf(" long i;\n"); printf(" unsigned long carry = 0, b;\n"); } printf(" unsigned long hi, lo, tmp, A[%lu];\n", 1UL << K); printf("\n"); printf(" A[0] = 0;\t\t"); /* do not truncate: fix non-considered bit products afterwards */ printf("A[1] = a;\n"); for (i = 2u; i < (1u << K); i++) { if (i % 2 == 0) printf(" A[%lu] = A[%lu] << 1;\t", i, i / 2); else printf("A[%lu] = A[%lu] ^ a;\n", i, i - 1); } printf("\n"); if (fn > 0) { printf(" for (i = 0; i < sb; i++)\n"); printf(" {\n"); printf(" b = bp[i];\n"); } REM = w - 2 * K; MASK = (1UL << K) - 1UL; for (CHOP = 0; CHOP + 2 * K < w; CHOP += 2 * K); CHOP = w - CHOP; /* now 1 <= CHOP <= 2 * K, with w - CHOP multiple of 2K */ if (CHOP <= K) /* one slice is enough for the upper part */ printf(" lo = A[b >> %lu];\n", w - CHOP); else /* two slices for the upper part */ printf(" lo = (A[b >> %lu] << %lu) ^ A[(b >> %lu) & %lu];\n", w - (CHOP - K), K, w - CHOP, MASK); printf(" hi = lo >> %lu;\n", w - 2 * K); for (i = w - CHOP - 2 * K; i >= 2 * K; i -= 2 * K) { printf (" lo = (lo << %lu) ^ (A[(b >> %lu) & %lu] << %lu) ^ A[(b >> %lu) & %lu];\n", 2 * K, i + K, MASK, K, i, MASK); printf(" hi = (hi << %lu) | (lo >> %lu);\n", 2 * K, REM); } /* special case for i=0 since a shift of 0 is undefined */ printf (" lo = (lo << %lu) ^ (A[(b >> %lu) & %lu] << %lu) ^ A[b & %lu];\n", 2 * K, K, MASK, K, MASK); /* now perform the repair step for 2*K */ MASK = 0; for (i = 0; i < w; i += 2 * K) MASK |= 1UL << i; MASK = ~MASK; mask2 = MASK; printf("\n"); for (i = 1; i < 2 * K; i++) { /* bit w-i from a was not considered in blocks of K bits from b for index j >= i */ /* Gaudry's no-branching optimization */ printf(" tmp = -((a >> %lu) & 1);\n", w - i); if (w == 32) { mask2 = (unsigned long) (uint32_t) mask2; } printf(" tmp &= ((b & 0x%lx) >> %lu);\n", mask2, i); printf(" hi = hi ^ tmp;\n"); mask2 = (mask2 << 1) & MASK; } printf("\n"); if (fn == 0) { printf(" c[0] = lo;\n"); printf(" c[1] = hi;\n"); } else if (fn == 1) { printf(" cp[i] = carry ^ lo;\n"); printf(" carry = hi;\n"); } else if (fn == 2) { printf(" dp[i] = cp[i] ^ (carry ^ lo);\n"); printf(" carry = hi;\n"); } if (fn > 0) { printf(" }\n"); printf(" return carry;\n"); } printf("}\n\n"); } printf("#endif\t/* GF2X_MUL1_H_ */\n"); return 0; } gf2x-1.2/src/0000755000327606072450000000000013126452066010037 500000000000000gf2x-1.2/src/Makefile.am0000644000327606072450000010220313125161514012003 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. # This impacts the storage class of the functions in the inlines files. AUTOMAKE_OPTIONS=subdir-objects # note that most automatic targets have their own CPPFLAGS, which # override this one. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) AM_LDFLAGS = -no-install EXTRA_PROGRAMS= TESTS = check_PROGRAMS= EXTRA_DIST= EXTRA_DIST+=generate-test-list.pl EXTRA_DIST+=tuneup_pre.c EXTRA_DIST+=tuning_undef_wrapper.h EXTRA_DIST+=tuning_undefs_pre.h # We've got a lot of per-target cfiles here, but it's rather silly to # have automake produce separate .o files for the files which fo _not_ # change in this regard. So we resort to having lots of silly libraries, # as a workaround. EXTRA_LTLIBRARIES=libtiming.la libtiming_la_SOURCES=timing.c LOWLEVEL= CLEANFILES= DISTCLEANFILES= BUILT_SOURCES= # EXTRA_PROGRAMS=gen_bb_mul_code$(EXEEXT_FOR_BUILD) # gen_bb_mul_code_SOURCES=gen_bb_mul_code.c gen_bb_mul_code$(EXEEXT_FOR_BUILD): ../lowlevel/gen_bb_mul_code.c $(CC_FOR_BUILD) `test -f '../lowlevel/gen_bb_mul_code.c' || echo '$(srcdir)/'`../lowlevel/gen_bb_mul_code.c -o gen_bb_mul_code$(EXEEXT_FOR_BUILD) DISTCLEANFILES += gen_bb_mul_code$(EXEEXT_FOR_BUILD) EXTRA_DIST += ../lowlevel/gen_bb_mul_code.c # The stuff after "-- begin generated code --" following this comment # block is auto-generated by a perl script, from the input data provided # in this comment block in the ACTIVE COMMENTS below. # # After changing the set of functions to be tested below, use # perl -i ./generate-test-list.pl Makefile.am # in order to regenerate the generated automake code (note that the # generation is done in place) #* test_sizes 1 2 3 4 5 6 7 8 9 #* if GF2X_32BIT_SOURCES #* test gen_mul1_w32k{2..6} #* endif #* if GF2X_64BIT_SOURCES #* test gen_mul1_w64k{2..6} #* endif #* test mul2k #* test mul3k #* test mul3k2 #* test mul4k #* test mul5k_a #* test mul5k_b #* test mul5k_c #* test mul5k_d #* test mul6k_a #* test mul6k_b #* test mul6k_c #* test mul7k #* test mul8k #* test mul9k #* test mul9k2 #* if GF2X_SSE2_AVAILABLE #* if GF2X_64BIT_SOURCES #* test mul2t #* test mul2t2 #* endif #* if GF2X_32BIT_SOURCES #* test mul4t #* test mul3t #* endif #* endif #* if GF2X_PCLMUL_AVAILABLE #* test mul1cl #* test mul2cl # mul2cl2 uses psrldq, which is slightly different. #* test mul2cl2 #* test mul3cl ## (disabled) test mul3k3 #* test mul4cl1 #* test mul4clk #* test mul5clk_c #* test mul5k3 #* test mul5clk2 #* test mul6clk2 #* test mul7cl #* test mul7k3 #* test mul9k3 #* test mul9clk2 #* test mul9cl #* endif # Autotools already use sed, so normally sed is not an extraordinary # difficult dependency. # -- begin generated code -- tuning_undefs_1.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/1/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_1.h tuneup_1.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/1/g < $(srcdir)/tuneup_pre.c > tuneup_1.c tuneup_1.$(OBJEXT): tuning_undefs_1.h BUILT_SOURCES +=tuneup_1.c tuning_undefs_1.h EXTRA_LTLIBRARIES+=libtuneup-s1.la nodist_libtuneup_s1_la_SOURCES=tuneup_1.c tuning_undefs_1.h libtuneup_s1_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_1.h DISTCLEANFILES+=tuning_undefs_1.h tuning_undefs_2.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/2/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_2.h tuneup_2.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/2/g < $(srcdir)/tuneup_pre.c > tuneup_2.c tuneup_2.$(OBJEXT): tuning_undefs_2.h BUILT_SOURCES +=tuneup_2.c tuning_undefs_2.h EXTRA_LTLIBRARIES+=libtuneup-s2.la nodist_libtuneup_s2_la_SOURCES=tuneup_2.c tuning_undefs_2.h libtuneup_s2_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_2.h DISTCLEANFILES+=tuning_undefs_2.h tuning_undefs_3.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/3/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_3.h tuneup_3.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/3/g < $(srcdir)/tuneup_pre.c > tuneup_3.c tuneup_3.$(OBJEXT): tuning_undefs_3.h BUILT_SOURCES +=tuneup_3.c tuning_undefs_3.h EXTRA_LTLIBRARIES+=libtuneup-s3.la nodist_libtuneup_s3_la_SOURCES=tuneup_3.c tuning_undefs_3.h libtuneup_s3_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_3.h DISTCLEANFILES+=tuning_undefs_3.h tuning_undefs_4.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/4/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_4.h tuneup_4.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/4/g < $(srcdir)/tuneup_pre.c > tuneup_4.c tuneup_4.$(OBJEXT): tuning_undefs_4.h BUILT_SOURCES +=tuneup_4.c tuning_undefs_4.h EXTRA_LTLIBRARIES+=libtuneup-s4.la nodist_libtuneup_s4_la_SOURCES=tuneup_4.c tuning_undefs_4.h libtuneup_s4_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_4.h DISTCLEANFILES+=tuning_undefs_4.h tuning_undefs_5.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/5/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_5.h tuneup_5.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/5/g < $(srcdir)/tuneup_pre.c > tuneup_5.c tuneup_5.$(OBJEXT): tuning_undefs_5.h BUILT_SOURCES +=tuneup_5.c tuning_undefs_5.h EXTRA_LTLIBRARIES+=libtuneup-s5.la nodist_libtuneup_s5_la_SOURCES=tuneup_5.c tuning_undefs_5.h libtuneup_s5_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_5.h DISTCLEANFILES+=tuning_undefs_5.h tuning_undefs_6.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/6/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_6.h tuneup_6.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/6/g < $(srcdir)/tuneup_pre.c > tuneup_6.c tuneup_6.$(OBJEXT): tuning_undefs_6.h BUILT_SOURCES +=tuneup_6.c tuning_undefs_6.h EXTRA_LTLIBRARIES+=libtuneup-s6.la nodist_libtuneup_s6_la_SOURCES=tuneup_6.c tuning_undefs_6.h libtuneup_s6_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_6.h DISTCLEANFILES+=tuning_undefs_6.h tuning_undefs_7.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/7/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_7.h tuneup_7.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/7/g < $(srcdir)/tuneup_pre.c > tuneup_7.c tuneup_7.$(OBJEXT): tuning_undefs_7.h BUILT_SOURCES +=tuneup_7.c tuning_undefs_7.h EXTRA_LTLIBRARIES+=libtuneup-s7.la nodist_libtuneup_s7_la_SOURCES=tuneup_7.c tuning_undefs_7.h libtuneup_s7_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_7.h DISTCLEANFILES+=tuning_undefs_7.h tuning_undefs_8.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/8/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_8.h tuneup_8.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/8/g < $(srcdir)/tuneup_pre.c > tuneup_8.c tuneup_8.$(OBJEXT): tuning_undefs_8.h BUILT_SOURCES +=tuneup_8.c tuning_undefs_8.h EXTRA_LTLIBRARIES+=libtuneup-s8.la nodist_libtuneup_s8_la_SOURCES=tuneup_8.c tuning_undefs_8.h libtuneup_s8_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_8.h DISTCLEANFILES+=tuning_undefs_8.h tuning_undefs_9.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/9/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_9.h tuneup_9.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/9/g < $(srcdir)/tuneup_pre.c > tuneup_9.c tuneup_9.$(OBJEXT): tuning_undefs_9.h BUILT_SOURCES +=tuneup_9.c tuning_undefs_9.h EXTRA_LTLIBRARIES+=libtuneup-s9.la nodist_libtuneup_s9_la_SOURCES=tuneup_9.c tuning_undefs_9.h libtuneup_s9_la_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) CLEANFILES+=tuning_undefs_9.h DISTCLEANFILES+=tuning_undefs_9.h if GF2X_32BIT_SOURCES LOWLEVEL+=tune_gen_mul1_w32k2$(EXEEXT) tune_gen_mul1_w32k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w32k2_SOURCES=gen_mul1_w32k2.c tuning_undefs_1.h gen_mul1_w32k2.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w32k2_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w32k2.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 2 > $@ BUILT_SOURCES+=gen_mul1_w32k2.c LOWLEVEL+=tune_gen_mul1_w32k3$(EXEEXT) tune_gen_mul1_w32k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w32k3_SOURCES=gen_mul1_w32k3.c tuning_undefs_1.h gen_mul1_w32k3.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w32k3_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w32k3.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 3 > $@ BUILT_SOURCES+=gen_mul1_w32k3.c LOWLEVEL+=tune_gen_mul1_w32k4$(EXEEXT) tune_gen_mul1_w32k4_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w32k4_SOURCES=gen_mul1_w32k4.c tuning_undefs_1.h gen_mul1_w32k4.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w32k4_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w32k4.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 4 > $@ BUILT_SOURCES+=gen_mul1_w32k4.c LOWLEVEL+=tune_gen_mul1_w32k5$(EXEEXT) tune_gen_mul1_w32k5_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w32k5_SOURCES=gen_mul1_w32k5.c tuning_undefs_1.h gen_mul1_w32k5.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w32k5_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w32k5.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 5 > $@ BUILT_SOURCES+=gen_mul1_w32k5.c LOWLEVEL+=tune_gen_mul1_w32k6$(EXEEXT) tune_gen_mul1_w32k6_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w32k6_SOURCES=gen_mul1_w32k6.c tuning_undefs_1.h gen_mul1_w32k6.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w32k6_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w32k6.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 6 > $@ BUILT_SOURCES+=gen_mul1_w32k6.c endif if GF2X_64BIT_SOURCES LOWLEVEL+=tune_gen_mul1_w64k2$(EXEEXT) tune_gen_mul1_w64k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w64k2_SOURCES=gen_mul1_w64k2.c tuning_undefs_1.h gen_mul1_w64k2.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w64k2_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w64k2.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 2 > $@ BUILT_SOURCES+=gen_mul1_w64k2.c LOWLEVEL+=tune_gen_mul1_w64k3$(EXEEXT) tune_gen_mul1_w64k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w64k3_SOURCES=gen_mul1_w64k3.c tuning_undefs_1.h gen_mul1_w64k3.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w64k3_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w64k3.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 3 > $@ BUILT_SOURCES+=gen_mul1_w64k3.c LOWLEVEL+=tune_gen_mul1_w64k4$(EXEEXT) tune_gen_mul1_w64k4_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w64k4_SOURCES=gen_mul1_w64k4.c tuning_undefs_1.h gen_mul1_w64k4.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w64k4_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w64k4.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 4 > $@ BUILT_SOURCES+=gen_mul1_w64k4.c LOWLEVEL+=tune_gen_mul1_w64k5$(EXEEXT) tune_gen_mul1_w64k5_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w64k5_SOURCES=gen_mul1_w64k5.c tuning_undefs_1.h gen_mul1_w64k5.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w64k5_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w64k5.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 5 > $@ BUILT_SOURCES+=gen_mul1_w64k5.c LOWLEVEL+=tune_gen_mul1_w64k6$(EXEEXT) tune_gen_mul1_w64k6_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 nodist_tune_gen_mul1_w64k6_SOURCES=gen_mul1_w64k6.c tuning_undefs_1.h gen_mul1_w64k6.$(OBJEXT): tuning_undefs_1.h tune_gen_mul1_w64k6_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la gen_mul1_w64k6.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 6 > $@ BUILT_SOURCES+=gen_mul1_w64k6.c endif LOWLEVEL+=tune_mul2k$(EXEEXT) tune_mul2k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2k_SOURCES=../lowlevel/mul2k.c nodist_tune_mul2k_SOURCES=tuning_undefs_2.h tune_mul2k_LDADD=libtuneup-s2.la libtiming.la ../libgf2x.la mul2k.$(OBJEXT): tuning_undefs_2.h check_PROGRAMS+=check_mul2k TESTS += check_mul2k check_mul2k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2k.c\" -DTESTING_SIZE=2 check_mul2k_LDADD=../libgf2x.la check_mul2k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul3k$(EXEEXT) tune_mul3k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3k_SOURCES=../lowlevel/mul3k.c nodist_tune_mul3k_SOURCES=tuning_undefs_3.h tune_mul3k_LDADD=libtuneup-s3.la libtiming.la ../libgf2x.la mul3k.$(OBJEXT): tuning_undefs_3.h check_PROGRAMS+=check_mul3k TESTS += check_mul3k check_mul3k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3k.c\" -DTESTING_SIZE=3 check_mul3k_LDADD=../libgf2x.la check_mul3k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul3k2$(EXEEXT) tune_mul3k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3k2_SOURCES=../lowlevel/mul3k2.c nodist_tune_mul3k2_SOURCES=tuning_undefs_3.h tune_mul3k2_LDADD=libtuneup-s3.la libtiming.la ../libgf2x.la mul3k2.$(OBJEXT): tuning_undefs_3.h check_PROGRAMS+=check_mul3k2 TESTS += check_mul3k2 check_mul3k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3k2.c\" -DTESTING_SIZE=3 check_mul3k2_LDADD=../libgf2x.la check_mul3k2_SOURCES=check_small_size.c LOWLEVEL+=tune_mul4k$(EXEEXT) tune_mul4k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=4 tune_mul4k_SOURCES=../lowlevel/mul4k.c nodist_tune_mul4k_SOURCES=tuning_undefs_4.h tune_mul4k_LDADD=libtuneup-s4.la libtiming.la ../libgf2x.la mul4k.$(OBJEXT): tuning_undefs_4.h check_PROGRAMS+=check_mul4k TESTS += check_mul4k check_mul4k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4k.c\" -DTESTING_SIZE=4 check_mul4k_LDADD=../libgf2x.la check_mul4k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5k_a$(EXEEXT) tune_mul5k_a_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_a_SOURCES=../lowlevel/mul5k_a.c nodist_tune_mul5k_a_SOURCES=tuning_undefs_5.h tune_mul5k_a_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5k_a.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5k_a TESTS += check_mul5k_a check_mul5k_a_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_a.c\" -DTESTING_SIZE=5 check_mul5k_a_LDADD=../libgf2x.la check_mul5k_a_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5k_b$(EXEEXT) tune_mul5k_b_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_b_SOURCES=../lowlevel/mul5k_b.c nodist_tune_mul5k_b_SOURCES=tuning_undefs_5.h tune_mul5k_b_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5k_b.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5k_b TESTS += check_mul5k_b check_mul5k_b_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_b.c\" -DTESTING_SIZE=5 check_mul5k_b_LDADD=../libgf2x.la check_mul5k_b_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5k_c$(EXEEXT) tune_mul5k_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_c_SOURCES=../lowlevel/mul5k_c.c nodist_tune_mul5k_c_SOURCES=tuning_undefs_5.h tune_mul5k_c_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5k_c.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5k_c TESTS += check_mul5k_c check_mul5k_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_c.c\" -DTESTING_SIZE=5 check_mul5k_c_LDADD=../libgf2x.la check_mul5k_c_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5k_d$(EXEEXT) tune_mul5k_d_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_d_SOURCES=../lowlevel/mul5k_d.c nodist_tune_mul5k_d_SOURCES=tuning_undefs_5.h tune_mul5k_d_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5k_d.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5k_d TESTS += check_mul5k_d check_mul5k_d_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_d.c\" -DTESTING_SIZE=5 check_mul5k_d_LDADD=../libgf2x.la check_mul5k_d_SOURCES=check_small_size.c LOWLEVEL+=tune_mul6k_a$(EXEEXT) tune_mul6k_a_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_a_SOURCES=../lowlevel/mul6k_a.c nodist_tune_mul6k_a_SOURCES=tuning_undefs_6.h tune_mul6k_a_LDADD=libtuneup-s6.la libtiming.la ../libgf2x.la mul6k_a.$(OBJEXT): tuning_undefs_6.h check_PROGRAMS+=check_mul6k_a TESTS += check_mul6k_a check_mul6k_a_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_a.c\" -DTESTING_SIZE=6 check_mul6k_a_LDADD=../libgf2x.la check_mul6k_a_SOURCES=check_small_size.c LOWLEVEL+=tune_mul6k_b$(EXEEXT) tune_mul6k_b_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_b_SOURCES=../lowlevel/mul6k_b.c nodist_tune_mul6k_b_SOURCES=tuning_undefs_6.h tune_mul6k_b_LDADD=libtuneup-s6.la libtiming.la ../libgf2x.la mul6k_b.$(OBJEXT): tuning_undefs_6.h check_PROGRAMS+=check_mul6k_b TESTS += check_mul6k_b check_mul6k_b_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_b.c\" -DTESTING_SIZE=6 check_mul6k_b_LDADD=../libgf2x.la check_mul6k_b_SOURCES=check_small_size.c LOWLEVEL+=tune_mul6k_c$(EXEEXT) tune_mul6k_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_c_SOURCES=../lowlevel/mul6k_c.c nodist_tune_mul6k_c_SOURCES=tuning_undefs_6.h tune_mul6k_c_LDADD=libtuneup-s6.la libtiming.la ../libgf2x.la mul6k_c.$(OBJEXT): tuning_undefs_6.h check_PROGRAMS+=check_mul6k_c TESTS += check_mul6k_c check_mul6k_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_c.c\" -DTESTING_SIZE=6 check_mul6k_c_LDADD=../libgf2x.la check_mul6k_c_SOURCES=check_small_size.c LOWLEVEL+=tune_mul7k$(EXEEXT) tune_mul7k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=7 tune_mul7k_SOURCES=../lowlevel/mul7k.c nodist_tune_mul7k_SOURCES=tuning_undefs_7.h tune_mul7k_LDADD=libtuneup-s7.la libtiming.la ../libgf2x.la mul7k.$(OBJEXT): tuning_undefs_7.h check_PROGRAMS+=check_mul7k TESTS += check_mul7k check_mul7k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7k.c\" -DTESTING_SIZE=7 check_mul7k_LDADD=../libgf2x.la check_mul7k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul8k$(EXEEXT) tune_mul8k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=8 tune_mul8k_SOURCES=../lowlevel/mul8k.c nodist_tune_mul8k_SOURCES=tuning_undefs_8.h tune_mul8k_LDADD=libtuneup-s8.la libtiming.la ../libgf2x.la mul8k.$(OBJEXT): tuning_undefs_8.h check_PROGRAMS+=check_mul8k TESTS += check_mul8k check_mul8k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul8k.c\" -DTESTING_SIZE=8 check_mul8k_LDADD=../libgf2x.la check_mul8k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul9k$(EXEEXT) tune_mul9k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9k_SOURCES=../lowlevel/mul9k.c nodist_tune_mul9k_SOURCES=tuning_undefs_9.h tune_mul9k_LDADD=libtuneup-s9.la libtiming.la ../libgf2x.la mul9k.$(OBJEXT): tuning_undefs_9.h check_PROGRAMS+=check_mul9k TESTS += check_mul9k check_mul9k_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k.c\" -DTESTING_SIZE=9 check_mul9k_LDADD=../libgf2x.la check_mul9k_SOURCES=check_small_size.c LOWLEVEL+=tune_mul9k2$(EXEEXT) tune_mul9k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9k2_SOURCES=../lowlevel/mul9k2.c nodist_tune_mul9k2_SOURCES=tuning_undefs_9.h tune_mul9k2_LDADD=libtuneup-s9.la libtiming.la ../libgf2x.la mul9k2.$(OBJEXT): tuning_undefs_9.h check_PROGRAMS+=check_mul9k2 TESTS += check_mul9k2 check_mul9k2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k2.c\" -DTESTING_SIZE=9 check_mul9k2_LDADD=../libgf2x.la check_mul9k2_SOURCES=check_small_size.c if GF2X_SSE2_AVAILABLE if GF2X_64BIT_SOURCES LOWLEVEL+=tune_mul2t$(EXEEXT) tune_mul2t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2t_SOURCES=../lowlevel/mul2t.c nodist_tune_mul2t_SOURCES=tuning_undefs_2.h tune_mul2t_LDADD=libtuneup-s2.la libtiming.la ../libgf2x.la mul2t.$(OBJEXT): tuning_undefs_2.h check_PROGRAMS+=check_mul2t TESTS += check_mul2t check_mul2t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2t.c\" -DTESTING_SIZE=2 check_mul2t_LDADD=../libgf2x.la check_mul2t_SOURCES=check_small_size.c LOWLEVEL+=tune_mul2t2$(EXEEXT) tune_mul2t2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2t2_SOURCES=../lowlevel/mul2t2.c nodist_tune_mul2t2_SOURCES=tuning_undefs_2.h tune_mul2t2_LDADD=libtuneup-s2.la libtiming.la ../libgf2x.la mul2t2.$(OBJEXT): tuning_undefs_2.h check_PROGRAMS+=check_mul2t2 TESTS += check_mul2t2 check_mul2t2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2t2.c\" -DTESTING_SIZE=2 check_mul2t2_LDADD=../libgf2x.la check_mul2t2_SOURCES=check_small_size.c endif if GF2X_32BIT_SOURCES LOWLEVEL+=tune_mul4t$(EXEEXT) tune_mul4t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=4 tune_mul4t_SOURCES=../lowlevel/mul4t.c nodist_tune_mul4t_SOURCES=tuning_undefs_4.h tune_mul4t_LDADD=libtuneup-s4.la libtiming.la ../libgf2x.la mul4t.$(OBJEXT): tuning_undefs_4.h check_PROGRAMS+=check_mul4t TESTS += check_mul4t check_mul4t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4t.c\" -DTESTING_SIZE=4 check_mul4t_LDADD=../libgf2x.la check_mul4t_SOURCES=check_small_size.c LOWLEVEL+=tune_mul3t$(EXEEXT) tune_mul3t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3t_SOURCES=../lowlevel/mul3t.c nodist_tune_mul3t_SOURCES=tuning_undefs_3.h tune_mul3t_LDADD=libtuneup-s3.la libtiming.la ../libgf2x.la mul3t.$(OBJEXT): tuning_undefs_3.h check_PROGRAMS+=check_mul3t TESTS += check_mul3t check_mul3t_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3t.c\" -DTESTING_SIZE=3 check_mul3t_LDADD=../libgf2x.la check_mul3t_SOURCES=check_small_size.c endif endif if GF2X_PCLMUL_AVAILABLE LOWLEVEL+=tune_mul1cl$(EXEEXT) tune_mul1cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=1 tune_mul1cl_SOURCES=../lowlevel/mul1cl.c nodist_tune_mul1cl_SOURCES=tuning_undefs_1.h tune_mul1cl_LDADD=libtuneup-s1.la libtiming.la ../libgf2x.la mul1cl.$(OBJEXT): tuning_undefs_1.h check_PROGRAMS+=check_mul1cl TESTS += check_mul1cl check_mul1cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul1cl.c\" -DTESTING_SIZE=1 check_mul1cl_LDADD=../libgf2x.la check_mul1cl_SOURCES=check_small_size.c LOWLEVEL+=tune_mul2cl$(EXEEXT) tune_mul2cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2cl_SOURCES=../lowlevel/mul2cl.c nodist_tune_mul2cl_SOURCES=tuning_undefs_2.h tune_mul2cl_LDADD=libtuneup-s2.la libtiming.la ../libgf2x.la mul2cl.$(OBJEXT): tuning_undefs_2.h check_PROGRAMS+=check_mul2cl TESTS += check_mul2cl check_mul2cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2cl.c\" -DTESTING_SIZE=2 check_mul2cl_LDADD=../libgf2x.la check_mul2cl_SOURCES=check_small_size.c LOWLEVEL+=tune_mul2cl2$(EXEEXT) tune_mul2cl2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2cl2_SOURCES=../lowlevel/mul2cl2.c nodist_tune_mul2cl2_SOURCES=tuning_undefs_2.h tune_mul2cl2_LDADD=libtuneup-s2.la libtiming.la ../libgf2x.la mul2cl2.$(OBJEXT): tuning_undefs_2.h check_PROGRAMS+=check_mul2cl2 TESTS += check_mul2cl2 check_mul2cl2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2cl2.c\" -DTESTING_SIZE=2 check_mul2cl2_LDADD=../libgf2x.la check_mul2cl2_SOURCES=check_small_size.c LOWLEVEL+=tune_mul3cl$(EXEEXT) tune_mul3cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3cl_SOURCES=../lowlevel/mul3cl.c nodist_tune_mul3cl_SOURCES=tuning_undefs_3.h tune_mul3cl_LDADD=libtuneup-s3.la libtiming.la ../libgf2x.la mul3cl.$(OBJEXT): tuning_undefs_3.h check_PROGRAMS+=check_mul3cl TESTS += check_mul3cl check_mul3cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3cl.c\" -DTESTING_SIZE=3 check_mul3cl_LDADD=../libgf2x.la check_mul3cl_SOURCES=check_small_size.c LOWLEVEL+=tune_mul4cl1$(EXEEXT) tune_mul4cl1_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=4 tune_mul4cl1_SOURCES=../lowlevel/mul4cl1.c nodist_tune_mul4cl1_SOURCES=tuning_undefs_4.h tune_mul4cl1_LDADD=libtuneup-s4.la libtiming.la ../libgf2x.la mul4cl1.$(OBJEXT): tuning_undefs_4.h check_PROGRAMS+=check_mul4cl1 TESTS += check_mul4cl1 check_mul4cl1_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4cl1.c\" -DTESTING_SIZE=4 check_mul4cl1_LDADD=../libgf2x.la check_mul4cl1_SOURCES=check_small_size.c LOWLEVEL+=tune_mul4clk$(EXEEXT) tune_mul4clk_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=4 tune_mul4clk_SOURCES=../lowlevel/mul4clk.c nodist_tune_mul4clk_SOURCES=tuning_undefs_4.h tune_mul4clk_LDADD=libtuneup-s4.la libtiming.la ../libgf2x.la mul4clk.$(OBJEXT): tuning_undefs_4.h check_PROGRAMS+=check_mul4clk TESTS += check_mul4clk check_mul4clk_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4clk.c\" -DTESTING_SIZE=4 check_mul4clk_LDADD=../libgf2x.la check_mul4clk_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5clk_c$(EXEEXT) tune_mul5clk_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5clk_c_SOURCES=../lowlevel/mul5clk_c.c nodist_tune_mul5clk_c_SOURCES=tuning_undefs_5.h tune_mul5clk_c_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5clk_c.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5clk_c TESTS += check_mul5clk_c check_mul5clk_c_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5clk_c.c\" -DTESTING_SIZE=5 check_mul5clk_c_LDADD=../libgf2x.la check_mul5clk_c_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5k3$(EXEEXT) tune_mul5k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k3_SOURCES=../lowlevel/mul5k3.c nodist_tune_mul5k3_SOURCES=tuning_undefs_5.h tune_mul5k3_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5k3.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5k3 TESTS += check_mul5k3 check_mul5k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k3.c\" -DTESTING_SIZE=5 check_mul5k3_LDADD=../libgf2x.la check_mul5k3_SOURCES=check_small_size.c LOWLEVEL+=tune_mul5clk2$(EXEEXT) tune_mul5clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5clk2_SOURCES=../lowlevel/mul5clk2.c nodist_tune_mul5clk2_SOURCES=tuning_undefs_5.h tune_mul5clk2_LDADD=libtuneup-s5.la libtiming.la ../libgf2x.la mul5clk2.$(OBJEXT): tuning_undefs_5.h check_PROGRAMS+=check_mul5clk2 TESTS += check_mul5clk2 check_mul5clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5clk2.c\" -DTESTING_SIZE=5 check_mul5clk2_LDADD=../libgf2x.la check_mul5clk2_SOURCES=check_small_size.c LOWLEVEL+=tune_mul6clk2$(EXEEXT) tune_mul6clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6clk2_SOURCES=../lowlevel/mul6clk2.c nodist_tune_mul6clk2_SOURCES=tuning_undefs_6.h tune_mul6clk2_LDADD=libtuneup-s6.la libtiming.la ../libgf2x.la mul6clk2.$(OBJEXT): tuning_undefs_6.h check_PROGRAMS+=check_mul6clk2 TESTS += check_mul6clk2 check_mul6clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6clk2.c\" -DTESTING_SIZE=6 check_mul6clk2_LDADD=../libgf2x.la check_mul6clk2_SOURCES=check_small_size.c LOWLEVEL+=tune_mul7cl$(EXEEXT) tune_mul7cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=7 tune_mul7cl_SOURCES=../lowlevel/mul7cl.c nodist_tune_mul7cl_SOURCES=tuning_undefs_7.h tune_mul7cl_LDADD=libtuneup-s7.la libtiming.la ../libgf2x.la mul7cl.$(OBJEXT): tuning_undefs_7.h check_PROGRAMS+=check_mul7cl TESTS += check_mul7cl check_mul7cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7cl.c\" -DTESTING_SIZE=7 check_mul7cl_LDADD=../libgf2x.la check_mul7cl_SOURCES=check_small_size.c LOWLEVEL+=tune_mul7k3$(EXEEXT) tune_mul7k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=7 tune_mul7k3_SOURCES=../lowlevel/mul7k3.c nodist_tune_mul7k3_SOURCES=tuning_undefs_7.h tune_mul7k3_LDADD=libtuneup-s7.la libtiming.la ../libgf2x.la mul7k3.$(OBJEXT): tuning_undefs_7.h check_PROGRAMS+=check_mul7k3 TESTS += check_mul7k3 check_mul7k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7k3.c\" -DTESTING_SIZE=7 check_mul7k3_LDADD=../libgf2x.la check_mul7k3_SOURCES=check_small_size.c LOWLEVEL+=tune_mul9k3$(EXEEXT) tune_mul9k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9k3_SOURCES=../lowlevel/mul9k3.c nodist_tune_mul9k3_SOURCES=tuning_undefs_9.h tune_mul9k3_LDADD=libtuneup-s9.la libtiming.la ../libgf2x.la mul9k3.$(OBJEXT): tuning_undefs_9.h check_PROGRAMS+=check_mul9k3 TESTS += check_mul9k3 check_mul9k3_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k3.c\" -DTESTING_SIZE=9 check_mul9k3_LDADD=../libgf2x.la check_mul9k3_SOURCES=check_small_size.c LOWLEVEL+=tune_mul9clk2$(EXEEXT) tune_mul9clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9clk2_SOURCES=../lowlevel/mul9clk2.c nodist_tune_mul9clk2_SOURCES=tuning_undefs_9.h tune_mul9clk2_LDADD=libtuneup-s9.la libtiming.la ../libgf2x.la mul9clk2.$(OBJEXT): tuning_undefs_9.h check_PROGRAMS+=check_mul9clk2 TESTS += check_mul9clk2 check_mul9clk2_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9clk2.c\" -DTESTING_SIZE=9 check_mul9clk2_LDADD=../libgf2x.la check_mul9clk2_SOURCES=check_small_size.c LOWLEVEL+=tune_mul9cl$(EXEEXT) tune_mul9cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9cl_SOURCES=../lowlevel/mul9cl.c nodist_tune_mul9cl_SOURCES=tuning_undefs_9.h tune_mul9cl_LDADD=libtuneup-s9.la libtiming.la ../libgf2x.la mul9cl.$(OBJEXT): tuning_undefs_9.h check_PROGRAMS+=check_mul9cl TESTS += check_mul9cl check_mul9cl_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9cl.c\" -DTESTING_SIZE=9 check_mul9cl_LDADD=../libgf2x.la check_mul9cl_SOURCES=check_small_size.c endif # -- end generated code -- ###################################################################### EXTRA_PROGRAMS+=$(LOWLEVEL) tune-lowlevel: $(LOWLEVEL) cd $(top_builddir) ; $(MAKE) MAKE="$(MAKE)" abs_srcdir=$(abs_srcdir) \ perl $(srcdir)/tune-lowlevel.pl $(LOWLEVEL) EXTRA_DIST+=tune-lowlevel.pl ###################################################################### noinst_HEADERS=timing.h tuning-common.h replace.h EXTRA_PROGRAMS+=modify-thresholds$(EXEEXT) modify_thresholds_SOURCES=modify-thresholds.c replace.c ###################################################################### EXTRA_PROGRAMS+=tunetoom$(EXEEXT) tunetoom_SOURCES=tunetoom.c tuning-common.c tunetoom_LDADD=libtiming.la ../libgf2x.la -lm TOOM_TUNING_LIMIT=2048 if GPL_CODE_PRESENT tunetoom.res: tunetoom$(EXEEXT) ./tunetoom $(TOOM_TUNING_LIMIT) -o tunetoom.res tune-toom: tunetoom.res modify-thresholds$(EXEEXT) cd $(top_builddir) ; $(MAKE) cat ../gf2x/gf2x-thresholds.h > tuned_thresholds.h ./modify-thresholds -o tuned_thresholds.h < tunetoom.res mkdir -p ../already_tuned/tuned/ mv -f tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h rm -f ../gf2x/gf2x-thresholds.h ln -sf ../already_tuned/tuned/gf2x-thresholds.h ../gf2x/ cd $(top_builddir) ; $(MAKE) else tune-toom: echo "No toom tuning, LGPL-only code" : endif ###################################################################### EXTRA_PROGRAMS+=tunefft$(EXEEXT) tunefft_SOURCES=tunefft.c tuning-common.c tunefft_LDADD=libtiming.la ../libgf2x.la FFT_TUNING_LIMIT=8000000 FFT_TUNING_SCALE=1.02 tunefft.res: tunefft$(EXEEXT) ./tunefft -s $(FFT_TUNING_SCALE) $(FFT_TUNING_LIMIT) -o tunefft.res tune-fft: tunefft.res modify-thresholds$(EXEEXT) cd $(top_builddir) ; $(MAKE) cat ../gf2x/gf2x-thresholds.h > tuned_thresholds.h ./modify-thresholds -o tuned_thresholds.h < tunefft.res mkdir -p ../already_tuned/tuned/ mv -f tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h rm -f ../gf2x/gf2x-thresholds.h ln -sf ../already_tuned/tuned/gf2x-thresholds.h ../gf2x/ cd $(top_builddir) ; $(MAKE) CLEANFILES+=$(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) tunetoom.res tunefft.res CLEANFILES+=$(BUILT_SOURCES) gf2x-1.2/src/timing.h0000644000327606072450000000317412725540356011430 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TIMING_H_ #define TIMING_H_ #include #ifdef __cplusplus extern "C" { #endif extern uint64_t microseconds(); /* cputime */ static inline int cputime(void) { return (int) microseconds() / 1000; } static inline double seconds(void) { return (double) microseconds() /1.0e6; } #ifdef __cplusplus } #endif #endif /* TIMING_H_ */ gf2x-1.2/src/tuning-common.h0000644000327606072450000000453312725540356012733 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TUNING_COMMON_H_ #define TUNING_COMMON_H_ extern double mulstep; extern FILE * rp; #ifndef MAX #define MAX(a,b) ((a)<(b) ? (b) : (a)) #endif #ifndef MIN #define MIN(a,b) ((a)<(b) ? (b) : (a)) #endif extern double MINTIME; #define TIME(x, i) \ { long j, k = 1; \ double s0 = seconds (); \ do { \ for (j = 0; j < k; j++) (i); \ k = 2 * k; \ x = seconds () - s0; \ } while (x < MINTIME); \ (x) = (x) / (k - 1); \ } #ifdef __cplusplus extern "C" { #endif extern void set_clock_resolution (); extern void random_wordstring(unsigned long * a, long n); extern void check(const unsigned long *a, long m, const unsigned long *b, long n, const char * cname, const unsigned long *c, const char * dname, const unsigned long *d); extern void set_tuning_output(); extern void close_tuning_output(); extern int handle_tuning_mulstep(int * p_argc, char *** p_argv); extern int handle_tuning_outfile(int * p_argc, char *** p_argv); #ifdef __cplusplus } #endif #endif /* TUNING_COMMON_H_ */ gf2x-1.2/src/replace.h0000644000327606072450000000341112725540356011546 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Helper program for rewriting headers after tuning. */ #ifndef REPLACE_H_ #define REPLACE_H_ #ifdef __cplusplus extern "C" { #endif struct hash_define { char * identifier; char * string; }; void set_hash_define_int(struct hash_define * ptr, const char * name, int x); void set_hash_define(struct hash_define * ptr, const char * name, const char * v); void replace(struct hash_define * ptr, unsigned long n, const char * fname); #ifdef __cplusplus } #endif #endif /* REPLACE_H_ */ gf2x-1.2/src/Makefile.in0000644000327606072450000120110613126452055012023 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ TESTS = check_mul2k$(EXEEXT) check_mul3k$(EXEEXT) \ check_mul3k2$(EXEEXT) check_mul4k$(EXEEXT) \ check_mul5k_a$(EXEEXT) check_mul5k_b$(EXEEXT) \ check_mul5k_c$(EXEEXT) check_mul5k_d$(EXEEXT) \ check_mul6k_a$(EXEEXT) check_mul6k_b$(EXEEXT) \ check_mul6k_c$(EXEEXT) check_mul7k$(EXEEXT) \ check_mul8k$(EXEEXT) check_mul9k$(EXEEXT) \ check_mul9k2$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ $(am__EXEEXT_3) check_PROGRAMS = check_mul2k$(EXEEXT) check_mul3k$(EXEEXT) \ check_mul3k2$(EXEEXT) check_mul4k$(EXEEXT) \ check_mul5k_a$(EXEEXT) check_mul5k_b$(EXEEXT) \ check_mul5k_c$(EXEEXT) check_mul5k_d$(EXEEXT) \ check_mul6k_a$(EXEEXT) check_mul6k_b$(EXEEXT) \ check_mul6k_c$(EXEEXT) check_mul7k$(EXEEXT) \ check_mul8k$(EXEEXT) check_mul9k$(EXEEXT) \ check_mul9k2$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ $(am__EXEEXT_3) @GF2X_32BIT_SOURCES_TRUE@am__append_1 = tune_gen_mul1_w32k2$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@ tune_gen_mul1_w32k3$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@ tune_gen_mul1_w32k4$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@ tune_gen_mul1_w32k5$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@ tune_gen_mul1_w32k6$(EXEEXT) @GF2X_32BIT_SOURCES_TRUE@am__append_2 = gen_mul1_w32k2.c \ @GF2X_32BIT_SOURCES_TRUE@ gen_mul1_w32k3.c gen_mul1_w32k4.c \ @GF2X_32BIT_SOURCES_TRUE@ gen_mul1_w32k5.c gen_mul1_w32k6.c @GF2X_64BIT_SOURCES_TRUE@am__append_3 = tune_gen_mul1_w64k2$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@ tune_gen_mul1_w64k3$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@ tune_gen_mul1_w64k4$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@ tune_gen_mul1_w64k5$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@ tune_gen_mul1_w64k6$(EXEEXT) @GF2X_64BIT_SOURCES_TRUE@am__append_4 = gen_mul1_w64k2.c \ @GF2X_64BIT_SOURCES_TRUE@ gen_mul1_w64k3.c gen_mul1_w64k4.c \ @GF2X_64BIT_SOURCES_TRUE@ gen_mul1_w64k5.c gen_mul1_w64k6.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_5 = tune_mul2t$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ tune_mul2t2$(EXEEXT) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_6 = check_mul2t \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul2t2 @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_7 = check_mul2t \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul2t2 @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_8 = tune_mul4t$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ tune_mul3t$(EXEEXT) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_9 = check_mul4t \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul3t @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__append_10 = check_mul4t \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul3t @GF2X_PCLMUL_AVAILABLE_TRUE@am__append_11 = tune_mul1cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul2cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul2cl2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul3cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul4cl1$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul4clk$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul5clk_c$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul5k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul5clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul6clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul7cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul7k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul9k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul9clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ tune_mul9cl$(EXEEXT) @GF2X_PCLMUL_AVAILABLE_TRUE@am__append_12 = check_mul1cl check_mul2cl \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul2cl2 check_mul3cl \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul4cl1 check_mul4clk \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk_c check_mul5k3 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk2 check_mul6clk2 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul7cl check_mul7k3 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9k3 check_mul9clk2 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9cl @GF2X_PCLMUL_AVAILABLE_TRUE@am__append_13 = check_mul1cl check_mul2cl \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul2cl2 check_mul3cl \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul4cl1 check_mul4clk \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk_c check_mul5k3 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk2 check_mul6clk2 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul7cl check_mul7k3 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9k3 check_mul9clk2 \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9cl subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = libtiming_la_LIBADD = am_libtiming_la_OBJECTS = timing.lo libtiming_la_OBJECTS = $(am_libtiming_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libtuneup_s1_la_LIBADD = nodist_libtuneup_s1_la_OBJECTS = libtuneup_s1_la-tuneup_1.lo libtuneup_s1_la_OBJECTS = $(nodist_libtuneup_s1_la_OBJECTS) libtuneup_s2_la_LIBADD = nodist_libtuneup_s2_la_OBJECTS = libtuneup_s2_la-tuneup_2.lo libtuneup_s2_la_OBJECTS = $(nodist_libtuneup_s2_la_OBJECTS) libtuneup_s3_la_LIBADD = nodist_libtuneup_s3_la_OBJECTS = libtuneup_s3_la-tuneup_3.lo libtuneup_s3_la_OBJECTS = $(nodist_libtuneup_s3_la_OBJECTS) libtuneup_s4_la_LIBADD = nodist_libtuneup_s4_la_OBJECTS = libtuneup_s4_la-tuneup_4.lo libtuneup_s4_la_OBJECTS = $(nodist_libtuneup_s4_la_OBJECTS) libtuneup_s5_la_LIBADD = nodist_libtuneup_s5_la_OBJECTS = libtuneup_s5_la-tuneup_5.lo libtuneup_s5_la_OBJECTS = $(nodist_libtuneup_s5_la_OBJECTS) libtuneup_s6_la_LIBADD = nodist_libtuneup_s6_la_OBJECTS = libtuneup_s6_la-tuneup_6.lo libtuneup_s6_la_OBJECTS = $(nodist_libtuneup_s6_la_OBJECTS) libtuneup_s7_la_LIBADD = nodist_libtuneup_s7_la_OBJECTS = libtuneup_s7_la-tuneup_7.lo libtuneup_s7_la_OBJECTS = $(nodist_libtuneup_s7_la_OBJECTS) libtuneup_s8_la_LIBADD = nodist_libtuneup_s8_la_OBJECTS = libtuneup_s8_la-tuneup_8.lo libtuneup_s8_la_OBJECTS = $(nodist_libtuneup_s8_la_OBJECTS) libtuneup_s9_la_LIBADD = nodist_libtuneup_s9_la_OBJECTS = libtuneup_s9_la-tuneup_9.lo libtuneup_s9_la_OBJECTS = $(nodist_libtuneup_s9_la_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__EXEEXT_1 = check_mul2t$(EXEEXT) \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul2t2$(EXEEXT) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am__EXEEXT_2 = check_mul4t$(EXEEXT) \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ check_mul3t$(EXEEXT) @GF2X_PCLMUL_AVAILABLE_TRUE@am__EXEEXT_3 = check_mul1cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul2cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul2cl2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul3cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul4cl1$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul4clk$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk_c$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul5clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul6clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul7cl$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul7k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9k3$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9clk2$(EXEEXT) \ @GF2X_PCLMUL_AVAILABLE_TRUE@ check_mul9cl$(EXEEXT) am__check_mul1cl_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul1cl_OBJECTS = check_mul1cl-check_small_size.$(OBJEXT) check_mul1cl_OBJECTS = $(am_check_mul1cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul1cl_DEPENDENCIES = ../libgf2x.la am__check_mul2cl_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul2cl_OBJECTS = check_mul2cl-check_small_size.$(OBJEXT) check_mul2cl_OBJECTS = $(am_check_mul2cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl_DEPENDENCIES = ../libgf2x.la am__check_mul2cl2_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul2cl2_OBJECTS = check_mul2cl2-check_small_size.$(OBJEXT) check_mul2cl2_OBJECTS = $(am_check_mul2cl2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_check_mul2k_OBJECTS = check_mul2k-check_small_size.$(OBJEXT) check_mul2k_OBJECTS = $(am_check_mul2k_OBJECTS) check_mul2k_DEPENDENCIES = ../libgf2x.la am__check_mul2t_SOURCES_DIST = check_small_size.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_check_mul2t_OBJECTS = check_mul2t-check_small_size.$(OBJEXT) check_mul2t_OBJECTS = $(am_check_mul2t_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t_DEPENDENCIES = ../libgf2x.la am__check_mul2t2_SOURCES_DIST = check_small_size.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_check_mul2t2_OBJECTS = check_mul2t2-check_small_size.$(OBJEXT) check_mul2t2_OBJECTS = $(am_check_mul2t2_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t2_DEPENDENCIES = ../libgf2x.la am__check_mul3cl_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul3cl_OBJECTS = check_mul3cl-check_small_size.$(OBJEXT) check_mul3cl_OBJECTS = $(am_check_mul3cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul3cl_DEPENDENCIES = ../libgf2x.la am_check_mul3k_OBJECTS = check_mul3k-check_small_size.$(OBJEXT) check_mul3k_OBJECTS = $(am_check_mul3k_OBJECTS) check_mul3k_DEPENDENCIES = ../libgf2x.la am_check_mul3k2_OBJECTS = check_mul3k2-check_small_size.$(OBJEXT) check_mul3k2_OBJECTS = $(am_check_mul3k2_OBJECTS) check_mul3k2_DEPENDENCIES = ../libgf2x.la am__check_mul3t_SOURCES_DIST = check_small_size.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_check_mul3t_OBJECTS = check_mul3t-check_small_size.$(OBJEXT) check_mul3t_OBJECTS = $(am_check_mul3t_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul3t_DEPENDENCIES = ../libgf2x.la am__check_mul4cl1_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul4cl1_OBJECTS = check_mul4cl1-check_small_size.$(OBJEXT) check_mul4cl1_OBJECTS = $(am_check_mul4cl1_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4cl1_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__check_mul4clk_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul4clk_OBJECTS = check_mul4clk-check_small_size.$(OBJEXT) check_mul4clk_OBJECTS = $(am_check_mul4clk_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4clk_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_check_mul4k_OBJECTS = check_mul4k-check_small_size.$(OBJEXT) check_mul4k_OBJECTS = $(am_check_mul4k_OBJECTS) check_mul4k_DEPENDENCIES = ../libgf2x.la am__check_mul4t_SOURCES_DIST = check_small_size.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_check_mul4t_OBJECTS = check_mul4t-check_small_size.$(OBJEXT) check_mul4t_OBJECTS = $(am_check_mul4t_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul4t_DEPENDENCIES = ../libgf2x.la am__check_mul5clk2_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul5clk2_OBJECTS = check_mul5clk2-check_small_size.$(OBJEXT) check_mul5clk2_OBJECTS = $(am_check_mul5clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__check_mul5clk_c_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul5clk_c_OBJECTS = check_mul5clk_c-check_small_size.$(OBJEXT) check_mul5clk_c_OBJECTS = $(am_check_mul5clk_c_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk_c_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__check_mul5k3_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul5k3_OBJECTS = check_mul5k3-check_small_size.$(OBJEXT) check_mul5k3_OBJECTS = $(am_check_mul5k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5k3_DEPENDENCIES = ../libgf2x.la am_check_mul5k_a_OBJECTS = check_mul5k_a-check_small_size.$(OBJEXT) check_mul5k_a_OBJECTS = $(am_check_mul5k_a_OBJECTS) check_mul5k_a_DEPENDENCIES = ../libgf2x.la am_check_mul5k_b_OBJECTS = check_mul5k_b-check_small_size.$(OBJEXT) check_mul5k_b_OBJECTS = $(am_check_mul5k_b_OBJECTS) check_mul5k_b_DEPENDENCIES = ../libgf2x.la am_check_mul5k_c_OBJECTS = check_mul5k_c-check_small_size.$(OBJEXT) check_mul5k_c_OBJECTS = $(am_check_mul5k_c_OBJECTS) check_mul5k_c_DEPENDENCIES = ../libgf2x.la am_check_mul5k_d_OBJECTS = check_mul5k_d-check_small_size.$(OBJEXT) check_mul5k_d_OBJECTS = $(am_check_mul5k_d_OBJECTS) check_mul5k_d_DEPENDENCIES = ../libgf2x.la am__check_mul6clk2_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul6clk2_OBJECTS = check_mul6clk2-check_small_size.$(OBJEXT) check_mul6clk2_OBJECTS = $(am_check_mul6clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul6clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_check_mul6k_a_OBJECTS = check_mul6k_a-check_small_size.$(OBJEXT) check_mul6k_a_OBJECTS = $(am_check_mul6k_a_OBJECTS) check_mul6k_a_DEPENDENCIES = ../libgf2x.la am_check_mul6k_b_OBJECTS = check_mul6k_b-check_small_size.$(OBJEXT) check_mul6k_b_OBJECTS = $(am_check_mul6k_b_OBJECTS) check_mul6k_b_DEPENDENCIES = ../libgf2x.la am_check_mul6k_c_OBJECTS = check_mul6k_c-check_small_size.$(OBJEXT) check_mul6k_c_OBJECTS = $(am_check_mul6k_c_OBJECTS) check_mul6k_c_DEPENDENCIES = ../libgf2x.la am__check_mul7cl_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul7cl_OBJECTS = check_mul7cl-check_small_size.$(OBJEXT) check_mul7cl_OBJECTS = $(am_check_mul7cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7cl_DEPENDENCIES = ../libgf2x.la am_check_mul7k_OBJECTS = check_mul7k-check_small_size.$(OBJEXT) check_mul7k_OBJECTS = $(am_check_mul7k_OBJECTS) check_mul7k_DEPENDENCIES = ../libgf2x.la am__check_mul7k3_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul7k3_OBJECTS = check_mul7k3-check_small_size.$(OBJEXT) check_mul7k3_OBJECTS = $(am_check_mul7k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7k3_DEPENDENCIES = ../libgf2x.la am_check_mul8k_OBJECTS = check_mul8k-check_small_size.$(OBJEXT) check_mul8k_OBJECTS = $(am_check_mul8k_OBJECTS) check_mul8k_DEPENDENCIES = ../libgf2x.la am__check_mul9cl_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul9cl_OBJECTS = check_mul9cl-check_small_size.$(OBJEXT) check_mul9cl_OBJECTS = $(am_check_mul9cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9cl_DEPENDENCIES = ../libgf2x.la am__check_mul9clk2_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul9clk2_OBJECTS = check_mul9clk2-check_small_size.$(OBJEXT) check_mul9clk2_OBJECTS = $(am_check_mul9clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_check_mul9k_OBJECTS = check_mul9k-check_small_size.$(OBJEXT) check_mul9k_OBJECTS = $(am_check_mul9k_OBJECTS) check_mul9k_DEPENDENCIES = ../libgf2x.la am_check_mul9k2_OBJECTS = check_mul9k2-check_small_size.$(OBJEXT) check_mul9k2_OBJECTS = $(am_check_mul9k2_OBJECTS) check_mul9k2_DEPENDENCIES = ../libgf2x.la am__check_mul9k3_SOURCES_DIST = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_check_mul9k3_OBJECTS = check_mul9k3-check_small_size.$(OBJEXT) check_mul9k3_OBJECTS = $(am_check_mul9k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9k3_DEPENDENCIES = ../libgf2x.la am_modify_thresholds_OBJECTS = modify-thresholds.$(OBJEXT) \ replace.$(OBJEXT) modify_thresholds_OBJECTS = $(am_modify_thresholds_OBJECTS) modify_thresholds_LDADD = $(LDADD) @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k2_OBJECTS = tune_gen_mul1_w32k2-gen_mul1_w32k2.$(OBJEXT) tune_gen_mul1_w32k2_OBJECTS = $(nodist_tune_gen_mul1_w32k2_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k2_DEPENDENCIES = \ @GF2X_32BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k3_OBJECTS = tune_gen_mul1_w32k3-gen_mul1_w32k3.$(OBJEXT) tune_gen_mul1_w32k3_OBJECTS = $(nodist_tune_gen_mul1_w32k3_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k3_DEPENDENCIES = \ @GF2X_32BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k4_OBJECTS = tune_gen_mul1_w32k4-gen_mul1_w32k4.$(OBJEXT) tune_gen_mul1_w32k4_OBJECTS = $(nodist_tune_gen_mul1_w32k4_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k4_DEPENDENCIES = \ @GF2X_32BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k5_OBJECTS = tune_gen_mul1_w32k5-gen_mul1_w32k5.$(OBJEXT) tune_gen_mul1_w32k5_OBJECTS = $(nodist_tune_gen_mul1_w32k5_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k5_DEPENDENCIES = \ @GF2X_32BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k6_OBJECTS = tune_gen_mul1_w32k6-gen_mul1_w32k6.$(OBJEXT) tune_gen_mul1_w32k6_OBJECTS = $(nodist_tune_gen_mul1_w32k6_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k6_DEPENDENCIES = \ @GF2X_32BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k2_OBJECTS = tune_gen_mul1_w64k2-gen_mul1_w64k2.$(OBJEXT) tune_gen_mul1_w64k2_OBJECTS = $(nodist_tune_gen_mul1_w64k2_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k2_DEPENDENCIES = \ @GF2X_64BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k3_OBJECTS = tune_gen_mul1_w64k3-gen_mul1_w64k3.$(OBJEXT) tune_gen_mul1_w64k3_OBJECTS = $(nodist_tune_gen_mul1_w64k3_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k3_DEPENDENCIES = \ @GF2X_64BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k4_OBJECTS = tune_gen_mul1_w64k4-gen_mul1_w64k4.$(OBJEXT) tune_gen_mul1_w64k4_OBJECTS = $(nodist_tune_gen_mul1_w64k4_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k4_DEPENDENCIES = \ @GF2X_64BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k5_OBJECTS = tune_gen_mul1_w64k5-gen_mul1_w64k5.$(OBJEXT) tune_gen_mul1_w64k5_OBJECTS = $(nodist_tune_gen_mul1_w64k5_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k5_DEPENDENCIES = \ @GF2X_64BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@ ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k6_OBJECTS = tune_gen_mul1_w64k6-gen_mul1_w64k6.$(OBJEXT) tune_gen_mul1_w64k6_OBJECTS = $(nodist_tune_gen_mul1_w64k6_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k6_DEPENDENCIES = \ @GF2X_64BIT_SOURCES_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@ ../libgf2x.la am__tune_mul1cl_SOURCES_DIST = ../lowlevel/mul1cl.c am__dirstamp = $(am__leading_dot)dirstamp @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul1cl_OBJECTS = ../lowlevel/tune_mul1cl-mul1cl.$(OBJEXT) nodist_tune_mul1cl_OBJECTS = tune_mul1cl_OBJECTS = $(am_tune_mul1cl_OBJECTS) \ $(nodist_tune_mul1cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul1cl_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s1.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul2cl_SOURCES_DIST = ../lowlevel/mul2cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul2cl_OBJECTS = ../lowlevel/tune_mul2cl-mul2cl.$(OBJEXT) nodist_tune_mul2cl_OBJECTS = tune_mul2cl_OBJECTS = $(am_tune_mul2cl_OBJECTS) \ $(nodist_tune_mul2cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s2.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul2cl2_SOURCES_DIST = ../lowlevel/mul2cl2.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul2cl2_OBJECTS = ../lowlevel/tune_mul2cl2-mul2cl2.$(OBJEXT) nodist_tune_mul2cl2_OBJECTS = tune_mul2cl2_OBJECTS = $(am_tune_mul2cl2_OBJECTS) \ $(nodist_tune_mul2cl2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s2.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul2k_OBJECTS = ../lowlevel/tune_mul2k-mul2k.$(OBJEXT) nodist_tune_mul2k_OBJECTS = tune_mul2k_OBJECTS = $(am_tune_mul2k_OBJECTS) \ $(nodist_tune_mul2k_OBJECTS) tune_mul2k_DEPENDENCIES = libtuneup-s2.la libtiming.la ../libgf2x.la am__tune_mul2t_SOURCES_DIST = ../lowlevel/mul2t.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_tune_mul2t_OBJECTS = ../lowlevel/tune_mul2t-mul2t.$(OBJEXT) nodist_tune_mul2t_OBJECTS = tune_mul2t_OBJECTS = $(am_tune_mul2t_OBJECTS) \ $(nodist_tune_mul2t_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t_DEPENDENCIES = libtuneup-s2.la \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul2t2_SOURCES_DIST = ../lowlevel/mul2t2.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_tune_mul2t2_OBJECTS = ../lowlevel/tune_mul2t2-mul2t2.$(OBJEXT) nodist_tune_mul2t2_OBJECTS = tune_mul2t2_OBJECTS = $(am_tune_mul2t2_OBJECTS) \ $(nodist_tune_mul2t2_OBJECTS) @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t2_DEPENDENCIES = libtuneup-s2.la \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ libtiming.la \ @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul3cl_SOURCES_DIST = ../lowlevel/mul3cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul3cl_OBJECTS = ../lowlevel/tune_mul3cl-mul3cl.$(OBJEXT) nodist_tune_mul3cl_OBJECTS = tune_mul3cl_OBJECTS = $(am_tune_mul3cl_OBJECTS) \ $(nodist_tune_mul3cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul3cl_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s3.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul3k_OBJECTS = ../lowlevel/tune_mul3k-mul3k.$(OBJEXT) nodist_tune_mul3k_OBJECTS = tune_mul3k_OBJECTS = $(am_tune_mul3k_OBJECTS) \ $(nodist_tune_mul3k_OBJECTS) tune_mul3k_DEPENDENCIES = libtuneup-s3.la libtiming.la ../libgf2x.la am_tune_mul3k2_OBJECTS = ../lowlevel/tune_mul3k2-mul3k2.$(OBJEXT) nodist_tune_mul3k2_OBJECTS = tune_mul3k2_OBJECTS = $(am_tune_mul3k2_OBJECTS) \ $(nodist_tune_mul3k2_OBJECTS) tune_mul3k2_DEPENDENCIES = libtuneup-s3.la libtiming.la ../libgf2x.la am__tune_mul3t_SOURCES_DIST = ../lowlevel/mul3t.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_tune_mul3t_OBJECTS = ../lowlevel/tune_mul3t-mul3t.$(OBJEXT) nodist_tune_mul3t_OBJECTS = tune_mul3t_OBJECTS = $(am_tune_mul3t_OBJECTS) \ $(nodist_tune_mul3t_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul3t_DEPENDENCIES = libtuneup-s3.la \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul4cl1_SOURCES_DIST = ../lowlevel/mul4cl1.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul4cl1_OBJECTS = ../lowlevel/tune_mul4cl1-mul4cl1.$(OBJEXT) nodist_tune_mul4cl1_OBJECTS = tune_mul4cl1_OBJECTS = $(am_tune_mul4cl1_OBJECTS) \ $(nodist_tune_mul4cl1_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4cl1_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s4.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul4clk_SOURCES_DIST = ../lowlevel/mul4clk.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul4clk_OBJECTS = ../lowlevel/tune_mul4clk-mul4clk.$(OBJEXT) nodist_tune_mul4clk_OBJECTS = tune_mul4clk_OBJECTS = $(am_tune_mul4clk_OBJECTS) \ $(nodist_tune_mul4clk_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4clk_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s4.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul4k_OBJECTS = ../lowlevel/tune_mul4k-mul4k.$(OBJEXT) nodist_tune_mul4k_OBJECTS = tune_mul4k_OBJECTS = $(am_tune_mul4k_OBJECTS) \ $(nodist_tune_mul4k_OBJECTS) tune_mul4k_DEPENDENCIES = libtuneup-s4.la libtiming.la ../libgf2x.la am__tune_mul4t_SOURCES_DIST = ../lowlevel/mul4t.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@am_tune_mul4t_OBJECTS = ../lowlevel/tune_mul4t-mul4t.$(OBJEXT) nodist_tune_mul4t_OBJECTS = tune_mul4t_OBJECTS = $(am_tune_mul4t_OBJECTS) \ $(nodist_tune_mul4t_OBJECTS) @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul4t_DEPENDENCIES = libtuneup-s4.la \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ libtiming.la \ @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul5clk2_SOURCES_DIST = ../lowlevel/mul5clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul5clk2_OBJECTS = ../lowlevel/tune_mul5clk2-mul5clk2.$(OBJEXT) nodist_tune_mul5clk2_OBJECTS = tune_mul5clk2_OBJECTS = $(am_tune_mul5clk2_OBJECTS) \ $(nodist_tune_mul5clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s5.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul5clk_c_SOURCES_DIST = ../lowlevel/mul5clk_c.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul5clk_c_OBJECTS = ../lowlevel/tune_mul5clk_c-mul5clk_c.$(OBJEXT) nodist_tune_mul5clk_c_OBJECTS = tune_mul5clk_c_OBJECTS = $(am_tune_mul5clk_c_OBJECTS) \ $(nodist_tune_mul5clk_c_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk_c_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s5.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul5k3_SOURCES_DIST = ../lowlevel/mul5k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul5k3_OBJECTS = ../lowlevel/tune_mul5k3-mul5k3.$(OBJEXT) nodist_tune_mul5k3_OBJECTS = tune_mul5k3_OBJECTS = $(am_tune_mul5k3_OBJECTS) \ $(nodist_tune_mul5k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5k3_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s5.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul5k_a_OBJECTS = ../lowlevel/tune_mul5k_a-mul5k_a.$(OBJEXT) nodist_tune_mul5k_a_OBJECTS = tune_mul5k_a_OBJECTS = $(am_tune_mul5k_a_OBJECTS) \ $(nodist_tune_mul5k_a_OBJECTS) tune_mul5k_a_DEPENDENCIES = libtuneup-s5.la libtiming.la ../libgf2x.la am_tune_mul5k_b_OBJECTS = ../lowlevel/tune_mul5k_b-mul5k_b.$(OBJEXT) nodist_tune_mul5k_b_OBJECTS = tune_mul5k_b_OBJECTS = $(am_tune_mul5k_b_OBJECTS) \ $(nodist_tune_mul5k_b_OBJECTS) tune_mul5k_b_DEPENDENCIES = libtuneup-s5.la libtiming.la ../libgf2x.la am_tune_mul5k_c_OBJECTS = ../lowlevel/tune_mul5k_c-mul5k_c.$(OBJEXT) nodist_tune_mul5k_c_OBJECTS = tune_mul5k_c_OBJECTS = $(am_tune_mul5k_c_OBJECTS) \ $(nodist_tune_mul5k_c_OBJECTS) tune_mul5k_c_DEPENDENCIES = libtuneup-s5.la libtiming.la ../libgf2x.la am_tune_mul5k_d_OBJECTS = ../lowlevel/tune_mul5k_d-mul5k_d.$(OBJEXT) nodist_tune_mul5k_d_OBJECTS = tune_mul5k_d_OBJECTS = $(am_tune_mul5k_d_OBJECTS) \ $(nodist_tune_mul5k_d_OBJECTS) tune_mul5k_d_DEPENDENCIES = libtuneup-s5.la libtiming.la ../libgf2x.la am__tune_mul6clk2_SOURCES_DIST = ../lowlevel/mul6clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul6clk2_OBJECTS = ../lowlevel/tune_mul6clk2-mul6clk2.$(OBJEXT) nodist_tune_mul6clk2_OBJECTS = tune_mul6clk2_OBJECTS = $(am_tune_mul6clk2_OBJECTS) \ $(nodist_tune_mul6clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul6clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s6.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul6k_a_OBJECTS = ../lowlevel/tune_mul6k_a-mul6k_a.$(OBJEXT) nodist_tune_mul6k_a_OBJECTS = tune_mul6k_a_OBJECTS = $(am_tune_mul6k_a_OBJECTS) \ $(nodist_tune_mul6k_a_OBJECTS) tune_mul6k_a_DEPENDENCIES = libtuneup-s6.la libtiming.la ../libgf2x.la am_tune_mul6k_b_OBJECTS = ../lowlevel/tune_mul6k_b-mul6k_b.$(OBJEXT) nodist_tune_mul6k_b_OBJECTS = tune_mul6k_b_OBJECTS = $(am_tune_mul6k_b_OBJECTS) \ $(nodist_tune_mul6k_b_OBJECTS) tune_mul6k_b_DEPENDENCIES = libtuneup-s6.la libtiming.la ../libgf2x.la am_tune_mul6k_c_OBJECTS = ../lowlevel/tune_mul6k_c-mul6k_c.$(OBJEXT) nodist_tune_mul6k_c_OBJECTS = tune_mul6k_c_OBJECTS = $(am_tune_mul6k_c_OBJECTS) \ $(nodist_tune_mul6k_c_OBJECTS) tune_mul6k_c_DEPENDENCIES = libtuneup-s6.la libtiming.la ../libgf2x.la am__tune_mul7cl_SOURCES_DIST = ../lowlevel/mul7cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul7cl_OBJECTS = ../lowlevel/tune_mul7cl-mul7cl.$(OBJEXT) nodist_tune_mul7cl_OBJECTS = tune_mul7cl_OBJECTS = $(am_tune_mul7cl_OBJECTS) \ $(nodist_tune_mul7cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7cl_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s7.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul7k_OBJECTS = ../lowlevel/tune_mul7k-mul7k.$(OBJEXT) nodist_tune_mul7k_OBJECTS = tune_mul7k_OBJECTS = $(am_tune_mul7k_OBJECTS) \ $(nodist_tune_mul7k_OBJECTS) tune_mul7k_DEPENDENCIES = libtuneup-s7.la libtiming.la ../libgf2x.la am__tune_mul7k3_SOURCES_DIST = ../lowlevel/mul7k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul7k3_OBJECTS = ../lowlevel/tune_mul7k3-mul7k3.$(OBJEXT) nodist_tune_mul7k3_OBJECTS = tune_mul7k3_OBJECTS = $(am_tune_mul7k3_OBJECTS) \ $(nodist_tune_mul7k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7k3_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s7.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul8k_OBJECTS = ../lowlevel/tune_mul8k-mul8k.$(OBJEXT) nodist_tune_mul8k_OBJECTS = tune_mul8k_OBJECTS = $(am_tune_mul8k_OBJECTS) \ $(nodist_tune_mul8k_OBJECTS) tune_mul8k_DEPENDENCIES = libtuneup-s8.la libtiming.la ../libgf2x.la am__tune_mul9cl_SOURCES_DIST = ../lowlevel/mul9cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul9cl_OBJECTS = ../lowlevel/tune_mul9cl-mul9cl.$(OBJEXT) nodist_tune_mul9cl_OBJECTS = tune_mul9cl_OBJECTS = $(am_tune_mul9cl_OBJECTS) \ $(nodist_tune_mul9cl_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9cl_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s9.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am__tune_mul9clk2_SOURCES_DIST = ../lowlevel/mul9clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul9clk2_OBJECTS = ../lowlevel/tune_mul9clk2-mul9clk2.$(OBJEXT) nodist_tune_mul9clk2_OBJECTS = tune_mul9clk2_OBJECTS = $(am_tune_mul9clk2_OBJECTS) \ $(nodist_tune_mul9clk2_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9clk2_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s9.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tune_mul9k_OBJECTS = ../lowlevel/tune_mul9k-mul9k.$(OBJEXT) nodist_tune_mul9k_OBJECTS = tune_mul9k_OBJECTS = $(am_tune_mul9k_OBJECTS) \ $(nodist_tune_mul9k_OBJECTS) tune_mul9k_DEPENDENCIES = libtuneup-s9.la libtiming.la ../libgf2x.la am_tune_mul9k2_OBJECTS = ../lowlevel/tune_mul9k2-mul9k2.$(OBJEXT) nodist_tune_mul9k2_OBJECTS = tune_mul9k2_OBJECTS = $(am_tune_mul9k2_OBJECTS) \ $(nodist_tune_mul9k2_OBJECTS) tune_mul9k2_DEPENDENCIES = libtuneup-s9.la libtiming.la ../libgf2x.la am__tune_mul9k3_SOURCES_DIST = ../lowlevel/mul9k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@am_tune_mul9k3_OBJECTS = ../lowlevel/tune_mul9k3-mul9k3.$(OBJEXT) nodist_tune_mul9k3_OBJECTS = tune_mul9k3_OBJECTS = $(am_tune_mul9k3_OBJECTS) \ $(nodist_tune_mul9k3_OBJECTS) @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9k3_DEPENDENCIES = \ @GF2X_PCLMUL_AVAILABLE_TRUE@ libtuneup-s9.la libtiming.la \ @GF2X_PCLMUL_AVAILABLE_TRUE@ ../libgf2x.la am_tunefft_OBJECTS = tunefft.$(OBJEXT) tuning-common.$(OBJEXT) tunefft_OBJECTS = $(am_tunefft_OBJECTS) tunefft_DEPENDENCIES = libtiming.la ../libgf2x.la am_tunetoom_OBJECTS = tunetoom.$(OBJEXT) tuning-common.$(OBJEXT) tunetoom_OBJECTS = $(am_tunetoom_OBJECTS) tunetoom_DEPENDENCIES = libtiming.la ../libgf2x.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gf2x depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtiming_la_SOURCES) $(nodist_libtuneup_s1_la_SOURCES) \ $(nodist_libtuneup_s2_la_SOURCES) \ $(nodist_libtuneup_s3_la_SOURCES) \ $(nodist_libtuneup_s4_la_SOURCES) \ $(nodist_libtuneup_s5_la_SOURCES) \ $(nodist_libtuneup_s6_la_SOURCES) \ $(nodist_libtuneup_s7_la_SOURCES) \ $(nodist_libtuneup_s8_la_SOURCES) \ $(nodist_libtuneup_s9_la_SOURCES) $(check_mul1cl_SOURCES) \ $(check_mul2cl_SOURCES) $(check_mul2cl2_SOURCES) \ $(check_mul2k_SOURCES) $(check_mul2t_SOURCES) \ $(check_mul2t2_SOURCES) $(check_mul3cl_SOURCES) \ $(check_mul3k_SOURCES) $(check_mul3k2_SOURCES) \ $(check_mul3t_SOURCES) $(check_mul4cl1_SOURCES) \ $(check_mul4clk_SOURCES) $(check_mul4k_SOURCES) \ $(check_mul4t_SOURCES) $(check_mul5clk2_SOURCES) \ $(check_mul5clk_c_SOURCES) $(check_mul5k3_SOURCES) \ $(check_mul5k_a_SOURCES) $(check_mul5k_b_SOURCES) \ $(check_mul5k_c_SOURCES) $(check_mul5k_d_SOURCES) \ $(check_mul6clk2_SOURCES) $(check_mul6k_a_SOURCES) \ $(check_mul6k_b_SOURCES) $(check_mul6k_c_SOURCES) \ $(check_mul7cl_SOURCES) $(check_mul7k_SOURCES) \ $(check_mul7k3_SOURCES) $(check_mul8k_SOURCES) \ $(check_mul9cl_SOURCES) $(check_mul9clk2_SOURCES) \ $(check_mul9k_SOURCES) $(check_mul9k2_SOURCES) \ $(check_mul9k3_SOURCES) $(modify_thresholds_SOURCES) \ $(nodist_tune_gen_mul1_w32k2_SOURCES) \ $(nodist_tune_gen_mul1_w32k3_SOURCES) \ $(nodist_tune_gen_mul1_w32k4_SOURCES) \ $(nodist_tune_gen_mul1_w32k5_SOURCES) \ $(nodist_tune_gen_mul1_w32k6_SOURCES) \ $(nodist_tune_gen_mul1_w64k2_SOURCES) \ $(nodist_tune_gen_mul1_w64k3_SOURCES) \ $(nodist_tune_gen_mul1_w64k4_SOURCES) \ $(nodist_tune_gen_mul1_w64k5_SOURCES) \ $(nodist_tune_gen_mul1_w64k6_SOURCES) $(tune_mul1cl_SOURCES) \ $(nodist_tune_mul1cl_SOURCES) $(tune_mul2cl_SOURCES) \ $(nodist_tune_mul2cl_SOURCES) $(tune_mul2cl2_SOURCES) \ $(nodist_tune_mul2cl2_SOURCES) $(tune_mul2k_SOURCES) \ $(nodist_tune_mul2k_SOURCES) $(tune_mul2t_SOURCES) \ $(nodist_tune_mul2t_SOURCES) $(tune_mul2t2_SOURCES) \ $(nodist_tune_mul2t2_SOURCES) $(tune_mul3cl_SOURCES) \ $(nodist_tune_mul3cl_SOURCES) $(tune_mul3k_SOURCES) \ $(nodist_tune_mul3k_SOURCES) $(tune_mul3k2_SOURCES) \ $(nodist_tune_mul3k2_SOURCES) $(tune_mul3t_SOURCES) \ $(nodist_tune_mul3t_SOURCES) $(tune_mul4cl1_SOURCES) \ $(nodist_tune_mul4cl1_SOURCES) $(tune_mul4clk_SOURCES) \ $(nodist_tune_mul4clk_SOURCES) $(tune_mul4k_SOURCES) \ $(nodist_tune_mul4k_SOURCES) $(tune_mul4t_SOURCES) \ $(nodist_tune_mul4t_SOURCES) $(tune_mul5clk2_SOURCES) \ $(nodist_tune_mul5clk2_SOURCES) $(tune_mul5clk_c_SOURCES) \ $(nodist_tune_mul5clk_c_SOURCES) $(tune_mul5k3_SOURCES) \ $(nodist_tune_mul5k3_SOURCES) $(tune_mul5k_a_SOURCES) \ $(nodist_tune_mul5k_a_SOURCES) $(tune_mul5k_b_SOURCES) \ $(nodist_tune_mul5k_b_SOURCES) $(tune_mul5k_c_SOURCES) \ $(nodist_tune_mul5k_c_SOURCES) $(tune_mul5k_d_SOURCES) \ $(nodist_tune_mul5k_d_SOURCES) $(tune_mul6clk2_SOURCES) \ $(nodist_tune_mul6clk2_SOURCES) $(tune_mul6k_a_SOURCES) \ $(nodist_tune_mul6k_a_SOURCES) $(tune_mul6k_b_SOURCES) \ $(nodist_tune_mul6k_b_SOURCES) $(tune_mul6k_c_SOURCES) \ $(nodist_tune_mul6k_c_SOURCES) $(tune_mul7cl_SOURCES) \ $(nodist_tune_mul7cl_SOURCES) $(tune_mul7k_SOURCES) \ $(nodist_tune_mul7k_SOURCES) $(tune_mul7k3_SOURCES) \ $(nodist_tune_mul7k3_SOURCES) $(tune_mul8k_SOURCES) \ $(nodist_tune_mul8k_SOURCES) $(tune_mul9cl_SOURCES) \ $(nodist_tune_mul9cl_SOURCES) $(tune_mul9clk2_SOURCES) \ $(nodist_tune_mul9clk2_SOURCES) $(tune_mul9k_SOURCES) \ $(nodist_tune_mul9k_SOURCES) $(tune_mul9k2_SOURCES) \ $(nodist_tune_mul9k2_SOURCES) $(tune_mul9k3_SOURCES) \ $(nodist_tune_mul9k3_SOURCES) $(tunefft_SOURCES) \ $(tunetoom_SOURCES) DIST_SOURCES = $(libtiming_la_SOURCES) \ $(am__check_mul1cl_SOURCES_DIST) \ $(am__check_mul2cl_SOURCES_DIST) \ $(am__check_mul2cl2_SOURCES_DIST) $(check_mul2k_SOURCES) \ $(am__check_mul2t_SOURCES_DIST) \ $(am__check_mul2t2_SOURCES_DIST) \ $(am__check_mul3cl_SOURCES_DIST) $(check_mul3k_SOURCES) \ $(check_mul3k2_SOURCES) $(am__check_mul3t_SOURCES_DIST) \ $(am__check_mul4cl1_SOURCES_DIST) \ $(am__check_mul4clk_SOURCES_DIST) $(check_mul4k_SOURCES) \ $(am__check_mul4t_SOURCES_DIST) \ $(am__check_mul5clk2_SOURCES_DIST) \ $(am__check_mul5clk_c_SOURCES_DIST) \ $(am__check_mul5k3_SOURCES_DIST) $(check_mul5k_a_SOURCES) \ $(check_mul5k_b_SOURCES) $(check_mul5k_c_SOURCES) \ $(check_mul5k_d_SOURCES) $(am__check_mul6clk2_SOURCES_DIST) \ $(check_mul6k_a_SOURCES) $(check_mul6k_b_SOURCES) \ $(check_mul6k_c_SOURCES) $(am__check_mul7cl_SOURCES_DIST) \ $(check_mul7k_SOURCES) $(am__check_mul7k3_SOURCES_DIST) \ $(check_mul8k_SOURCES) $(am__check_mul9cl_SOURCES_DIST) \ $(am__check_mul9clk2_SOURCES_DIST) $(check_mul9k_SOURCES) \ $(check_mul9k2_SOURCES) $(am__check_mul9k3_SOURCES_DIST) \ $(modify_thresholds_SOURCES) $(am__tune_mul1cl_SOURCES_DIST) \ $(am__tune_mul2cl_SOURCES_DIST) \ $(am__tune_mul2cl2_SOURCES_DIST) $(tune_mul2k_SOURCES) \ $(am__tune_mul2t_SOURCES_DIST) $(am__tune_mul2t2_SOURCES_DIST) \ $(am__tune_mul3cl_SOURCES_DIST) $(tune_mul3k_SOURCES) \ $(tune_mul3k2_SOURCES) $(am__tune_mul3t_SOURCES_DIST) \ $(am__tune_mul4cl1_SOURCES_DIST) \ $(am__tune_mul4clk_SOURCES_DIST) $(tune_mul4k_SOURCES) \ $(am__tune_mul4t_SOURCES_DIST) \ $(am__tune_mul5clk2_SOURCES_DIST) \ $(am__tune_mul5clk_c_SOURCES_DIST) \ $(am__tune_mul5k3_SOURCES_DIST) $(tune_mul5k_a_SOURCES) \ $(tune_mul5k_b_SOURCES) $(tune_mul5k_c_SOURCES) \ $(tune_mul5k_d_SOURCES) $(am__tune_mul6clk2_SOURCES_DIST) \ $(tune_mul6k_a_SOURCES) $(tune_mul6k_b_SOURCES) \ $(tune_mul6k_c_SOURCES) $(am__tune_mul7cl_SOURCES_DIST) \ $(tune_mul7k_SOURCES) $(am__tune_mul7k3_SOURCES_DIST) \ $(tune_mul8k_SOURCES) $(am__tune_mul9cl_SOURCES_DIST) \ $(am__tune_mul9clk2_SOURCES_DIST) $(tune_mul9k_SOURCES) \ $(tune_mul9k2_SOURCES) $(am__tune_mul9k3_SOURCES_DIST) \ $(tunefft_SOURCES) $(tunetoom_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/test-driver README TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # This impacts the storage class of the functions in the inlines files. AUTOMAKE_OPTIONS = subdir-objects # note that most automatic targets have their own CPPFLAGS, which # override this one. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) AM_LDFLAGS = -no-install # -- end generated code -- ###################################################################### ###################################################################### ###################################################################### EXTRA_PROGRAMS = $(LOWLEVEL) modify-thresholds$(EXEEXT) \ tunetoom$(EXEEXT) tunefft$(EXEEXT) EXTRA_DIST = generate-test-list.pl tuneup_pre.c tuning_undef_wrapper.h \ tuning_undefs_pre.h ../lowlevel/gen_bb_mul_code.c \ tune-lowlevel.pl # We've got a lot of per-target cfiles here, but it's rather silly to # have automake produce separate .o files for the files which fo _not_ # change in this regard. So we resort to having lots of silly libraries, # as a workaround. EXTRA_LTLIBRARIES = libtiming.la libtuneup-s1.la libtuneup-s2.la \ libtuneup-s3.la libtuneup-s4.la libtuneup-s5.la \ libtuneup-s6.la libtuneup-s7.la libtuneup-s8.la \ libtuneup-s9.la libtiming_la_SOURCES = timing.c LOWLEVEL = $(am__append_1) $(am__append_3) tune_mul2k$(EXEEXT) \ tune_mul3k$(EXEEXT) tune_mul3k2$(EXEEXT) tune_mul4k$(EXEEXT) \ tune_mul5k_a$(EXEEXT) tune_mul5k_b$(EXEEXT) \ tune_mul5k_c$(EXEEXT) tune_mul5k_d$(EXEEXT) \ tune_mul6k_a$(EXEEXT) tune_mul6k_b$(EXEEXT) \ tune_mul6k_c$(EXEEXT) tune_mul7k$(EXEEXT) tune_mul8k$(EXEEXT) \ tune_mul9k$(EXEEXT) tune_mul9k2$(EXEEXT) $(am__append_5) \ $(am__append_8) $(am__append_11) CLEANFILES = tuning_undefs_1.h tuning_undefs_2.h tuning_undefs_3.h \ tuning_undefs_4.h tuning_undefs_5.h tuning_undefs_6.h \ tuning_undefs_7.h tuning_undefs_8.h tuning_undefs_9.h \ $(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) tunetoom.res \ tunefft.res $(BUILT_SOURCES) DISTCLEANFILES = gen_bb_mul_code$(EXEEXT_FOR_BUILD) tuning_undefs_1.h \ tuning_undefs_2.h tuning_undefs_3.h tuning_undefs_4.h \ tuning_undefs_5.h tuning_undefs_6.h tuning_undefs_7.h \ tuning_undefs_8.h tuning_undefs_9.h BUILT_SOURCES = tuneup_1.c tuning_undefs_1.h tuneup_2.c \ tuning_undefs_2.h tuneup_3.c tuning_undefs_3.h tuneup_4.c \ tuning_undefs_4.h tuneup_5.c tuning_undefs_5.h tuneup_6.c \ tuning_undefs_6.h tuneup_7.c tuning_undefs_7.h tuneup_8.c \ tuning_undefs_8.h tuneup_9.c tuning_undefs_9.h $(am__append_2) \ $(am__append_4) nodist_libtuneup_s1_la_SOURCES = tuneup_1.c tuning_undefs_1.h libtuneup_s1_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s2_la_SOURCES = tuneup_2.c tuning_undefs_2.h libtuneup_s2_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s3_la_SOURCES = tuneup_3.c tuning_undefs_3.h libtuneup_s3_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s4_la_SOURCES = tuneup_4.c tuning_undefs_4.h libtuneup_s4_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s5_la_SOURCES = tuneup_5.c tuning_undefs_5.h libtuneup_s5_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s6_la_SOURCES = tuneup_6.c tuning_undefs_6.h libtuneup_s6_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s7_la_SOURCES = tuneup_7.c tuning_undefs_7.h libtuneup_s7_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s8_la_SOURCES = tuneup_8.c tuning_undefs_8.h libtuneup_s8_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) nodist_libtuneup_s9_la_SOURCES = tuneup_9.c tuning_undefs_9.h libtuneup_s9_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k2_SOURCES = gen_mul1_w32k2.c tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k2_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k3_SOURCES = gen_mul1_w32k3.c tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k3_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k4_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k4_SOURCES = gen_mul1_w32k4.c tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k4_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k5_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k5_SOURCES = gen_mul1_w32k5.c tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k5_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k6_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_32BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w32k6_SOURCES = gen_mul1_w32k6.c tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@tune_gen_mul1_w32k6_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k2_SOURCES = gen_mul1_w64k2.c tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k2_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k3_SOURCES = gen_mul1_w64k3.c tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k3_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k4_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k4_SOURCES = gen_mul1_w64k4.c tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k4_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k5_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k5_SOURCES = gen_mul1_w64k5.c tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k5_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k6_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_64BIT_SOURCES_TRUE@nodist_tune_gen_mul1_w64k6_SOURCES = gen_mul1_w64k6.c tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@tune_gen_mul1_w64k6_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la tune_mul2k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=2 tune_mul2k_SOURCES = ../lowlevel/mul2k.c nodist_tune_mul2k_SOURCES = tuning_undefs_2.h tune_mul2k_LDADD = libtuneup-s2.la libtiming.la ../libgf2x.la check_mul2k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2k.c\" -DTESTING_SIZE=2 check_mul2k_LDADD = ../libgf2x.la check_mul2k_SOURCES = check_small_size.c tune_mul3k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3k_SOURCES = ../lowlevel/mul3k.c nodist_tune_mul3k_SOURCES = tuning_undefs_3.h tune_mul3k_LDADD = libtuneup-s3.la libtiming.la ../libgf2x.la check_mul3k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3k.c\" -DTESTING_SIZE=3 check_mul3k_LDADD = ../libgf2x.la check_mul3k_SOURCES = check_small_size.c tune_mul3k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=3 tune_mul3k2_SOURCES = ../lowlevel/mul3k2.c nodist_tune_mul3k2_SOURCES = tuning_undefs_3.h tune_mul3k2_LDADD = libtuneup-s3.la libtiming.la ../libgf2x.la check_mul3k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3k2.c\" -DTESTING_SIZE=3 check_mul3k2_LDADD = ../libgf2x.la check_mul3k2_SOURCES = check_small_size.c tune_mul4k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=4 tune_mul4k_SOURCES = ../lowlevel/mul4k.c nodist_tune_mul4k_SOURCES = tuning_undefs_4.h tune_mul4k_LDADD = libtuneup-s4.la libtiming.la ../libgf2x.la check_mul4k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4k.c\" -DTESTING_SIZE=4 check_mul4k_LDADD = ../libgf2x.la check_mul4k_SOURCES = check_small_size.c tune_mul5k_a_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_a_SOURCES = ../lowlevel/mul5k_a.c nodist_tune_mul5k_a_SOURCES = tuning_undefs_5.h tune_mul5k_a_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la check_mul5k_a_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_a.c\" -DTESTING_SIZE=5 check_mul5k_a_LDADD = ../libgf2x.la check_mul5k_a_SOURCES = check_small_size.c tune_mul5k_b_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_b_SOURCES = ../lowlevel/mul5k_b.c nodist_tune_mul5k_b_SOURCES = tuning_undefs_5.h tune_mul5k_b_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la check_mul5k_b_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_b.c\" -DTESTING_SIZE=5 check_mul5k_b_LDADD = ../libgf2x.la check_mul5k_b_SOURCES = check_small_size.c tune_mul5k_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_c_SOURCES = ../lowlevel/mul5k_c.c nodist_tune_mul5k_c_SOURCES = tuning_undefs_5.h tune_mul5k_c_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la check_mul5k_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_c.c\" -DTESTING_SIZE=5 check_mul5k_c_LDADD = ../libgf2x.la check_mul5k_c_SOURCES = check_small_size.c tune_mul5k_d_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 tune_mul5k_d_SOURCES = ../lowlevel/mul5k_d.c nodist_tune_mul5k_d_SOURCES = tuning_undefs_5.h tune_mul5k_d_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la check_mul5k_d_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k_d.c\" -DTESTING_SIZE=5 check_mul5k_d_LDADD = ../libgf2x.la check_mul5k_d_SOURCES = check_small_size.c tune_mul6k_a_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_a_SOURCES = ../lowlevel/mul6k_a.c nodist_tune_mul6k_a_SOURCES = tuning_undefs_6.h tune_mul6k_a_LDADD = libtuneup-s6.la libtiming.la ../libgf2x.la check_mul6k_a_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_a.c\" -DTESTING_SIZE=6 check_mul6k_a_LDADD = ../libgf2x.la check_mul6k_a_SOURCES = check_small_size.c tune_mul6k_b_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_b_SOURCES = ../lowlevel/mul6k_b.c nodist_tune_mul6k_b_SOURCES = tuning_undefs_6.h tune_mul6k_b_LDADD = libtuneup-s6.la libtiming.la ../libgf2x.la check_mul6k_b_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_b.c\" -DTESTING_SIZE=6 check_mul6k_b_LDADD = ../libgf2x.la check_mul6k_b_SOURCES = check_small_size.c tune_mul6k_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=6 tune_mul6k_c_SOURCES = ../lowlevel/mul6k_c.c nodist_tune_mul6k_c_SOURCES = tuning_undefs_6.h tune_mul6k_c_LDADD = libtuneup-s6.la libtiming.la ../libgf2x.la check_mul6k_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6k_c.c\" -DTESTING_SIZE=6 check_mul6k_c_LDADD = ../libgf2x.la check_mul6k_c_SOURCES = check_small_size.c tune_mul7k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=7 tune_mul7k_SOURCES = ../lowlevel/mul7k.c nodist_tune_mul7k_SOURCES = tuning_undefs_7.h tune_mul7k_LDADD = libtuneup-s7.la libtiming.la ../libgf2x.la check_mul7k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7k.c\" -DTESTING_SIZE=7 check_mul7k_LDADD = ../libgf2x.la check_mul7k_SOURCES = check_small_size.c tune_mul8k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=8 tune_mul8k_SOURCES = ../lowlevel/mul8k.c nodist_tune_mul8k_SOURCES = tuning_undefs_8.h tune_mul8k_LDADD = libtuneup-s8.la libtiming.la ../libgf2x.la check_mul8k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul8k.c\" -DTESTING_SIZE=8 check_mul8k_LDADD = ../libgf2x.la check_mul8k_SOURCES = check_small_size.c tune_mul9k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9k_SOURCES = ../lowlevel/mul9k.c nodist_tune_mul9k_SOURCES = tuning_undefs_9.h tune_mul9k_LDADD = libtuneup-s9.la libtiming.la ../libgf2x.la check_mul9k_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k.c\" -DTESTING_SIZE=9 check_mul9k_LDADD = ../libgf2x.la check_mul9k_SOURCES = check_small_size.c tune_mul9k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=9 tune_mul9k2_SOURCES = ../lowlevel/mul9k2.c nodist_tune_mul9k2_SOURCES = tuning_undefs_9.h tune_mul9k2_LDADD = libtuneup-s9.la libtiming.la ../libgf2x.la check_mul9k2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k2.c\" -DTESTING_SIZE=9 check_mul9k2_LDADD = ../libgf2x.la check_mul9k2_SOURCES = check_small_size.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=2 @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t_SOURCES = ../lowlevel/mul2t.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@nodist_tune_mul2t_SOURCES = tuning_undefs_2.h @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t_LDADD = libtuneup-s2.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2t.c\" -DTESTING_SIZE=2 @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t_LDADD = ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t_SOURCES = check_small_size.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=2 @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t2_SOURCES = ../lowlevel/mul2t2.c @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@nodist_tune_mul2t2_SOURCES = tuning_undefs_2.h @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul2t2_LDADD = libtuneup-s2.la libtiming.la ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2t2.c\" -DTESTING_SIZE=2 @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t2_LDADD = ../libgf2x.la @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul2t2_SOURCES = check_small_size.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul4t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=4 @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul4t_SOURCES = ../lowlevel/mul4t.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@nodist_tune_mul4t_SOURCES = tuning_undefs_4.h @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul4t_LDADD = libtuneup-s4.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul4t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4t.c\" -DTESTING_SIZE=4 @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul4t_LDADD = ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul4t_SOURCES = check_small_size.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul3t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=3 @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul3t_SOURCES = ../lowlevel/mul3t.c @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@nodist_tune_mul3t_SOURCES = tuning_undefs_3.h @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@tune_mul3t_LDADD = libtuneup-s3.la libtiming.la ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul3t_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3t.c\" -DTESTING_SIZE=3 @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul3t_LDADD = ../libgf2x.la @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@check_mul3t_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul1cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=1 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul1cl_SOURCES = ../lowlevel/mul1cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul1cl_SOURCES = tuning_undefs_1.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul1cl_LDADD = libtuneup-s1.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul1cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul1cl.c\" -DTESTING_SIZE=1 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul1cl_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul1cl_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=2 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl_SOURCES = ../lowlevel/mul2cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul2cl_SOURCES = tuning_undefs_2.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl_LDADD = libtuneup-s2.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2cl.c\" -DTESTING_SIZE=2 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=2 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl2_SOURCES = ../lowlevel/mul2cl2.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul2cl2_SOURCES = tuning_undefs_2.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul2cl2_LDADD = libtuneup-s2.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul2cl2.c\" -DTESTING_SIZE=2 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl2_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul2cl2_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul3cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=3 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul3cl_SOURCES = ../lowlevel/mul3cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul3cl_SOURCES = tuning_undefs_3.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul3cl_LDADD = libtuneup-s3.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul3cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul3cl.c\" -DTESTING_SIZE=3 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul3cl_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul3cl_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4cl1_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=4 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4cl1_SOURCES = ../lowlevel/mul4cl1.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul4cl1_SOURCES = tuning_undefs_4.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4cl1_LDADD = libtuneup-s4.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4cl1_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4cl1.c\" -DTESTING_SIZE=4 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4cl1_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4cl1_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4clk_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=4 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4clk_SOURCES = ../lowlevel/mul4clk.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul4clk_SOURCES = tuning_undefs_4.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul4clk_LDADD = libtuneup-s4.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4clk_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul4clk.c\" -DTESTING_SIZE=4 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4clk_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul4clk_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk_c_SOURCES = ../lowlevel/mul5clk_c.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul5clk_c_SOURCES = tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk_c_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk_c_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5clk_c.c\" -DTESTING_SIZE=5 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk_c_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk_c_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5k3_SOURCES = ../lowlevel/mul5k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul5k3_SOURCES = tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5k3_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5k3.c\" -DTESTING_SIZE=5 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5k3_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5k3_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=5 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk2_SOURCES = ../lowlevel/mul5clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul5clk2_SOURCES = tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul5clk2_LDADD = libtuneup-s5.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul5clk2.c\" -DTESTING_SIZE=5 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk2_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul5clk2_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul6clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=6 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul6clk2_SOURCES = ../lowlevel/mul6clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul6clk2_SOURCES = tuning_undefs_6.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul6clk2_LDADD = libtuneup-s6.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul6clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul6clk2.c\" -DTESTING_SIZE=6 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul6clk2_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul6clk2_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=7 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7cl_SOURCES = ../lowlevel/mul7cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul7cl_SOURCES = tuning_undefs_7.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7cl_LDADD = libtuneup-s7.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7cl.c\" -DTESTING_SIZE=7 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7cl_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7cl_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=7 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7k3_SOURCES = ../lowlevel/mul7k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul7k3_SOURCES = tuning_undefs_7.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul7k3_LDADD = libtuneup-s7.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul7k3.c\" -DTESTING_SIZE=7 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7k3_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul7k3_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=9 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9k3_SOURCES = ../lowlevel/mul9k3.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul9k3_SOURCES = tuning_undefs_9.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9k3_LDADD = libtuneup-s9.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9k3_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9k3.c\" -DTESTING_SIZE=9 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9k3_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9k3_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=9 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9clk2_SOURCES = ../lowlevel/mul9clk2.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul9clk2_SOURCES = tuning_undefs_9.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9clk2_LDADD = libtuneup-s9.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9clk2_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9clk2.c\" -DTESTING_SIZE=9 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9clk2_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9clk2_SOURCES = check_small_size.c @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DTUNING=9 @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9cl_SOURCES = ../lowlevel/mul9cl.c @GF2X_PCLMUL_AVAILABLE_TRUE@nodist_tune_mul9cl_SOURCES = tuning_undefs_9.h @GF2X_PCLMUL_AVAILABLE_TRUE@tune_mul9cl_LDADD = libtuneup-s9.la libtiming.la ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9cl_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/gf2x -DSOURCEFILE=\"../lowlevel/mul9cl.c\" -DTESTING_SIZE=9 @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9cl_LDADD = ../libgf2x.la @GF2X_PCLMUL_AVAILABLE_TRUE@check_mul9cl_SOURCES = check_small_size.c ###################################################################### noinst_HEADERS = timing.h tuning-common.h replace.h modify_thresholds_SOURCES = modify-thresholds.c replace.c tunetoom_SOURCES = tunetoom.c tuning-common.c tunetoom_LDADD = libtiming.la ../libgf2x.la -lm TOOM_TUNING_LIMIT = 2048 tunefft_SOURCES = tunefft.c tuning-common.c tunefft_LDADD = libtiming.la ../libgf2x.la FFT_TUNING_LIMIT = 8000000 FFT_TUNING_SCALE = 1.02 all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libtiming.la: $(libtiming_la_OBJECTS) $(libtiming_la_DEPENDENCIES) $(EXTRA_libtiming_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtiming_la_OBJECTS) $(libtiming_la_LIBADD) $(LIBS) libtuneup-s1.la: $(libtuneup_s1_la_OBJECTS) $(libtuneup_s1_la_DEPENDENCIES) $(EXTRA_libtuneup_s1_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s1_la_OBJECTS) $(libtuneup_s1_la_LIBADD) $(LIBS) libtuneup-s2.la: $(libtuneup_s2_la_OBJECTS) $(libtuneup_s2_la_DEPENDENCIES) $(EXTRA_libtuneup_s2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s2_la_OBJECTS) $(libtuneup_s2_la_LIBADD) $(LIBS) libtuneup-s3.la: $(libtuneup_s3_la_OBJECTS) $(libtuneup_s3_la_DEPENDENCIES) $(EXTRA_libtuneup_s3_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s3_la_OBJECTS) $(libtuneup_s3_la_LIBADD) $(LIBS) libtuneup-s4.la: $(libtuneup_s4_la_OBJECTS) $(libtuneup_s4_la_DEPENDENCIES) $(EXTRA_libtuneup_s4_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s4_la_OBJECTS) $(libtuneup_s4_la_LIBADD) $(LIBS) libtuneup-s5.la: $(libtuneup_s5_la_OBJECTS) $(libtuneup_s5_la_DEPENDENCIES) $(EXTRA_libtuneup_s5_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s5_la_OBJECTS) $(libtuneup_s5_la_LIBADD) $(LIBS) libtuneup-s6.la: $(libtuneup_s6_la_OBJECTS) $(libtuneup_s6_la_DEPENDENCIES) $(EXTRA_libtuneup_s6_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s6_la_OBJECTS) $(libtuneup_s6_la_LIBADD) $(LIBS) libtuneup-s7.la: $(libtuneup_s7_la_OBJECTS) $(libtuneup_s7_la_DEPENDENCIES) $(EXTRA_libtuneup_s7_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s7_la_OBJECTS) $(libtuneup_s7_la_LIBADD) $(LIBS) libtuneup-s8.la: $(libtuneup_s8_la_OBJECTS) $(libtuneup_s8_la_DEPENDENCIES) $(EXTRA_libtuneup_s8_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s8_la_OBJECTS) $(libtuneup_s8_la_LIBADD) $(LIBS) libtuneup-s9.la: $(libtuneup_s9_la_OBJECTS) $(libtuneup_s9_la_DEPENDENCIES) $(EXTRA_libtuneup_s9_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtuneup_s9_la_OBJECTS) $(libtuneup_s9_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list check_mul1cl$(EXEEXT): $(check_mul1cl_OBJECTS) $(check_mul1cl_DEPENDENCIES) $(EXTRA_check_mul1cl_DEPENDENCIES) @rm -f check_mul1cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul1cl_OBJECTS) $(check_mul1cl_LDADD) $(LIBS) check_mul2cl$(EXEEXT): $(check_mul2cl_OBJECTS) $(check_mul2cl_DEPENDENCIES) $(EXTRA_check_mul2cl_DEPENDENCIES) @rm -f check_mul2cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul2cl_OBJECTS) $(check_mul2cl_LDADD) $(LIBS) check_mul2cl2$(EXEEXT): $(check_mul2cl2_OBJECTS) $(check_mul2cl2_DEPENDENCIES) $(EXTRA_check_mul2cl2_DEPENDENCIES) @rm -f check_mul2cl2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul2cl2_OBJECTS) $(check_mul2cl2_LDADD) $(LIBS) check_mul2k$(EXEEXT): $(check_mul2k_OBJECTS) $(check_mul2k_DEPENDENCIES) $(EXTRA_check_mul2k_DEPENDENCIES) @rm -f check_mul2k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul2k_OBJECTS) $(check_mul2k_LDADD) $(LIBS) check_mul2t$(EXEEXT): $(check_mul2t_OBJECTS) $(check_mul2t_DEPENDENCIES) $(EXTRA_check_mul2t_DEPENDENCIES) @rm -f check_mul2t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul2t_OBJECTS) $(check_mul2t_LDADD) $(LIBS) check_mul2t2$(EXEEXT): $(check_mul2t2_OBJECTS) $(check_mul2t2_DEPENDENCIES) $(EXTRA_check_mul2t2_DEPENDENCIES) @rm -f check_mul2t2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul2t2_OBJECTS) $(check_mul2t2_LDADD) $(LIBS) check_mul3cl$(EXEEXT): $(check_mul3cl_OBJECTS) $(check_mul3cl_DEPENDENCIES) $(EXTRA_check_mul3cl_DEPENDENCIES) @rm -f check_mul3cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul3cl_OBJECTS) $(check_mul3cl_LDADD) $(LIBS) check_mul3k$(EXEEXT): $(check_mul3k_OBJECTS) $(check_mul3k_DEPENDENCIES) $(EXTRA_check_mul3k_DEPENDENCIES) @rm -f check_mul3k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul3k_OBJECTS) $(check_mul3k_LDADD) $(LIBS) check_mul3k2$(EXEEXT): $(check_mul3k2_OBJECTS) $(check_mul3k2_DEPENDENCIES) $(EXTRA_check_mul3k2_DEPENDENCIES) @rm -f check_mul3k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul3k2_OBJECTS) $(check_mul3k2_LDADD) $(LIBS) check_mul3t$(EXEEXT): $(check_mul3t_OBJECTS) $(check_mul3t_DEPENDENCIES) $(EXTRA_check_mul3t_DEPENDENCIES) @rm -f check_mul3t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul3t_OBJECTS) $(check_mul3t_LDADD) $(LIBS) check_mul4cl1$(EXEEXT): $(check_mul4cl1_OBJECTS) $(check_mul4cl1_DEPENDENCIES) $(EXTRA_check_mul4cl1_DEPENDENCIES) @rm -f check_mul4cl1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul4cl1_OBJECTS) $(check_mul4cl1_LDADD) $(LIBS) check_mul4clk$(EXEEXT): $(check_mul4clk_OBJECTS) $(check_mul4clk_DEPENDENCIES) $(EXTRA_check_mul4clk_DEPENDENCIES) @rm -f check_mul4clk$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul4clk_OBJECTS) $(check_mul4clk_LDADD) $(LIBS) check_mul4k$(EXEEXT): $(check_mul4k_OBJECTS) $(check_mul4k_DEPENDENCIES) $(EXTRA_check_mul4k_DEPENDENCIES) @rm -f check_mul4k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul4k_OBJECTS) $(check_mul4k_LDADD) $(LIBS) check_mul4t$(EXEEXT): $(check_mul4t_OBJECTS) $(check_mul4t_DEPENDENCIES) $(EXTRA_check_mul4t_DEPENDENCIES) @rm -f check_mul4t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul4t_OBJECTS) $(check_mul4t_LDADD) $(LIBS) check_mul5clk2$(EXEEXT): $(check_mul5clk2_OBJECTS) $(check_mul5clk2_DEPENDENCIES) $(EXTRA_check_mul5clk2_DEPENDENCIES) @rm -f check_mul5clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5clk2_OBJECTS) $(check_mul5clk2_LDADD) $(LIBS) check_mul5clk_c$(EXEEXT): $(check_mul5clk_c_OBJECTS) $(check_mul5clk_c_DEPENDENCIES) $(EXTRA_check_mul5clk_c_DEPENDENCIES) @rm -f check_mul5clk_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5clk_c_OBJECTS) $(check_mul5clk_c_LDADD) $(LIBS) check_mul5k3$(EXEEXT): $(check_mul5k3_OBJECTS) $(check_mul5k3_DEPENDENCIES) $(EXTRA_check_mul5k3_DEPENDENCIES) @rm -f check_mul5k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5k3_OBJECTS) $(check_mul5k3_LDADD) $(LIBS) check_mul5k_a$(EXEEXT): $(check_mul5k_a_OBJECTS) $(check_mul5k_a_DEPENDENCIES) $(EXTRA_check_mul5k_a_DEPENDENCIES) @rm -f check_mul5k_a$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5k_a_OBJECTS) $(check_mul5k_a_LDADD) $(LIBS) check_mul5k_b$(EXEEXT): $(check_mul5k_b_OBJECTS) $(check_mul5k_b_DEPENDENCIES) $(EXTRA_check_mul5k_b_DEPENDENCIES) @rm -f check_mul5k_b$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5k_b_OBJECTS) $(check_mul5k_b_LDADD) $(LIBS) check_mul5k_c$(EXEEXT): $(check_mul5k_c_OBJECTS) $(check_mul5k_c_DEPENDENCIES) $(EXTRA_check_mul5k_c_DEPENDENCIES) @rm -f check_mul5k_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5k_c_OBJECTS) $(check_mul5k_c_LDADD) $(LIBS) check_mul5k_d$(EXEEXT): $(check_mul5k_d_OBJECTS) $(check_mul5k_d_DEPENDENCIES) $(EXTRA_check_mul5k_d_DEPENDENCIES) @rm -f check_mul5k_d$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul5k_d_OBJECTS) $(check_mul5k_d_LDADD) $(LIBS) check_mul6clk2$(EXEEXT): $(check_mul6clk2_OBJECTS) $(check_mul6clk2_DEPENDENCIES) $(EXTRA_check_mul6clk2_DEPENDENCIES) @rm -f check_mul6clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul6clk2_OBJECTS) $(check_mul6clk2_LDADD) $(LIBS) check_mul6k_a$(EXEEXT): $(check_mul6k_a_OBJECTS) $(check_mul6k_a_DEPENDENCIES) $(EXTRA_check_mul6k_a_DEPENDENCIES) @rm -f check_mul6k_a$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul6k_a_OBJECTS) $(check_mul6k_a_LDADD) $(LIBS) check_mul6k_b$(EXEEXT): $(check_mul6k_b_OBJECTS) $(check_mul6k_b_DEPENDENCIES) $(EXTRA_check_mul6k_b_DEPENDENCIES) @rm -f check_mul6k_b$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul6k_b_OBJECTS) $(check_mul6k_b_LDADD) $(LIBS) check_mul6k_c$(EXEEXT): $(check_mul6k_c_OBJECTS) $(check_mul6k_c_DEPENDENCIES) $(EXTRA_check_mul6k_c_DEPENDENCIES) @rm -f check_mul6k_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul6k_c_OBJECTS) $(check_mul6k_c_LDADD) $(LIBS) check_mul7cl$(EXEEXT): $(check_mul7cl_OBJECTS) $(check_mul7cl_DEPENDENCIES) $(EXTRA_check_mul7cl_DEPENDENCIES) @rm -f check_mul7cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul7cl_OBJECTS) $(check_mul7cl_LDADD) $(LIBS) check_mul7k$(EXEEXT): $(check_mul7k_OBJECTS) $(check_mul7k_DEPENDENCIES) $(EXTRA_check_mul7k_DEPENDENCIES) @rm -f check_mul7k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul7k_OBJECTS) $(check_mul7k_LDADD) $(LIBS) check_mul7k3$(EXEEXT): $(check_mul7k3_OBJECTS) $(check_mul7k3_DEPENDENCIES) $(EXTRA_check_mul7k3_DEPENDENCIES) @rm -f check_mul7k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul7k3_OBJECTS) $(check_mul7k3_LDADD) $(LIBS) check_mul8k$(EXEEXT): $(check_mul8k_OBJECTS) $(check_mul8k_DEPENDENCIES) $(EXTRA_check_mul8k_DEPENDENCIES) @rm -f check_mul8k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul8k_OBJECTS) $(check_mul8k_LDADD) $(LIBS) check_mul9cl$(EXEEXT): $(check_mul9cl_OBJECTS) $(check_mul9cl_DEPENDENCIES) $(EXTRA_check_mul9cl_DEPENDENCIES) @rm -f check_mul9cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul9cl_OBJECTS) $(check_mul9cl_LDADD) $(LIBS) check_mul9clk2$(EXEEXT): $(check_mul9clk2_OBJECTS) $(check_mul9clk2_DEPENDENCIES) $(EXTRA_check_mul9clk2_DEPENDENCIES) @rm -f check_mul9clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul9clk2_OBJECTS) $(check_mul9clk2_LDADD) $(LIBS) check_mul9k$(EXEEXT): $(check_mul9k_OBJECTS) $(check_mul9k_DEPENDENCIES) $(EXTRA_check_mul9k_DEPENDENCIES) @rm -f check_mul9k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul9k_OBJECTS) $(check_mul9k_LDADD) $(LIBS) check_mul9k2$(EXEEXT): $(check_mul9k2_OBJECTS) $(check_mul9k2_DEPENDENCIES) $(EXTRA_check_mul9k2_DEPENDENCIES) @rm -f check_mul9k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul9k2_OBJECTS) $(check_mul9k2_LDADD) $(LIBS) check_mul9k3$(EXEEXT): $(check_mul9k3_OBJECTS) $(check_mul9k3_DEPENDENCIES) $(EXTRA_check_mul9k3_DEPENDENCIES) @rm -f check_mul9k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul9k3_OBJECTS) $(check_mul9k3_LDADD) $(LIBS) modify-thresholds$(EXEEXT): $(modify_thresholds_OBJECTS) $(modify_thresholds_DEPENDENCIES) $(EXTRA_modify_thresholds_DEPENDENCIES) @rm -f modify-thresholds$(EXEEXT) $(AM_V_CCLD)$(LINK) $(modify_thresholds_OBJECTS) $(modify_thresholds_LDADD) $(LIBS) tune_gen_mul1_w32k2$(EXEEXT): $(tune_gen_mul1_w32k2_OBJECTS) $(tune_gen_mul1_w32k2_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w32k2_DEPENDENCIES) @rm -f tune_gen_mul1_w32k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w32k2_OBJECTS) $(tune_gen_mul1_w32k2_LDADD) $(LIBS) tune_gen_mul1_w32k3$(EXEEXT): $(tune_gen_mul1_w32k3_OBJECTS) $(tune_gen_mul1_w32k3_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w32k3_DEPENDENCIES) @rm -f tune_gen_mul1_w32k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w32k3_OBJECTS) $(tune_gen_mul1_w32k3_LDADD) $(LIBS) tune_gen_mul1_w32k4$(EXEEXT): $(tune_gen_mul1_w32k4_OBJECTS) $(tune_gen_mul1_w32k4_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w32k4_DEPENDENCIES) @rm -f tune_gen_mul1_w32k4$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w32k4_OBJECTS) $(tune_gen_mul1_w32k4_LDADD) $(LIBS) tune_gen_mul1_w32k5$(EXEEXT): $(tune_gen_mul1_w32k5_OBJECTS) $(tune_gen_mul1_w32k5_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w32k5_DEPENDENCIES) @rm -f tune_gen_mul1_w32k5$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w32k5_OBJECTS) $(tune_gen_mul1_w32k5_LDADD) $(LIBS) tune_gen_mul1_w32k6$(EXEEXT): $(tune_gen_mul1_w32k6_OBJECTS) $(tune_gen_mul1_w32k6_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w32k6_DEPENDENCIES) @rm -f tune_gen_mul1_w32k6$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w32k6_OBJECTS) $(tune_gen_mul1_w32k6_LDADD) $(LIBS) tune_gen_mul1_w64k2$(EXEEXT): $(tune_gen_mul1_w64k2_OBJECTS) $(tune_gen_mul1_w64k2_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w64k2_DEPENDENCIES) @rm -f tune_gen_mul1_w64k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w64k2_OBJECTS) $(tune_gen_mul1_w64k2_LDADD) $(LIBS) tune_gen_mul1_w64k3$(EXEEXT): $(tune_gen_mul1_w64k3_OBJECTS) $(tune_gen_mul1_w64k3_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w64k3_DEPENDENCIES) @rm -f tune_gen_mul1_w64k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w64k3_OBJECTS) $(tune_gen_mul1_w64k3_LDADD) $(LIBS) tune_gen_mul1_w64k4$(EXEEXT): $(tune_gen_mul1_w64k4_OBJECTS) $(tune_gen_mul1_w64k4_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w64k4_DEPENDENCIES) @rm -f tune_gen_mul1_w64k4$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w64k4_OBJECTS) $(tune_gen_mul1_w64k4_LDADD) $(LIBS) tune_gen_mul1_w64k5$(EXEEXT): $(tune_gen_mul1_w64k5_OBJECTS) $(tune_gen_mul1_w64k5_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w64k5_DEPENDENCIES) @rm -f tune_gen_mul1_w64k5$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w64k5_OBJECTS) $(tune_gen_mul1_w64k5_LDADD) $(LIBS) tune_gen_mul1_w64k6$(EXEEXT): $(tune_gen_mul1_w64k6_OBJECTS) $(tune_gen_mul1_w64k6_DEPENDENCIES) $(EXTRA_tune_gen_mul1_w64k6_DEPENDENCIES) @rm -f tune_gen_mul1_w64k6$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_gen_mul1_w64k6_OBJECTS) $(tune_gen_mul1_w64k6_LDADD) $(LIBS) ../lowlevel/$(am__dirstamp): @$(MKDIR_P) ../lowlevel @: > ../lowlevel/$(am__dirstamp) ../lowlevel/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ../lowlevel/$(DEPDIR) @: > ../lowlevel/$(DEPDIR)/$(am__dirstamp) ../lowlevel/tune_mul1cl-mul1cl.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul1cl$(EXEEXT): $(tune_mul1cl_OBJECTS) $(tune_mul1cl_DEPENDENCIES) $(EXTRA_tune_mul1cl_DEPENDENCIES) @rm -f tune_mul1cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul1cl_OBJECTS) $(tune_mul1cl_LDADD) $(LIBS) ../lowlevel/tune_mul2cl-mul2cl.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul2cl$(EXEEXT): $(tune_mul2cl_OBJECTS) $(tune_mul2cl_DEPENDENCIES) $(EXTRA_tune_mul2cl_DEPENDENCIES) @rm -f tune_mul2cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul2cl_OBJECTS) $(tune_mul2cl_LDADD) $(LIBS) ../lowlevel/tune_mul2cl2-mul2cl2.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul2cl2$(EXEEXT): $(tune_mul2cl2_OBJECTS) $(tune_mul2cl2_DEPENDENCIES) $(EXTRA_tune_mul2cl2_DEPENDENCIES) @rm -f tune_mul2cl2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul2cl2_OBJECTS) $(tune_mul2cl2_LDADD) $(LIBS) ../lowlevel/tune_mul2k-mul2k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul2k$(EXEEXT): $(tune_mul2k_OBJECTS) $(tune_mul2k_DEPENDENCIES) $(EXTRA_tune_mul2k_DEPENDENCIES) @rm -f tune_mul2k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul2k_OBJECTS) $(tune_mul2k_LDADD) $(LIBS) ../lowlevel/tune_mul2t-mul2t.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul2t$(EXEEXT): $(tune_mul2t_OBJECTS) $(tune_mul2t_DEPENDENCIES) $(EXTRA_tune_mul2t_DEPENDENCIES) @rm -f tune_mul2t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul2t_OBJECTS) $(tune_mul2t_LDADD) $(LIBS) ../lowlevel/tune_mul2t2-mul2t2.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul2t2$(EXEEXT): $(tune_mul2t2_OBJECTS) $(tune_mul2t2_DEPENDENCIES) $(EXTRA_tune_mul2t2_DEPENDENCIES) @rm -f tune_mul2t2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul2t2_OBJECTS) $(tune_mul2t2_LDADD) $(LIBS) ../lowlevel/tune_mul3cl-mul3cl.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul3cl$(EXEEXT): $(tune_mul3cl_OBJECTS) $(tune_mul3cl_DEPENDENCIES) $(EXTRA_tune_mul3cl_DEPENDENCIES) @rm -f tune_mul3cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul3cl_OBJECTS) $(tune_mul3cl_LDADD) $(LIBS) ../lowlevel/tune_mul3k-mul3k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul3k$(EXEEXT): $(tune_mul3k_OBJECTS) $(tune_mul3k_DEPENDENCIES) $(EXTRA_tune_mul3k_DEPENDENCIES) @rm -f tune_mul3k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul3k_OBJECTS) $(tune_mul3k_LDADD) $(LIBS) ../lowlevel/tune_mul3k2-mul3k2.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul3k2$(EXEEXT): $(tune_mul3k2_OBJECTS) $(tune_mul3k2_DEPENDENCIES) $(EXTRA_tune_mul3k2_DEPENDENCIES) @rm -f tune_mul3k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul3k2_OBJECTS) $(tune_mul3k2_LDADD) $(LIBS) ../lowlevel/tune_mul3t-mul3t.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul3t$(EXEEXT): $(tune_mul3t_OBJECTS) $(tune_mul3t_DEPENDENCIES) $(EXTRA_tune_mul3t_DEPENDENCIES) @rm -f tune_mul3t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul3t_OBJECTS) $(tune_mul3t_LDADD) $(LIBS) ../lowlevel/tune_mul4cl1-mul4cl1.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul4cl1$(EXEEXT): $(tune_mul4cl1_OBJECTS) $(tune_mul4cl1_DEPENDENCIES) $(EXTRA_tune_mul4cl1_DEPENDENCIES) @rm -f tune_mul4cl1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul4cl1_OBJECTS) $(tune_mul4cl1_LDADD) $(LIBS) ../lowlevel/tune_mul4clk-mul4clk.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul4clk$(EXEEXT): $(tune_mul4clk_OBJECTS) $(tune_mul4clk_DEPENDENCIES) $(EXTRA_tune_mul4clk_DEPENDENCIES) @rm -f tune_mul4clk$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul4clk_OBJECTS) $(tune_mul4clk_LDADD) $(LIBS) ../lowlevel/tune_mul4k-mul4k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul4k$(EXEEXT): $(tune_mul4k_OBJECTS) $(tune_mul4k_DEPENDENCIES) $(EXTRA_tune_mul4k_DEPENDENCIES) @rm -f tune_mul4k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul4k_OBJECTS) $(tune_mul4k_LDADD) $(LIBS) ../lowlevel/tune_mul4t-mul4t.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul4t$(EXEEXT): $(tune_mul4t_OBJECTS) $(tune_mul4t_DEPENDENCIES) $(EXTRA_tune_mul4t_DEPENDENCIES) @rm -f tune_mul4t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul4t_OBJECTS) $(tune_mul4t_LDADD) $(LIBS) ../lowlevel/tune_mul5clk2-mul5clk2.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5clk2$(EXEEXT): $(tune_mul5clk2_OBJECTS) $(tune_mul5clk2_DEPENDENCIES) $(EXTRA_tune_mul5clk2_DEPENDENCIES) @rm -f tune_mul5clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5clk2_OBJECTS) $(tune_mul5clk2_LDADD) $(LIBS) ../lowlevel/tune_mul5clk_c-mul5clk_c.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5clk_c$(EXEEXT): $(tune_mul5clk_c_OBJECTS) $(tune_mul5clk_c_DEPENDENCIES) $(EXTRA_tune_mul5clk_c_DEPENDENCIES) @rm -f tune_mul5clk_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5clk_c_OBJECTS) $(tune_mul5clk_c_LDADD) $(LIBS) ../lowlevel/tune_mul5k3-mul5k3.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5k3$(EXEEXT): $(tune_mul5k3_OBJECTS) $(tune_mul5k3_DEPENDENCIES) $(EXTRA_tune_mul5k3_DEPENDENCIES) @rm -f tune_mul5k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5k3_OBJECTS) $(tune_mul5k3_LDADD) $(LIBS) ../lowlevel/tune_mul5k_a-mul5k_a.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5k_a$(EXEEXT): $(tune_mul5k_a_OBJECTS) $(tune_mul5k_a_DEPENDENCIES) $(EXTRA_tune_mul5k_a_DEPENDENCIES) @rm -f tune_mul5k_a$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5k_a_OBJECTS) $(tune_mul5k_a_LDADD) $(LIBS) ../lowlevel/tune_mul5k_b-mul5k_b.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5k_b$(EXEEXT): $(tune_mul5k_b_OBJECTS) $(tune_mul5k_b_DEPENDENCIES) $(EXTRA_tune_mul5k_b_DEPENDENCIES) @rm -f tune_mul5k_b$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5k_b_OBJECTS) $(tune_mul5k_b_LDADD) $(LIBS) ../lowlevel/tune_mul5k_c-mul5k_c.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5k_c$(EXEEXT): $(tune_mul5k_c_OBJECTS) $(tune_mul5k_c_DEPENDENCIES) $(EXTRA_tune_mul5k_c_DEPENDENCIES) @rm -f tune_mul5k_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5k_c_OBJECTS) $(tune_mul5k_c_LDADD) $(LIBS) ../lowlevel/tune_mul5k_d-mul5k_d.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul5k_d$(EXEEXT): $(tune_mul5k_d_OBJECTS) $(tune_mul5k_d_DEPENDENCIES) $(EXTRA_tune_mul5k_d_DEPENDENCIES) @rm -f tune_mul5k_d$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul5k_d_OBJECTS) $(tune_mul5k_d_LDADD) $(LIBS) ../lowlevel/tune_mul6clk2-mul6clk2.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul6clk2$(EXEEXT): $(tune_mul6clk2_OBJECTS) $(tune_mul6clk2_DEPENDENCIES) $(EXTRA_tune_mul6clk2_DEPENDENCIES) @rm -f tune_mul6clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul6clk2_OBJECTS) $(tune_mul6clk2_LDADD) $(LIBS) ../lowlevel/tune_mul6k_a-mul6k_a.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul6k_a$(EXEEXT): $(tune_mul6k_a_OBJECTS) $(tune_mul6k_a_DEPENDENCIES) $(EXTRA_tune_mul6k_a_DEPENDENCIES) @rm -f tune_mul6k_a$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul6k_a_OBJECTS) $(tune_mul6k_a_LDADD) $(LIBS) ../lowlevel/tune_mul6k_b-mul6k_b.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul6k_b$(EXEEXT): $(tune_mul6k_b_OBJECTS) $(tune_mul6k_b_DEPENDENCIES) $(EXTRA_tune_mul6k_b_DEPENDENCIES) @rm -f tune_mul6k_b$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul6k_b_OBJECTS) $(tune_mul6k_b_LDADD) $(LIBS) ../lowlevel/tune_mul6k_c-mul6k_c.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul6k_c$(EXEEXT): $(tune_mul6k_c_OBJECTS) $(tune_mul6k_c_DEPENDENCIES) $(EXTRA_tune_mul6k_c_DEPENDENCIES) @rm -f tune_mul6k_c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul6k_c_OBJECTS) $(tune_mul6k_c_LDADD) $(LIBS) ../lowlevel/tune_mul7cl-mul7cl.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul7cl$(EXEEXT): $(tune_mul7cl_OBJECTS) $(tune_mul7cl_DEPENDENCIES) $(EXTRA_tune_mul7cl_DEPENDENCIES) @rm -f tune_mul7cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul7cl_OBJECTS) $(tune_mul7cl_LDADD) $(LIBS) ../lowlevel/tune_mul7k-mul7k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul7k$(EXEEXT): $(tune_mul7k_OBJECTS) $(tune_mul7k_DEPENDENCIES) $(EXTRA_tune_mul7k_DEPENDENCIES) @rm -f tune_mul7k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul7k_OBJECTS) $(tune_mul7k_LDADD) $(LIBS) ../lowlevel/tune_mul7k3-mul7k3.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul7k3$(EXEEXT): $(tune_mul7k3_OBJECTS) $(tune_mul7k3_DEPENDENCIES) $(EXTRA_tune_mul7k3_DEPENDENCIES) @rm -f tune_mul7k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul7k3_OBJECTS) $(tune_mul7k3_LDADD) $(LIBS) ../lowlevel/tune_mul8k-mul8k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul8k$(EXEEXT): $(tune_mul8k_OBJECTS) $(tune_mul8k_DEPENDENCIES) $(EXTRA_tune_mul8k_DEPENDENCIES) @rm -f tune_mul8k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul8k_OBJECTS) $(tune_mul8k_LDADD) $(LIBS) ../lowlevel/tune_mul9cl-mul9cl.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul9cl$(EXEEXT): $(tune_mul9cl_OBJECTS) $(tune_mul9cl_DEPENDENCIES) $(EXTRA_tune_mul9cl_DEPENDENCIES) @rm -f tune_mul9cl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul9cl_OBJECTS) $(tune_mul9cl_LDADD) $(LIBS) ../lowlevel/tune_mul9clk2-mul9clk2.$(OBJEXT): \ ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul9clk2$(EXEEXT): $(tune_mul9clk2_OBJECTS) $(tune_mul9clk2_DEPENDENCIES) $(EXTRA_tune_mul9clk2_DEPENDENCIES) @rm -f tune_mul9clk2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul9clk2_OBJECTS) $(tune_mul9clk2_LDADD) $(LIBS) ../lowlevel/tune_mul9k-mul9k.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul9k$(EXEEXT): $(tune_mul9k_OBJECTS) $(tune_mul9k_DEPENDENCIES) $(EXTRA_tune_mul9k_DEPENDENCIES) @rm -f tune_mul9k$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul9k_OBJECTS) $(tune_mul9k_LDADD) $(LIBS) ../lowlevel/tune_mul9k2-mul9k2.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul9k2$(EXEEXT): $(tune_mul9k2_OBJECTS) $(tune_mul9k2_DEPENDENCIES) $(EXTRA_tune_mul9k2_DEPENDENCIES) @rm -f tune_mul9k2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul9k2_OBJECTS) $(tune_mul9k2_LDADD) $(LIBS) ../lowlevel/tune_mul9k3-mul9k3.$(OBJEXT): ../lowlevel/$(am__dirstamp) \ ../lowlevel/$(DEPDIR)/$(am__dirstamp) tune_mul9k3$(EXEEXT): $(tune_mul9k3_OBJECTS) $(tune_mul9k3_DEPENDENCIES) $(EXTRA_tune_mul9k3_DEPENDENCIES) @rm -f tune_mul9k3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tune_mul9k3_OBJECTS) $(tune_mul9k3_LDADD) $(LIBS) tunefft$(EXEEXT): $(tunefft_OBJECTS) $(tunefft_DEPENDENCIES) $(EXTRA_tunefft_DEPENDENCIES) @rm -f tunefft$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tunefft_OBJECTS) $(tunefft_LDADD) $(LIBS) tunetoom$(EXEEXT): $(tunetoom_OBJECTS) $(tunetoom_DEPENDENCIES) $(EXTRA_tunetoom_DEPENDENCIES) @rm -f tunetoom$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tunetoom_OBJECTS) $(tunetoom_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ../lowlevel/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul1cl-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul2cl-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul2cl2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul2k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul2t-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul2t2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul3cl-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul3k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul3k2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul3t-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul4cl1-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul4clk-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul4k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul4t-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5clk2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5clk_c-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5k3-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5k_a-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5k_b-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5k_c-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul5k_d-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul6clk2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul6k_a-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul6k_b-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul6k_c-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul7cl-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul7k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul7k3-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul8k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul9cl-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul9clk2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul9k-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul9k2-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mul9k3-check_small_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s1_la-tuneup_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s2_la-tuneup_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s3_la-tuneup_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s4_la-tuneup_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s5_la-tuneup_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s6_la-tuneup_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s7_la-tuneup_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s8_la-tuneup_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtuneup_s9_la-tuneup_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modify-thresholds.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunefft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunetoom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuning-common.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libtuneup_s1_la-tuneup_1.lo: tuneup_1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s1_la-tuneup_1.lo -MD -MP -MF $(DEPDIR)/libtuneup_s1_la-tuneup_1.Tpo -c -o libtuneup_s1_la-tuneup_1.lo `test -f 'tuneup_1.c' || echo '$(srcdir)/'`tuneup_1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s1_la-tuneup_1.Tpo $(DEPDIR)/libtuneup_s1_la-tuneup_1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_1.c' object='libtuneup_s1_la-tuneup_1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s1_la-tuneup_1.lo `test -f 'tuneup_1.c' || echo '$(srcdir)/'`tuneup_1.c libtuneup_s2_la-tuneup_2.lo: tuneup_2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s2_la-tuneup_2.lo -MD -MP -MF $(DEPDIR)/libtuneup_s2_la-tuneup_2.Tpo -c -o libtuneup_s2_la-tuneup_2.lo `test -f 'tuneup_2.c' || echo '$(srcdir)/'`tuneup_2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s2_la-tuneup_2.Tpo $(DEPDIR)/libtuneup_s2_la-tuneup_2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_2.c' object='libtuneup_s2_la-tuneup_2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s2_la-tuneup_2.lo `test -f 'tuneup_2.c' || echo '$(srcdir)/'`tuneup_2.c libtuneup_s3_la-tuneup_3.lo: tuneup_3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s3_la-tuneup_3.lo -MD -MP -MF $(DEPDIR)/libtuneup_s3_la-tuneup_3.Tpo -c -o libtuneup_s3_la-tuneup_3.lo `test -f 'tuneup_3.c' || echo '$(srcdir)/'`tuneup_3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s3_la-tuneup_3.Tpo $(DEPDIR)/libtuneup_s3_la-tuneup_3.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_3.c' object='libtuneup_s3_la-tuneup_3.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s3_la-tuneup_3.lo `test -f 'tuneup_3.c' || echo '$(srcdir)/'`tuneup_3.c libtuneup_s4_la-tuneup_4.lo: tuneup_4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s4_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s4_la-tuneup_4.lo -MD -MP -MF $(DEPDIR)/libtuneup_s4_la-tuneup_4.Tpo -c -o libtuneup_s4_la-tuneup_4.lo `test -f 'tuneup_4.c' || echo '$(srcdir)/'`tuneup_4.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s4_la-tuneup_4.Tpo $(DEPDIR)/libtuneup_s4_la-tuneup_4.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_4.c' object='libtuneup_s4_la-tuneup_4.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s4_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s4_la-tuneup_4.lo `test -f 'tuneup_4.c' || echo '$(srcdir)/'`tuneup_4.c libtuneup_s5_la-tuneup_5.lo: tuneup_5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s5_la-tuneup_5.lo -MD -MP -MF $(DEPDIR)/libtuneup_s5_la-tuneup_5.Tpo -c -o libtuneup_s5_la-tuneup_5.lo `test -f 'tuneup_5.c' || echo '$(srcdir)/'`tuneup_5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s5_la-tuneup_5.Tpo $(DEPDIR)/libtuneup_s5_la-tuneup_5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_5.c' object='libtuneup_s5_la-tuneup_5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s5_la-tuneup_5.lo `test -f 'tuneup_5.c' || echo '$(srcdir)/'`tuneup_5.c libtuneup_s6_la-tuneup_6.lo: tuneup_6.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s6_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s6_la-tuneup_6.lo -MD -MP -MF $(DEPDIR)/libtuneup_s6_la-tuneup_6.Tpo -c -o libtuneup_s6_la-tuneup_6.lo `test -f 'tuneup_6.c' || echo '$(srcdir)/'`tuneup_6.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s6_la-tuneup_6.Tpo $(DEPDIR)/libtuneup_s6_la-tuneup_6.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_6.c' object='libtuneup_s6_la-tuneup_6.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s6_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s6_la-tuneup_6.lo `test -f 'tuneup_6.c' || echo '$(srcdir)/'`tuneup_6.c libtuneup_s7_la-tuneup_7.lo: tuneup_7.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s7_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s7_la-tuneup_7.lo -MD -MP -MF $(DEPDIR)/libtuneup_s7_la-tuneup_7.Tpo -c -o libtuneup_s7_la-tuneup_7.lo `test -f 'tuneup_7.c' || echo '$(srcdir)/'`tuneup_7.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s7_la-tuneup_7.Tpo $(DEPDIR)/libtuneup_s7_la-tuneup_7.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_7.c' object='libtuneup_s7_la-tuneup_7.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s7_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s7_la-tuneup_7.lo `test -f 'tuneup_7.c' || echo '$(srcdir)/'`tuneup_7.c libtuneup_s8_la-tuneup_8.lo: tuneup_8.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s8_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s8_la-tuneup_8.lo -MD -MP -MF $(DEPDIR)/libtuneup_s8_la-tuneup_8.Tpo -c -o libtuneup_s8_la-tuneup_8.lo `test -f 'tuneup_8.c' || echo '$(srcdir)/'`tuneup_8.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s8_la-tuneup_8.Tpo $(DEPDIR)/libtuneup_s8_la-tuneup_8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_8.c' object='libtuneup_s8_la-tuneup_8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s8_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s8_la-tuneup_8.lo `test -f 'tuneup_8.c' || echo '$(srcdir)/'`tuneup_8.c libtuneup_s9_la-tuneup_9.lo: tuneup_9.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s9_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtuneup_s9_la-tuneup_9.lo -MD -MP -MF $(DEPDIR)/libtuneup_s9_la-tuneup_9.Tpo -c -o libtuneup_s9_la-tuneup_9.lo `test -f 'tuneup_9.c' || echo '$(srcdir)/'`tuneup_9.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtuneup_s9_la-tuneup_9.Tpo $(DEPDIR)/libtuneup_s9_la-tuneup_9.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tuneup_9.c' object='libtuneup_s9_la-tuneup_9.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtuneup_s9_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtuneup_s9_la-tuneup_9.lo `test -f 'tuneup_9.c' || echo '$(srcdir)/'`tuneup_9.c check_mul1cl-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul1cl-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul1cl-check_small_size.Tpo -c -o check_mul1cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul1cl-check_small_size.Tpo $(DEPDIR)/check_mul1cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul1cl-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul1cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul1cl-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul1cl-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul1cl-check_small_size.Tpo -c -o check_mul1cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul1cl-check_small_size.Tpo $(DEPDIR)/check_mul1cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul1cl-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul1cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul2cl-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2cl-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul2cl-check_small_size.Tpo -c -o check_mul2cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2cl-check_small_size.Tpo $(DEPDIR)/check_mul2cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2cl-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul2cl-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2cl-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul2cl-check_small_size.Tpo -c -o check_mul2cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2cl-check_small_size.Tpo $(DEPDIR)/check_mul2cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2cl-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul2cl2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2cl2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul2cl2-check_small_size.Tpo -c -o check_mul2cl2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2cl2-check_small_size.Tpo $(DEPDIR)/check_mul2cl2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2cl2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2cl2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul2cl2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2cl2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul2cl2-check_small_size.Tpo -c -o check_mul2cl2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2cl2-check_small_size.Tpo $(DEPDIR)/check_mul2cl2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2cl2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2cl2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul2k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul2k-check_small_size.Tpo -c -o check_mul2k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2k-check_small_size.Tpo $(DEPDIR)/check_mul2k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul2k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul2k-check_small_size.Tpo -c -o check_mul2k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2k-check_small_size.Tpo $(DEPDIR)/check_mul2k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul2t-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2t-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul2t-check_small_size.Tpo -c -o check_mul2t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2t-check_small_size.Tpo $(DEPDIR)/check_mul2t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2t-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul2t-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2t-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul2t-check_small_size.Tpo -c -o check_mul2t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2t-check_small_size.Tpo $(DEPDIR)/check_mul2t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2t-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul2t2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2t2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul2t2-check_small_size.Tpo -c -o check_mul2t2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2t2-check_small_size.Tpo $(DEPDIR)/check_mul2t2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2t2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2t2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul2t2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul2t2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul2t2-check_small_size.Tpo -c -o check_mul2t2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul2t2-check_small_size.Tpo $(DEPDIR)/check_mul2t2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul2t2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul2t2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul3cl-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3cl-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul3cl-check_small_size.Tpo -c -o check_mul3cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3cl-check_small_size.Tpo $(DEPDIR)/check_mul3cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3cl-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul3cl-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3cl-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul3cl-check_small_size.Tpo -c -o check_mul3cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3cl-check_small_size.Tpo $(DEPDIR)/check_mul3cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3cl-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul3k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul3k-check_small_size.Tpo -c -o check_mul3k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3k-check_small_size.Tpo $(DEPDIR)/check_mul3k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul3k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul3k-check_small_size.Tpo -c -o check_mul3k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3k-check_small_size.Tpo $(DEPDIR)/check_mul3k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul3k2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3k2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul3k2-check_small_size.Tpo -c -o check_mul3k2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3k2-check_small_size.Tpo $(DEPDIR)/check_mul3k2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3k2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3k2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul3k2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3k2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul3k2-check_small_size.Tpo -c -o check_mul3k2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3k2-check_small_size.Tpo $(DEPDIR)/check_mul3k2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3k2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3k2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul3t-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3t-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul3t-check_small_size.Tpo -c -o check_mul3t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3t-check_small_size.Tpo $(DEPDIR)/check_mul3t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3t-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul3t-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul3t-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul3t-check_small_size.Tpo -c -o check_mul3t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul3t-check_small_size.Tpo $(DEPDIR)/check_mul3t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul3t-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul3t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul4cl1-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4cl1-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul4cl1-check_small_size.Tpo -c -o check_mul4cl1-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4cl1-check_small_size.Tpo $(DEPDIR)/check_mul4cl1-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4cl1-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4cl1-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul4cl1-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4cl1-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul4cl1-check_small_size.Tpo -c -o check_mul4cl1-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4cl1-check_small_size.Tpo $(DEPDIR)/check_mul4cl1-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4cl1-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4cl1-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul4clk-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4clk-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul4clk-check_small_size.Tpo -c -o check_mul4clk-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4clk-check_small_size.Tpo $(DEPDIR)/check_mul4clk-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4clk-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4clk-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul4clk-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4clk-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul4clk-check_small_size.Tpo -c -o check_mul4clk-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4clk-check_small_size.Tpo $(DEPDIR)/check_mul4clk-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4clk-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4clk-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul4k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul4k-check_small_size.Tpo -c -o check_mul4k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4k-check_small_size.Tpo $(DEPDIR)/check_mul4k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul4k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul4k-check_small_size.Tpo -c -o check_mul4k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4k-check_small_size.Tpo $(DEPDIR)/check_mul4k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul4t-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4t-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul4t-check_small_size.Tpo -c -o check_mul4t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4t-check_small_size.Tpo $(DEPDIR)/check_mul4t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4t-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4t-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul4t-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul4t-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul4t-check_small_size.Tpo -c -o check_mul4t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul4t-check_small_size.Tpo $(DEPDIR)/check_mul4t-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul4t-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul4t-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5clk2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5clk2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5clk2-check_small_size.Tpo -c -o check_mul5clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5clk2-check_small_size.Tpo $(DEPDIR)/check_mul5clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5clk2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5clk2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5clk2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5clk2-check_small_size.Tpo -c -o check_mul5clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5clk2-check_small_size.Tpo $(DEPDIR)/check_mul5clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5clk2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5clk_c-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5clk_c-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5clk_c-check_small_size.Tpo -c -o check_mul5clk_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5clk_c-check_small_size.Tpo $(DEPDIR)/check_mul5clk_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5clk_c-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5clk_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5clk_c-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5clk_c-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5clk_c-check_small_size.Tpo -c -o check_mul5clk_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5clk_c-check_small_size.Tpo $(DEPDIR)/check_mul5clk_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5clk_c-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5clk_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5k3-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k3-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5k3-check_small_size.Tpo -c -o check_mul5k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k3-check_small_size.Tpo $(DEPDIR)/check_mul5k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k3-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5k3-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k3-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5k3-check_small_size.Tpo -c -o check_mul5k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k3-check_small_size.Tpo $(DEPDIR)/check_mul5k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k3-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5k_a-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_a-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5k_a-check_small_size.Tpo -c -o check_mul5k_a-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_a-check_small_size.Tpo $(DEPDIR)/check_mul5k_a-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_a-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_a-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5k_a-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_a-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5k_a-check_small_size.Tpo -c -o check_mul5k_a-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_a-check_small_size.Tpo $(DEPDIR)/check_mul5k_a-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_a-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_a-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5k_b-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_b-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5k_b-check_small_size.Tpo -c -o check_mul5k_b-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_b-check_small_size.Tpo $(DEPDIR)/check_mul5k_b-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_b-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_b-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5k_b-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_b-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5k_b-check_small_size.Tpo -c -o check_mul5k_b-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_b-check_small_size.Tpo $(DEPDIR)/check_mul5k_b-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_b-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_b-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5k_c-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_c-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5k_c-check_small_size.Tpo -c -o check_mul5k_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_c-check_small_size.Tpo $(DEPDIR)/check_mul5k_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_c-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5k_c-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_c-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5k_c-check_small_size.Tpo -c -o check_mul5k_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_c-check_small_size.Tpo $(DEPDIR)/check_mul5k_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_c-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul5k_d-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_d-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul5k_d-check_small_size.Tpo -c -o check_mul5k_d-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_d-check_small_size.Tpo $(DEPDIR)/check_mul5k_d-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_d-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_d-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul5k_d-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul5k_d-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul5k_d-check_small_size.Tpo -c -o check_mul5k_d-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul5k_d-check_small_size.Tpo $(DEPDIR)/check_mul5k_d-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul5k_d-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul5k_d-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul6clk2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6clk2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul6clk2-check_small_size.Tpo -c -o check_mul6clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6clk2-check_small_size.Tpo $(DEPDIR)/check_mul6clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6clk2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul6clk2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6clk2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul6clk2-check_small_size.Tpo -c -o check_mul6clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6clk2-check_small_size.Tpo $(DEPDIR)/check_mul6clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6clk2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul6k_a-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_a-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul6k_a-check_small_size.Tpo -c -o check_mul6k_a-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_a-check_small_size.Tpo $(DEPDIR)/check_mul6k_a-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_a-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_a-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul6k_a-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_a-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul6k_a-check_small_size.Tpo -c -o check_mul6k_a-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_a-check_small_size.Tpo $(DEPDIR)/check_mul6k_a-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_a-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_a-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul6k_b-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_b-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul6k_b-check_small_size.Tpo -c -o check_mul6k_b-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_b-check_small_size.Tpo $(DEPDIR)/check_mul6k_b-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_b-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_b-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul6k_b-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_b-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul6k_b-check_small_size.Tpo -c -o check_mul6k_b-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_b-check_small_size.Tpo $(DEPDIR)/check_mul6k_b-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_b-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_b-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul6k_c-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_c-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul6k_c-check_small_size.Tpo -c -o check_mul6k_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_c-check_small_size.Tpo $(DEPDIR)/check_mul6k_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_c-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_c-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul6k_c-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul6k_c-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul6k_c-check_small_size.Tpo -c -o check_mul6k_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul6k_c-check_small_size.Tpo $(DEPDIR)/check_mul6k_c-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul6k_c-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul6k_c-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul7cl-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7cl-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul7cl-check_small_size.Tpo -c -o check_mul7cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7cl-check_small_size.Tpo $(DEPDIR)/check_mul7cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7cl-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul7cl-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7cl-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul7cl-check_small_size.Tpo -c -o check_mul7cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7cl-check_small_size.Tpo $(DEPDIR)/check_mul7cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7cl-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul7k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul7k-check_small_size.Tpo -c -o check_mul7k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7k-check_small_size.Tpo $(DEPDIR)/check_mul7k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul7k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul7k-check_small_size.Tpo -c -o check_mul7k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7k-check_small_size.Tpo $(DEPDIR)/check_mul7k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul7k3-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7k3-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul7k3-check_small_size.Tpo -c -o check_mul7k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7k3-check_small_size.Tpo $(DEPDIR)/check_mul7k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7k3-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul7k3-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul7k3-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul7k3-check_small_size.Tpo -c -o check_mul7k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul7k3-check_small_size.Tpo $(DEPDIR)/check_mul7k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul7k3-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul7k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul8k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul8k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul8k-check_small_size.Tpo -c -o check_mul8k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul8k-check_small_size.Tpo $(DEPDIR)/check_mul8k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul8k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul8k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul8k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul8k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul8k-check_small_size.Tpo -c -o check_mul8k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul8k-check_small_size.Tpo $(DEPDIR)/check_mul8k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul8k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul8k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul9cl-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9cl-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul9cl-check_small_size.Tpo -c -o check_mul9cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9cl-check_small_size.Tpo $(DEPDIR)/check_mul9cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9cl-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9cl-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul9cl-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9cl-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul9cl-check_small_size.Tpo -c -o check_mul9cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9cl-check_small_size.Tpo $(DEPDIR)/check_mul9cl-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9cl-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9cl-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul9clk2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9clk2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul9clk2-check_small_size.Tpo -c -o check_mul9clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9clk2-check_small_size.Tpo $(DEPDIR)/check_mul9clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9clk2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9clk2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul9clk2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9clk2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul9clk2-check_small_size.Tpo -c -o check_mul9clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9clk2-check_small_size.Tpo $(DEPDIR)/check_mul9clk2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9clk2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9clk2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul9k-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul9k-check_small_size.Tpo -c -o check_mul9k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k-check_small_size.Tpo $(DEPDIR)/check_mul9k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul9k-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul9k-check_small_size.Tpo -c -o check_mul9k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k-check_small_size.Tpo $(DEPDIR)/check_mul9k-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul9k2-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k2-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul9k2-check_small_size.Tpo -c -o check_mul9k2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k2-check_small_size.Tpo $(DEPDIR)/check_mul9k2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k2-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k2-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul9k2-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k2-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul9k2-check_small_size.Tpo -c -o check_mul9k2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k2-check_small_size.Tpo $(DEPDIR)/check_mul9k2-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k2-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k2-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` check_mul9k3-check_small_size.o: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k3-check_small_size.o -MD -MP -MF $(DEPDIR)/check_mul9k3-check_small_size.Tpo -c -o check_mul9k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k3-check_small_size.Tpo $(DEPDIR)/check_mul9k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k3-check_small_size.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k3-check_small_size.o `test -f 'check_small_size.c' || echo '$(srcdir)/'`check_small_size.c check_mul9k3-check_small_size.obj: check_small_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_mul9k3-check_small_size.obj -MD -MP -MF $(DEPDIR)/check_mul9k3-check_small_size.Tpo -c -o check_mul9k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_mul9k3-check_small_size.Tpo $(DEPDIR)/check_mul9k3-check_small_size.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_small_size.c' object='check_mul9k3-check_small_size.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_mul9k3-check_small_size.obj `if test -f 'check_small_size.c'; then $(CYGPATH_W) 'check_small_size.c'; else $(CYGPATH_W) '$(srcdir)/check_small_size.c'; fi` tune_gen_mul1_w32k2-gen_mul1_w32k2.o: gen_mul1_w32k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k2-gen_mul1_w32k2.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Tpo -c -o tune_gen_mul1_w32k2-gen_mul1_w32k2.o `test -f 'gen_mul1_w32k2.c' || echo '$(srcdir)/'`gen_mul1_w32k2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Tpo $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k2.c' object='tune_gen_mul1_w32k2-gen_mul1_w32k2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k2-gen_mul1_w32k2.o `test -f 'gen_mul1_w32k2.c' || echo '$(srcdir)/'`gen_mul1_w32k2.c tune_gen_mul1_w32k2-gen_mul1_w32k2.obj: gen_mul1_w32k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k2-gen_mul1_w32k2.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Tpo -c -o tune_gen_mul1_w32k2-gen_mul1_w32k2.obj `if test -f 'gen_mul1_w32k2.c'; then $(CYGPATH_W) 'gen_mul1_w32k2.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Tpo $(DEPDIR)/tune_gen_mul1_w32k2-gen_mul1_w32k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k2.c' object='tune_gen_mul1_w32k2-gen_mul1_w32k2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k2-gen_mul1_w32k2.obj `if test -f 'gen_mul1_w32k2.c'; then $(CYGPATH_W) 'gen_mul1_w32k2.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k2.c'; fi` tune_gen_mul1_w32k3-gen_mul1_w32k3.o: gen_mul1_w32k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k3-gen_mul1_w32k3.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Tpo -c -o tune_gen_mul1_w32k3-gen_mul1_w32k3.o `test -f 'gen_mul1_w32k3.c' || echo '$(srcdir)/'`gen_mul1_w32k3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Tpo $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k3.c' object='tune_gen_mul1_w32k3-gen_mul1_w32k3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k3-gen_mul1_w32k3.o `test -f 'gen_mul1_w32k3.c' || echo '$(srcdir)/'`gen_mul1_w32k3.c tune_gen_mul1_w32k3-gen_mul1_w32k3.obj: gen_mul1_w32k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k3-gen_mul1_w32k3.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Tpo -c -o tune_gen_mul1_w32k3-gen_mul1_w32k3.obj `if test -f 'gen_mul1_w32k3.c'; then $(CYGPATH_W) 'gen_mul1_w32k3.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Tpo $(DEPDIR)/tune_gen_mul1_w32k3-gen_mul1_w32k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k3.c' object='tune_gen_mul1_w32k3-gen_mul1_w32k3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k3-gen_mul1_w32k3.obj `if test -f 'gen_mul1_w32k3.c'; then $(CYGPATH_W) 'gen_mul1_w32k3.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k3.c'; fi` tune_gen_mul1_w32k4-gen_mul1_w32k4.o: gen_mul1_w32k4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k4-gen_mul1_w32k4.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Tpo -c -o tune_gen_mul1_w32k4-gen_mul1_w32k4.o `test -f 'gen_mul1_w32k4.c' || echo '$(srcdir)/'`gen_mul1_w32k4.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Tpo $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k4.c' object='tune_gen_mul1_w32k4-gen_mul1_w32k4.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k4-gen_mul1_w32k4.o `test -f 'gen_mul1_w32k4.c' || echo '$(srcdir)/'`gen_mul1_w32k4.c tune_gen_mul1_w32k4-gen_mul1_w32k4.obj: gen_mul1_w32k4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k4-gen_mul1_w32k4.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Tpo -c -o tune_gen_mul1_w32k4-gen_mul1_w32k4.obj `if test -f 'gen_mul1_w32k4.c'; then $(CYGPATH_W) 'gen_mul1_w32k4.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k4.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Tpo $(DEPDIR)/tune_gen_mul1_w32k4-gen_mul1_w32k4.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k4.c' object='tune_gen_mul1_w32k4-gen_mul1_w32k4.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k4-gen_mul1_w32k4.obj `if test -f 'gen_mul1_w32k4.c'; then $(CYGPATH_W) 'gen_mul1_w32k4.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k4.c'; fi` tune_gen_mul1_w32k5-gen_mul1_w32k5.o: gen_mul1_w32k5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k5-gen_mul1_w32k5.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Tpo -c -o tune_gen_mul1_w32k5-gen_mul1_w32k5.o `test -f 'gen_mul1_w32k5.c' || echo '$(srcdir)/'`gen_mul1_w32k5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Tpo $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k5.c' object='tune_gen_mul1_w32k5-gen_mul1_w32k5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k5-gen_mul1_w32k5.o `test -f 'gen_mul1_w32k5.c' || echo '$(srcdir)/'`gen_mul1_w32k5.c tune_gen_mul1_w32k5-gen_mul1_w32k5.obj: gen_mul1_w32k5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k5-gen_mul1_w32k5.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Tpo -c -o tune_gen_mul1_w32k5-gen_mul1_w32k5.obj `if test -f 'gen_mul1_w32k5.c'; then $(CYGPATH_W) 'gen_mul1_w32k5.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Tpo $(DEPDIR)/tune_gen_mul1_w32k5-gen_mul1_w32k5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k5.c' object='tune_gen_mul1_w32k5-gen_mul1_w32k5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k5-gen_mul1_w32k5.obj `if test -f 'gen_mul1_w32k5.c'; then $(CYGPATH_W) 'gen_mul1_w32k5.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k5.c'; fi` tune_gen_mul1_w32k6-gen_mul1_w32k6.o: gen_mul1_w32k6.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k6-gen_mul1_w32k6.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Tpo -c -o tune_gen_mul1_w32k6-gen_mul1_w32k6.o `test -f 'gen_mul1_w32k6.c' || echo '$(srcdir)/'`gen_mul1_w32k6.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Tpo $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k6.c' object='tune_gen_mul1_w32k6-gen_mul1_w32k6.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k6-gen_mul1_w32k6.o `test -f 'gen_mul1_w32k6.c' || echo '$(srcdir)/'`gen_mul1_w32k6.c tune_gen_mul1_w32k6-gen_mul1_w32k6.obj: gen_mul1_w32k6.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w32k6-gen_mul1_w32k6.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Tpo -c -o tune_gen_mul1_w32k6-gen_mul1_w32k6.obj `if test -f 'gen_mul1_w32k6.c'; then $(CYGPATH_W) 'gen_mul1_w32k6.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k6.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Tpo $(DEPDIR)/tune_gen_mul1_w32k6-gen_mul1_w32k6.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w32k6.c' object='tune_gen_mul1_w32k6-gen_mul1_w32k6.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w32k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w32k6-gen_mul1_w32k6.obj `if test -f 'gen_mul1_w32k6.c'; then $(CYGPATH_W) 'gen_mul1_w32k6.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w32k6.c'; fi` tune_gen_mul1_w64k2-gen_mul1_w64k2.o: gen_mul1_w64k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k2-gen_mul1_w64k2.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Tpo -c -o tune_gen_mul1_w64k2-gen_mul1_w64k2.o `test -f 'gen_mul1_w64k2.c' || echo '$(srcdir)/'`gen_mul1_w64k2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Tpo $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k2.c' object='tune_gen_mul1_w64k2-gen_mul1_w64k2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k2-gen_mul1_w64k2.o `test -f 'gen_mul1_w64k2.c' || echo '$(srcdir)/'`gen_mul1_w64k2.c tune_gen_mul1_w64k2-gen_mul1_w64k2.obj: gen_mul1_w64k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k2-gen_mul1_w64k2.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Tpo -c -o tune_gen_mul1_w64k2-gen_mul1_w64k2.obj `if test -f 'gen_mul1_w64k2.c'; then $(CYGPATH_W) 'gen_mul1_w64k2.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Tpo $(DEPDIR)/tune_gen_mul1_w64k2-gen_mul1_w64k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k2.c' object='tune_gen_mul1_w64k2-gen_mul1_w64k2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k2-gen_mul1_w64k2.obj `if test -f 'gen_mul1_w64k2.c'; then $(CYGPATH_W) 'gen_mul1_w64k2.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k2.c'; fi` tune_gen_mul1_w64k3-gen_mul1_w64k3.o: gen_mul1_w64k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k3-gen_mul1_w64k3.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Tpo -c -o tune_gen_mul1_w64k3-gen_mul1_w64k3.o `test -f 'gen_mul1_w64k3.c' || echo '$(srcdir)/'`gen_mul1_w64k3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Tpo $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k3.c' object='tune_gen_mul1_w64k3-gen_mul1_w64k3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k3-gen_mul1_w64k3.o `test -f 'gen_mul1_w64k3.c' || echo '$(srcdir)/'`gen_mul1_w64k3.c tune_gen_mul1_w64k3-gen_mul1_w64k3.obj: gen_mul1_w64k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k3-gen_mul1_w64k3.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Tpo -c -o tune_gen_mul1_w64k3-gen_mul1_w64k3.obj `if test -f 'gen_mul1_w64k3.c'; then $(CYGPATH_W) 'gen_mul1_w64k3.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Tpo $(DEPDIR)/tune_gen_mul1_w64k3-gen_mul1_w64k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k3.c' object='tune_gen_mul1_w64k3-gen_mul1_w64k3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k3-gen_mul1_w64k3.obj `if test -f 'gen_mul1_w64k3.c'; then $(CYGPATH_W) 'gen_mul1_w64k3.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k3.c'; fi` tune_gen_mul1_w64k4-gen_mul1_w64k4.o: gen_mul1_w64k4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k4-gen_mul1_w64k4.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Tpo -c -o tune_gen_mul1_w64k4-gen_mul1_w64k4.o `test -f 'gen_mul1_w64k4.c' || echo '$(srcdir)/'`gen_mul1_w64k4.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Tpo $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k4.c' object='tune_gen_mul1_w64k4-gen_mul1_w64k4.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k4-gen_mul1_w64k4.o `test -f 'gen_mul1_w64k4.c' || echo '$(srcdir)/'`gen_mul1_w64k4.c tune_gen_mul1_w64k4-gen_mul1_w64k4.obj: gen_mul1_w64k4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k4-gen_mul1_w64k4.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Tpo -c -o tune_gen_mul1_w64k4-gen_mul1_w64k4.obj `if test -f 'gen_mul1_w64k4.c'; then $(CYGPATH_W) 'gen_mul1_w64k4.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k4.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Tpo $(DEPDIR)/tune_gen_mul1_w64k4-gen_mul1_w64k4.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k4.c' object='tune_gen_mul1_w64k4-gen_mul1_w64k4.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k4-gen_mul1_w64k4.obj `if test -f 'gen_mul1_w64k4.c'; then $(CYGPATH_W) 'gen_mul1_w64k4.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k4.c'; fi` tune_gen_mul1_w64k5-gen_mul1_w64k5.o: gen_mul1_w64k5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k5-gen_mul1_w64k5.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Tpo -c -o tune_gen_mul1_w64k5-gen_mul1_w64k5.o `test -f 'gen_mul1_w64k5.c' || echo '$(srcdir)/'`gen_mul1_w64k5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Tpo $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k5.c' object='tune_gen_mul1_w64k5-gen_mul1_w64k5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k5-gen_mul1_w64k5.o `test -f 'gen_mul1_w64k5.c' || echo '$(srcdir)/'`gen_mul1_w64k5.c tune_gen_mul1_w64k5-gen_mul1_w64k5.obj: gen_mul1_w64k5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k5-gen_mul1_w64k5.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Tpo -c -o tune_gen_mul1_w64k5-gen_mul1_w64k5.obj `if test -f 'gen_mul1_w64k5.c'; then $(CYGPATH_W) 'gen_mul1_w64k5.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Tpo $(DEPDIR)/tune_gen_mul1_w64k5-gen_mul1_w64k5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k5.c' object='tune_gen_mul1_w64k5-gen_mul1_w64k5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k5_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k5-gen_mul1_w64k5.obj `if test -f 'gen_mul1_w64k5.c'; then $(CYGPATH_W) 'gen_mul1_w64k5.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k5.c'; fi` tune_gen_mul1_w64k6-gen_mul1_w64k6.o: gen_mul1_w64k6.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k6-gen_mul1_w64k6.o -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Tpo -c -o tune_gen_mul1_w64k6-gen_mul1_w64k6.o `test -f 'gen_mul1_w64k6.c' || echo '$(srcdir)/'`gen_mul1_w64k6.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Tpo $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k6.c' object='tune_gen_mul1_w64k6-gen_mul1_w64k6.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k6-gen_mul1_w64k6.o `test -f 'gen_mul1_w64k6.c' || echo '$(srcdir)/'`gen_mul1_w64k6.c tune_gen_mul1_w64k6-gen_mul1_w64k6.obj: gen_mul1_w64k6.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tune_gen_mul1_w64k6-gen_mul1_w64k6.obj -MD -MP -MF $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Tpo -c -o tune_gen_mul1_w64k6-gen_mul1_w64k6.obj `if test -f 'gen_mul1_w64k6.c'; then $(CYGPATH_W) 'gen_mul1_w64k6.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k6.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Tpo $(DEPDIR)/tune_gen_mul1_w64k6-gen_mul1_w64k6.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_mul1_w64k6.c' object='tune_gen_mul1_w64k6-gen_mul1_w64k6.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_gen_mul1_w64k6_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tune_gen_mul1_w64k6-gen_mul1_w64k6.obj `if test -f 'gen_mul1_w64k6.c'; then $(CYGPATH_W) 'gen_mul1_w64k6.c'; else $(CYGPATH_W) '$(srcdir)/gen_mul1_w64k6.c'; fi` ../lowlevel/tune_mul1cl-mul1cl.o: ../lowlevel/mul1cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul1cl-mul1cl.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Tpo -c -o ../lowlevel/tune_mul1cl-mul1cl.o `test -f '../lowlevel/mul1cl.c' || echo '$(srcdir)/'`../lowlevel/mul1cl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul1cl.c' object='../lowlevel/tune_mul1cl-mul1cl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul1cl-mul1cl.o `test -f '../lowlevel/mul1cl.c' || echo '$(srcdir)/'`../lowlevel/mul1cl.c ../lowlevel/tune_mul1cl-mul1cl.obj: ../lowlevel/mul1cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul1cl-mul1cl.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Tpo -c -o ../lowlevel/tune_mul1cl-mul1cl.obj `if test -f '../lowlevel/mul1cl.c'; then $(CYGPATH_W) '../lowlevel/mul1cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul1cl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul1cl-mul1cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul1cl.c' object='../lowlevel/tune_mul1cl-mul1cl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul1cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul1cl-mul1cl.obj `if test -f '../lowlevel/mul1cl.c'; then $(CYGPATH_W) '../lowlevel/mul1cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul1cl.c'; fi` ../lowlevel/tune_mul2cl-mul2cl.o: ../lowlevel/mul2cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2cl-mul2cl.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Tpo -c -o ../lowlevel/tune_mul2cl-mul2cl.o `test -f '../lowlevel/mul2cl.c' || echo '$(srcdir)/'`../lowlevel/mul2cl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2cl.c' object='../lowlevel/tune_mul2cl-mul2cl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2cl-mul2cl.o `test -f '../lowlevel/mul2cl.c' || echo '$(srcdir)/'`../lowlevel/mul2cl.c ../lowlevel/tune_mul2cl-mul2cl.obj: ../lowlevel/mul2cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2cl-mul2cl.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Tpo -c -o ../lowlevel/tune_mul2cl-mul2cl.obj `if test -f '../lowlevel/mul2cl.c'; then $(CYGPATH_W) '../lowlevel/mul2cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2cl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul2cl-mul2cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2cl.c' object='../lowlevel/tune_mul2cl-mul2cl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2cl-mul2cl.obj `if test -f '../lowlevel/mul2cl.c'; then $(CYGPATH_W) '../lowlevel/mul2cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2cl.c'; fi` ../lowlevel/tune_mul2cl2-mul2cl2.o: ../lowlevel/mul2cl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2cl2-mul2cl2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Tpo -c -o ../lowlevel/tune_mul2cl2-mul2cl2.o `test -f '../lowlevel/mul2cl2.c' || echo '$(srcdir)/'`../lowlevel/mul2cl2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Tpo ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2cl2.c' object='../lowlevel/tune_mul2cl2-mul2cl2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2cl2-mul2cl2.o `test -f '../lowlevel/mul2cl2.c' || echo '$(srcdir)/'`../lowlevel/mul2cl2.c ../lowlevel/tune_mul2cl2-mul2cl2.obj: ../lowlevel/mul2cl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2cl2-mul2cl2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Tpo -c -o ../lowlevel/tune_mul2cl2-mul2cl2.obj `if test -f '../lowlevel/mul2cl2.c'; then $(CYGPATH_W) '../lowlevel/mul2cl2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2cl2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Tpo ../lowlevel/$(DEPDIR)/tune_mul2cl2-mul2cl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2cl2.c' object='../lowlevel/tune_mul2cl2-mul2cl2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2cl2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2cl2-mul2cl2.obj `if test -f '../lowlevel/mul2cl2.c'; then $(CYGPATH_W) '../lowlevel/mul2cl2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2cl2.c'; fi` ../lowlevel/tune_mul2k-mul2k.o: ../lowlevel/mul2k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2k-mul2k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Tpo -c -o ../lowlevel/tune_mul2k-mul2k.o `test -f '../lowlevel/mul2k.c' || echo '$(srcdir)/'`../lowlevel/mul2k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Tpo ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2k.c' object='../lowlevel/tune_mul2k-mul2k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2k-mul2k.o `test -f '../lowlevel/mul2k.c' || echo '$(srcdir)/'`../lowlevel/mul2k.c ../lowlevel/tune_mul2k-mul2k.obj: ../lowlevel/mul2k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2k-mul2k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Tpo -c -o ../lowlevel/tune_mul2k-mul2k.obj `if test -f '../lowlevel/mul2k.c'; then $(CYGPATH_W) '../lowlevel/mul2k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Tpo ../lowlevel/$(DEPDIR)/tune_mul2k-mul2k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2k.c' object='../lowlevel/tune_mul2k-mul2k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2k-mul2k.obj `if test -f '../lowlevel/mul2k.c'; then $(CYGPATH_W) '../lowlevel/mul2k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2k.c'; fi` ../lowlevel/tune_mul2t-mul2t.o: ../lowlevel/mul2t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2t-mul2t.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Tpo -c -o ../lowlevel/tune_mul2t-mul2t.o `test -f '../lowlevel/mul2t.c' || echo '$(srcdir)/'`../lowlevel/mul2t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Tpo ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2t.c' object='../lowlevel/tune_mul2t-mul2t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2t-mul2t.o `test -f '../lowlevel/mul2t.c' || echo '$(srcdir)/'`../lowlevel/mul2t.c ../lowlevel/tune_mul2t-mul2t.obj: ../lowlevel/mul2t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2t-mul2t.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Tpo -c -o ../lowlevel/tune_mul2t-mul2t.obj `if test -f '../lowlevel/mul2t.c'; then $(CYGPATH_W) '../lowlevel/mul2t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Tpo ../lowlevel/$(DEPDIR)/tune_mul2t-mul2t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2t.c' object='../lowlevel/tune_mul2t-mul2t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2t-mul2t.obj `if test -f '../lowlevel/mul2t.c'; then $(CYGPATH_W) '../lowlevel/mul2t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2t.c'; fi` ../lowlevel/tune_mul2t2-mul2t2.o: ../lowlevel/mul2t2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2t2-mul2t2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Tpo -c -o ../lowlevel/tune_mul2t2-mul2t2.o `test -f '../lowlevel/mul2t2.c' || echo '$(srcdir)/'`../lowlevel/mul2t2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Tpo ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2t2.c' object='../lowlevel/tune_mul2t2-mul2t2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2t2-mul2t2.o `test -f '../lowlevel/mul2t2.c' || echo '$(srcdir)/'`../lowlevel/mul2t2.c ../lowlevel/tune_mul2t2-mul2t2.obj: ../lowlevel/mul2t2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul2t2-mul2t2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Tpo -c -o ../lowlevel/tune_mul2t2-mul2t2.obj `if test -f '../lowlevel/mul2t2.c'; then $(CYGPATH_W) '../lowlevel/mul2t2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2t2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Tpo ../lowlevel/$(DEPDIR)/tune_mul2t2-mul2t2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul2t2.c' object='../lowlevel/tune_mul2t2-mul2t2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul2t2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul2t2-mul2t2.obj `if test -f '../lowlevel/mul2t2.c'; then $(CYGPATH_W) '../lowlevel/mul2t2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul2t2.c'; fi` ../lowlevel/tune_mul3cl-mul3cl.o: ../lowlevel/mul3cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3cl-mul3cl.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Tpo -c -o ../lowlevel/tune_mul3cl-mul3cl.o `test -f '../lowlevel/mul3cl.c' || echo '$(srcdir)/'`../lowlevel/mul3cl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3cl.c' object='../lowlevel/tune_mul3cl-mul3cl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3cl-mul3cl.o `test -f '../lowlevel/mul3cl.c' || echo '$(srcdir)/'`../lowlevel/mul3cl.c ../lowlevel/tune_mul3cl-mul3cl.obj: ../lowlevel/mul3cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3cl-mul3cl.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Tpo -c -o ../lowlevel/tune_mul3cl-mul3cl.obj `if test -f '../lowlevel/mul3cl.c'; then $(CYGPATH_W) '../lowlevel/mul3cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3cl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul3cl-mul3cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3cl.c' object='../lowlevel/tune_mul3cl-mul3cl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3cl-mul3cl.obj `if test -f '../lowlevel/mul3cl.c'; then $(CYGPATH_W) '../lowlevel/mul3cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3cl.c'; fi` ../lowlevel/tune_mul3k-mul3k.o: ../lowlevel/mul3k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3k-mul3k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Tpo -c -o ../lowlevel/tune_mul3k-mul3k.o `test -f '../lowlevel/mul3k.c' || echo '$(srcdir)/'`../lowlevel/mul3k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Tpo ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3k.c' object='../lowlevel/tune_mul3k-mul3k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3k-mul3k.o `test -f '../lowlevel/mul3k.c' || echo '$(srcdir)/'`../lowlevel/mul3k.c ../lowlevel/tune_mul3k-mul3k.obj: ../lowlevel/mul3k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3k-mul3k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Tpo -c -o ../lowlevel/tune_mul3k-mul3k.obj `if test -f '../lowlevel/mul3k.c'; then $(CYGPATH_W) '../lowlevel/mul3k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Tpo ../lowlevel/$(DEPDIR)/tune_mul3k-mul3k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3k.c' object='../lowlevel/tune_mul3k-mul3k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3k-mul3k.obj `if test -f '../lowlevel/mul3k.c'; then $(CYGPATH_W) '../lowlevel/mul3k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3k.c'; fi` ../lowlevel/tune_mul3k2-mul3k2.o: ../lowlevel/mul3k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3k2-mul3k2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Tpo -c -o ../lowlevel/tune_mul3k2-mul3k2.o `test -f '../lowlevel/mul3k2.c' || echo '$(srcdir)/'`../lowlevel/mul3k2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Tpo ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3k2.c' object='../lowlevel/tune_mul3k2-mul3k2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3k2-mul3k2.o `test -f '../lowlevel/mul3k2.c' || echo '$(srcdir)/'`../lowlevel/mul3k2.c ../lowlevel/tune_mul3k2-mul3k2.obj: ../lowlevel/mul3k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3k2-mul3k2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Tpo -c -o ../lowlevel/tune_mul3k2-mul3k2.obj `if test -f '../lowlevel/mul3k2.c'; then $(CYGPATH_W) '../lowlevel/mul3k2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3k2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Tpo ../lowlevel/$(DEPDIR)/tune_mul3k2-mul3k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3k2.c' object='../lowlevel/tune_mul3k2-mul3k2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3k2-mul3k2.obj `if test -f '../lowlevel/mul3k2.c'; then $(CYGPATH_W) '../lowlevel/mul3k2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3k2.c'; fi` ../lowlevel/tune_mul3t-mul3t.o: ../lowlevel/mul3t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3t-mul3t.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Tpo -c -o ../lowlevel/tune_mul3t-mul3t.o `test -f '../lowlevel/mul3t.c' || echo '$(srcdir)/'`../lowlevel/mul3t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Tpo ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3t.c' object='../lowlevel/tune_mul3t-mul3t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3t-mul3t.o `test -f '../lowlevel/mul3t.c' || echo '$(srcdir)/'`../lowlevel/mul3t.c ../lowlevel/tune_mul3t-mul3t.obj: ../lowlevel/mul3t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul3t-mul3t.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Tpo -c -o ../lowlevel/tune_mul3t-mul3t.obj `if test -f '../lowlevel/mul3t.c'; then $(CYGPATH_W) '../lowlevel/mul3t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Tpo ../lowlevel/$(DEPDIR)/tune_mul3t-mul3t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul3t.c' object='../lowlevel/tune_mul3t-mul3t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul3t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul3t-mul3t.obj `if test -f '../lowlevel/mul3t.c'; then $(CYGPATH_W) '../lowlevel/mul3t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul3t.c'; fi` ../lowlevel/tune_mul4cl1-mul4cl1.o: ../lowlevel/mul4cl1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4cl1-mul4cl1.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Tpo -c -o ../lowlevel/tune_mul4cl1-mul4cl1.o `test -f '../lowlevel/mul4cl1.c' || echo '$(srcdir)/'`../lowlevel/mul4cl1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Tpo ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4cl1.c' object='../lowlevel/tune_mul4cl1-mul4cl1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4cl1-mul4cl1.o `test -f '../lowlevel/mul4cl1.c' || echo '$(srcdir)/'`../lowlevel/mul4cl1.c ../lowlevel/tune_mul4cl1-mul4cl1.obj: ../lowlevel/mul4cl1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4cl1-mul4cl1.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Tpo -c -o ../lowlevel/tune_mul4cl1-mul4cl1.obj `if test -f '../lowlevel/mul4cl1.c'; then $(CYGPATH_W) '../lowlevel/mul4cl1.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4cl1.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Tpo ../lowlevel/$(DEPDIR)/tune_mul4cl1-mul4cl1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4cl1.c' object='../lowlevel/tune_mul4cl1-mul4cl1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4cl1_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4cl1-mul4cl1.obj `if test -f '../lowlevel/mul4cl1.c'; then $(CYGPATH_W) '../lowlevel/mul4cl1.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4cl1.c'; fi` ../lowlevel/tune_mul4clk-mul4clk.o: ../lowlevel/mul4clk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4clk-mul4clk.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Tpo -c -o ../lowlevel/tune_mul4clk-mul4clk.o `test -f '../lowlevel/mul4clk.c' || echo '$(srcdir)/'`../lowlevel/mul4clk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Tpo ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4clk.c' object='../lowlevel/tune_mul4clk-mul4clk.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4clk-mul4clk.o `test -f '../lowlevel/mul4clk.c' || echo '$(srcdir)/'`../lowlevel/mul4clk.c ../lowlevel/tune_mul4clk-mul4clk.obj: ../lowlevel/mul4clk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4clk-mul4clk.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Tpo -c -o ../lowlevel/tune_mul4clk-mul4clk.obj `if test -f '../lowlevel/mul4clk.c'; then $(CYGPATH_W) '../lowlevel/mul4clk.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4clk.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Tpo ../lowlevel/$(DEPDIR)/tune_mul4clk-mul4clk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4clk.c' object='../lowlevel/tune_mul4clk-mul4clk.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4clk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4clk-mul4clk.obj `if test -f '../lowlevel/mul4clk.c'; then $(CYGPATH_W) '../lowlevel/mul4clk.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4clk.c'; fi` ../lowlevel/tune_mul4k-mul4k.o: ../lowlevel/mul4k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4k-mul4k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Tpo -c -o ../lowlevel/tune_mul4k-mul4k.o `test -f '../lowlevel/mul4k.c' || echo '$(srcdir)/'`../lowlevel/mul4k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Tpo ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4k.c' object='../lowlevel/tune_mul4k-mul4k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4k-mul4k.o `test -f '../lowlevel/mul4k.c' || echo '$(srcdir)/'`../lowlevel/mul4k.c ../lowlevel/tune_mul4k-mul4k.obj: ../lowlevel/mul4k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4k-mul4k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Tpo -c -o ../lowlevel/tune_mul4k-mul4k.obj `if test -f '../lowlevel/mul4k.c'; then $(CYGPATH_W) '../lowlevel/mul4k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Tpo ../lowlevel/$(DEPDIR)/tune_mul4k-mul4k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4k.c' object='../lowlevel/tune_mul4k-mul4k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4k-mul4k.obj `if test -f '../lowlevel/mul4k.c'; then $(CYGPATH_W) '../lowlevel/mul4k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4k.c'; fi` ../lowlevel/tune_mul4t-mul4t.o: ../lowlevel/mul4t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4t-mul4t.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Tpo -c -o ../lowlevel/tune_mul4t-mul4t.o `test -f '../lowlevel/mul4t.c' || echo '$(srcdir)/'`../lowlevel/mul4t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Tpo ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4t.c' object='../lowlevel/tune_mul4t-mul4t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4t-mul4t.o `test -f '../lowlevel/mul4t.c' || echo '$(srcdir)/'`../lowlevel/mul4t.c ../lowlevel/tune_mul4t-mul4t.obj: ../lowlevel/mul4t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul4t-mul4t.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Tpo -c -o ../lowlevel/tune_mul4t-mul4t.obj `if test -f '../lowlevel/mul4t.c'; then $(CYGPATH_W) '../lowlevel/mul4t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Tpo ../lowlevel/$(DEPDIR)/tune_mul4t-mul4t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul4t.c' object='../lowlevel/tune_mul4t-mul4t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul4t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul4t-mul4t.obj `if test -f '../lowlevel/mul4t.c'; then $(CYGPATH_W) '../lowlevel/mul4t.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul4t.c'; fi` ../lowlevel/tune_mul5clk2-mul5clk2.o: ../lowlevel/mul5clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5clk2-mul5clk2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Tpo -c -o ../lowlevel/tune_mul5clk2-mul5clk2.o `test -f '../lowlevel/mul5clk2.c' || echo '$(srcdir)/'`../lowlevel/mul5clk2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5clk2.c' object='../lowlevel/tune_mul5clk2-mul5clk2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5clk2-mul5clk2.o `test -f '../lowlevel/mul5clk2.c' || echo '$(srcdir)/'`../lowlevel/mul5clk2.c ../lowlevel/tune_mul5clk2-mul5clk2.obj: ../lowlevel/mul5clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5clk2-mul5clk2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Tpo -c -o ../lowlevel/tune_mul5clk2-mul5clk2.obj `if test -f '../lowlevel/mul5clk2.c'; then $(CYGPATH_W) '../lowlevel/mul5clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5clk2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul5clk2-mul5clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5clk2.c' object='../lowlevel/tune_mul5clk2-mul5clk2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5clk2-mul5clk2.obj `if test -f '../lowlevel/mul5clk2.c'; then $(CYGPATH_W) '../lowlevel/mul5clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5clk2.c'; fi` ../lowlevel/tune_mul5clk_c-mul5clk_c.o: ../lowlevel/mul5clk_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5clk_c-mul5clk_c.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Tpo -c -o ../lowlevel/tune_mul5clk_c-mul5clk_c.o `test -f '../lowlevel/mul5clk_c.c' || echo '$(srcdir)/'`../lowlevel/mul5clk_c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5clk_c.c' object='../lowlevel/tune_mul5clk_c-mul5clk_c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5clk_c-mul5clk_c.o `test -f '../lowlevel/mul5clk_c.c' || echo '$(srcdir)/'`../lowlevel/mul5clk_c.c ../lowlevel/tune_mul5clk_c-mul5clk_c.obj: ../lowlevel/mul5clk_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5clk_c-mul5clk_c.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Tpo -c -o ../lowlevel/tune_mul5clk_c-mul5clk_c.obj `if test -f '../lowlevel/mul5clk_c.c'; then $(CYGPATH_W) '../lowlevel/mul5clk_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5clk_c.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul5clk_c-mul5clk_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5clk_c.c' object='../lowlevel/tune_mul5clk_c-mul5clk_c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5clk_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5clk_c-mul5clk_c.obj `if test -f '../lowlevel/mul5clk_c.c'; then $(CYGPATH_W) '../lowlevel/mul5clk_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5clk_c.c'; fi` ../lowlevel/tune_mul5k3-mul5k3.o: ../lowlevel/mul5k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k3-mul5k3.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Tpo -c -o ../lowlevel/tune_mul5k3-mul5k3.o `test -f '../lowlevel/mul5k3.c' || echo '$(srcdir)/'`../lowlevel/mul5k3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k3.c' object='../lowlevel/tune_mul5k3-mul5k3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k3-mul5k3.o `test -f '../lowlevel/mul5k3.c' || echo '$(srcdir)/'`../lowlevel/mul5k3.c ../lowlevel/tune_mul5k3-mul5k3.obj: ../lowlevel/mul5k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k3-mul5k3.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Tpo -c -o ../lowlevel/tune_mul5k3-mul5k3.obj `if test -f '../lowlevel/mul5k3.c'; then $(CYGPATH_W) '../lowlevel/mul5k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k3-mul5k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k3.c' object='../lowlevel/tune_mul5k3-mul5k3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k3-mul5k3.obj `if test -f '../lowlevel/mul5k3.c'; then $(CYGPATH_W) '../lowlevel/mul5k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k3.c'; fi` ../lowlevel/tune_mul5k_a-mul5k_a.o: ../lowlevel/mul5k_a.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_a-mul5k_a.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Tpo -c -o ../lowlevel/tune_mul5k_a-mul5k_a.o `test -f '../lowlevel/mul5k_a.c' || echo '$(srcdir)/'`../lowlevel/mul5k_a.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_a.c' object='../lowlevel/tune_mul5k_a-mul5k_a.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_a-mul5k_a.o `test -f '../lowlevel/mul5k_a.c' || echo '$(srcdir)/'`../lowlevel/mul5k_a.c ../lowlevel/tune_mul5k_a-mul5k_a.obj: ../lowlevel/mul5k_a.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_a-mul5k_a.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Tpo -c -o ../lowlevel/tune_mul5k_a-mul5k_a.obj `if test -f '../lowlevel/mul5k_a.c'; then $(CYGPATH_W) '../lowlevel/mul5k_a.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_a.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_a-mul5k_a.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_a.c' object='../lowlevel/tune_mul5k_a-mul5k_a.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_a-mul5k_a.obj `if test -f '../lowlevel/mul5k_a.c'; then $(CYGPATH_W) '../lowlevel/mul5k_a.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_a.c'; fi` ../lowlevel/tune_mul5k_b-mul5k_b.o: ../lowlevel/mul5k_b.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_b-mul5k_b.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Tpo -c -o ../lowlevel/tune_mul5k_b-mul5k_b.o `test -f '../lowlevel/mul5k_b.c' || echo '$(srcdir)/'`../lowlevel/mul5k_b.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_b.c' object='../lowlevel/tune_mul5k_b-mul5k_b.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_b-mul5k_b.o `test -f '../lowlevel/mul5k_b.c' || echo '$(srcdir)/'`../lowlevel/mul5k_b.c ../lowlevel/tune_mul5k_b-mul5k_b.obj: ../lowlevel/mul5k_b.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_b-mul5k_b.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Tpo -c -o ../lowlevel/tune_mul5k_b-mul5k_b.obj `if test -f '../lowlevel/mul5k_b.c'; then $(CYGPATH_W) '../lowlevel/mul5k_b.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_b.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_b-mul5k_b.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_b.c' object='../lowlevel/tune_mul5k_b-mul5k_b.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_b-mul5k_b.obj `if test -f '../lowlevel/mul5k_b.c'; then $(CYGPATH_W) '../lowlevel/mul5k_b.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_b.c'; fi` ../lowlevel/tune_mul5k_c-mul5k_c.o: ../lowlevel/mul5k_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_c-mul5k_c.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Tpo -c -o ../lowlevel/tune_mul5k_c-mul5k_c.o `test -f '../lowlevel/mul5k_c.c' || echo '$(srcdir)/'`../lowlevel/mul5k_c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_c.c' object='../lowlevel/tune_mul5k_c-mul5k_c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_c-mul5k_c.o `test -f '../lowlevel/mul5k_c.c' || echo '$(srcdir)/'`../lowlevel/mul5k_c.c ../lowlevel/tune_mul5k_c-mul5k_c.obj: ../lowlevel/mul5k_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_c-mul5k_c.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Tpo -c -o ../lowlevel/tune_mul5k_c-mul5k_c.obj `if test -f '../lowlevel/mul5k_c.c'; then $(CYGPATH_W) '../lowlevel/mul5k_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_c.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_c-mul5k_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_c.c' object='../lowlevel/tune_mul5k_c-mul5k_c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_c-mul5k_c.obj `if test -f '../lowlevel/mul5k_c.c'; then $(CYGPATH_W) '../lowlevel/mul5k_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_c.c'; fi` ../lowlevel/tune_mul5k_d-mul5k_d.o: ../lowlevel/mul5k_d.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_d-mul5k_d.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Tpo -c -o ../lowlevel/tune_mul5k_d-mul5k_d.o `test -f '../lowlevel/mul5k_d.c' || echo '$(srcdir)/'`../lowlevel/mul5k_d.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_d.c' object='../lowlevel/tune_mul5k_d-mul5k_d.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_d-mul5k_d.o `test -f '../lowlevel/mul5k_d.c' || echo '$(srcdir)/'`../lowlevel/mul5k_d.c ../lowlevel/tune_mul5k_d-mul5k_d.obj: ../lowlevel/mul5k_d.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul5k_d-mul5k_d.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Tpo -c -o ../lowlevel/tune_mul5k_d-mul5k_d.obj `if test -f '../lowlevel/mul5k_d.c'; then $(CYGPATH_W) '../lowlevel/mul5k_d.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_d.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Tpo ../lowlevel/$(DEPDIR)/tune_mul5k_d-mul5k_d.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul5k_d.c' object='../lowlevel/tune_mul5k_d-mul5k_d.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul5k_d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul5k_d-mul5k_d.obj `if test -f '../lowlevel/mul5k_d.c'; then $(CYGPATH_W) '../lowlevel/mul5k_d.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul5k_d.c'; fi` ../lowlevel/tune_mul6clk2-mul6clk2.o: ../lowlevel/mul6clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6clk2-mul6clk2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Tpo -c -o ../lowlevel/tune_mul6clk2-mul6clk2.o `test -f '../lowlevel/mul6clk2.c' || echo '$(srcdir)/'`../lowlevel/mul6clk2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6clk2.c' object='../lowlevel/tune_mul6clk2-mul6clk2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6clk2-mul6clk2.o `test -f '../lowlevel/mul6clk2.c' || echo '$(srcdir)/'`../lowlevel/mul6clk2.c ../lowlevel/tune_mul6clk2-mul6clk2.obj: ../lowlevel/mul6clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6clk2-mul6clk2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Tpo -c -o ../lowlevel/tune_mul6clk2-mul6clk2.obj `if test -f '../lowlevel/mul6clk2.c'; then $(CYGPATH_W) '../lowlevel/mul6clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6clk2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul6clk2-mul6clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6clk2.c' object='../lowlevel/tune_mul6clk2-mul6clk2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6clk2-mul6clk2.obj `if test -f '../lowlevel/mul6clk2.c'; then $(CYGPATH_W) '../lowlevel/mul6clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6clk2.c'; fi` ../lowlevel/tune_mul6k_a-mul6k_a.o: ../lowlevel/mul6k_a.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_a-mul6k_a.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Tpo -c -o ../lowlevel/tune_mul6k_a-mul6k_a.o `test -f '../lowlevel/mul6k_a.c' || echo '$(srcdir)/'`../lowlevel/mul6k_a.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_a.c' object='../lowlevel/tune_mul6k_a-mul6k_a.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_a-mul6k_a.o `test -f '../lowlevel/mul6k_a.c' || echo '$(srcdir)/'`../lowlevel/mul6k_a.c ../lowlevel/tune_mul6k_a-mul6k_a.obj: ../lowlevel/mul6k_a.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_a-mul6k_a.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Tpo -c -o ../lowlevel/tune_mul6k_a-mul6k_a.obj `if test -f '../lowlevel/mul6k_a.c'; then $(CYGPATH_W) '../lowlevel/mul6k_a.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_a.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_a-mul6k_a.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_a.c' object='../lowlevel/tune_mul6k_a-mul6k_a.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_a-mul6k_a.obj `if test -f '../lowlevel/mul6k_a.c'; then $(CYGPATH_W) '../lowlevel/mul6k_a.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_a.c'; fi` ../lowlevel/tune_mul6k_b-mul6k_b.o: ../lowlevel/mul6k_b.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_b-mul6k_b.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Tpo -c -o ../lowlevel/tune_mul6k_b-mul6k_b.o `test -f '../lowlevel/mul6k_b.c' || echo '$(srcdir)/'`../lowlevel/mul6k_b.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_b.c' object='../lowlevel/tune_mul6k_b-mul6k_b.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_b-mul6k_b.o `test -f '../lowlevel/mul6k_b.c' || echo '$(srcdir)/'`../lowlevel/mul6k_b.c ../lowlevel/tune_mul6k_b-mul6k_b.obj: ../lowlevel/mul6k_b.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_b-mul6k_b.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Tpo -c -o ../lowlevel/tune_mul6k_b-mul6k_b.obj `if test -f '../lowlevel/mul6k_b.c'; then $(CYGPATH_W) '../lowlevel/mul6k_b.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_b.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_b-mul6k_b.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_b.c' object='../lowlevel/tune_mul6k_b-mul6k_b.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_b_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_b-mul6k_b.obj `if test -f '../lowlevel/mul6k_b.c'; then $(CYGPATH_W) '../lowlevel/mul6k_b.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_b.c'; fi` ../lowlevel/tune_mul6k_c-mul6k_c.o: ../lowlevel/mul6k_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_c-mul6k_c.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Tpo -c -o ../lowlevel/tune_mul6k_c-mul6k_c.o `test -f '../lowlevel/mul6k_c.c' || echo '$(srcdir)/'`../lowlevel/mul6k_c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_c.c' object='../lowlevel/tune_mul6k_c-mul6k_c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_c-mul6k_c.o `test -f '../lowlevel/mul6k_c.c' || echo '$(srcdir)/'`../lowlevel/mul6k_c.c ../lowlevel/tune_mul6k_c-mul6k_c.obj: ../lowlevel/mul6k_c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul6k_c-mul6k_c.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Tpo -c -o ../lowlevel/tune_mul6k_c-mul6k_c.obj `if test -f '../lowlevel/mul6k_c.c'; then $(CYGPATH_W) '../lowlevel/mul6k_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_c.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Tpo ../lowlevel/$(DEPDIR)/tune_mul6k_c-mul6k_c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul6k_c.c' object='../lowlevel/tune_mul6k_c-mul6k_c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul6k_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul6k_c-mul6k_c.obj `if test -f '../lowlevel/mul6k_c.c'; then $(CYGPATH_W) '../lowlevel/mul6k_c.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul6k_c.c'; fi` ../lowlevel/tune_mul7cl-mul7cl.o: ../lowlevel/mul7cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7cl-mul7cl.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Tpo -c -o ../lowlevel/tune_mul7cl-mul7cl.o `test -f '../lowlevel/mul7cl.c' || echo '$(srcdir)/'`../lowlevel/mul7cl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7cl.c' object='../lowlevel/tune_mul7cl-mul7cl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7cl-mul7cl.o `test -f '../lowlevel/mul7cl.c' || echo '$(srcdir)/'`../lowlevel/mul7cl.c ../lowlevel/tune_mul7cl-mul7cl.obj: ../lowlevel/mul7cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7cl-mul7cl.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Tpo -c -o ../lowlevel/tune_mul7cl-mul7cl.obj `if test -f '../lowlevel/mul7cl.c'; then $(CYGPATH_W) '../lowlevel/mul7cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7cl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul7cl-mul7cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7cl.c' object='../lowlevel/tune_mul7cl-mul7cl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7cl-mul7cl.obj `if test -f '../lowlevel/mul7cl.c'; then $(CYGPATH_W) '../lowlevel/mul7cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7cl.c'; fi` ../lowlevel/tune_mul7k-mul7k.o: ../lowlevel/mul7k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7k-mul7k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Tpo -c -o ../lowlevel/tune_mul7k-mul7k.o `test -f '../lowlevel/mul7k.c' || echo '$(srcdir)/'`../lowlevel/mul7k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Tpo ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7k.c' object='../lowlevel/tune_mul7k-mul7k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7k-mul7k.o `test -f '../lowlevel/mul7k.c' || echo '$(srcdir)/'`../lowlevel/mul7k.c ../lowlevel/tune_mul7k-mul7k.obj: ../lowlevel/mul7k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7k-mul7k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Tpo -c -o ../lowlevel/tune_mul7k-mul7k.obj `if test -f '../lowlevel/mul7k.c'; then $(CYGPATH_W) '../lowlevel/mul7k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Tpo ../lowlevel/$(DEPDIR)/tune_mul7k-mul7k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7k.c' object='../lowlevel/tune_mul7k-mul7k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7k-mul7k.obj `if test -f '../lowlevel/mul7k.c'; then $(CYGPATH_W) '../lowlevel/mul7k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7k.c'; fi` ../lowlevel/tune_mul7k3-mul7k3.o: ../lowlevel/mul7k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7k3-mul7k3.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Tpo -c -o ../lowlevel/tune_mul7k3-mul7k3.o `test -f '../lowlevel/mul7k3.c' || echo '$(srcdir)/'`../lowlevel/mul7k3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7k3.c' object='../lowlevel/tune_mul7k3-mul7k3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7k3-mul7k3.o `test -f '../lowlevel/mul7k3.c' || echo '$(srcdir)/'`../lowlevel/mul7k3.c ../lowlevel/tune_mul7k3-mul7k3.obj: ../lowlevel/mul7k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul7k3-mul7k3.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Tpo -c -o ../lowlevel/tune_mul7k3-mul7k3.obj `if test -f '../lowlevel/mul7k3.c'; then $(CYGPATH_W) '../lowlevel/mul7k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7k3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul7k3-mul7k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul7k3.c' object='../lowlevel/tune_mul7k3-mul7k3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul7k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul7k3-mul7k3.obj `if test -f '../lowlevel/mul7k3.c'; then $(CYGPATH_W) '../lowlevel/mul7k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul7k3.c'; fi` ../lowlevel/tune_mul8k-mul8k.o: ../lowlevel/mul8k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul8k-mul8k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Tpo -c -o ../lowlevel/tune_mul8k-mul8k.o `test -f '../lowlevel/mul8k.c' || echo '$(srcdir)/'`../lowlevel/mul8k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Tpo ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul8k.c' object='../lowlevel/tune_mul8k-mul8k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul8k-mul8k.o `test -f '../lowlevel/mul8k.c' || echo '$(srcdir)/'`../lowlevel/mul8k.c ../lowlevel/tune_mul8k-mul8k.obj: ../lowlevel/mul8k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul8k-mul8k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Tpo -c -o ../lowlevel/tune_mul8k-mul8k.obj `if test -f '../lowlevel/mul8k.c'; then $(CYGPATH_W) '../lowlevel/mul8k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul8k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Tpo ../lowlevel/$(DEPDIR)/tune_mul8k-mul8k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul8k.c' object='../lowlevel/tune_mul8k-mul8k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul8k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul8k-mul8k.obj `if test -f '../lowlevel/mul8k.c'; then $(CYGPATH_W) '../lowlevel/mul8k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul8k.c'; fi` ../lowlevel/tune_mul9cl-mul9cl.o: ../lowlevel/mul9cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9cl-mul9cl.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Tpo -c -o ../lowlevel/tune_mul9cl-mul9cl.o `test -f '../lowlevel/mul9cl.c' || echo '$(srcdir)/'`../lowlevel/mul9cl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9cl.c' object='../lowlevel/tune_mul9cl-mul9cl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9cl-mul9cl.o `test -f '../lowlevel/mul9cl.c' || echo '$(srcdir)/'`../lowlevel/mul9cl.c ../lowlevel/tune_mul9cl-mul9cl.obj: ../lowlevel/mul9cl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9cl-mul9cl.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Tpo -c -o ../lowlevel/tune_mul9cl-mul9cl.obj `if test -f '../lowlevel/mul9cl.c'; then $(CYGPATH_W) '../lowlevel/mul9cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9cl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Tpo ../lowlevel/$(DEPDIR)/tune_mul9cl-mul9cl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9cl.c' object='../lowlevel/tune_mul9cl-mul9cl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9cl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9cl-mul9cl.obj `if test -f '../lowlevel/mul9cl.c'; then $(CYGPATH_W) '../lowlevel/mul9cl.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9cl.c'; fi` ../lowlevel/tune_mul9clk2-mul9clk2.o: ../lowlevel/mul9clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9clk2-mul9clk2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Tpo -c -o ../lowlevel/tune_mul9clk2-mul9clk2.o `test -f '../lowlevel/mul9clk2.c' || echo '$(srcdir)/'`../lowlevel/mul9clk2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9clk2.c' object='../lowlevel/tune_mul9clk2-mul9clk2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9clk2-mul9clk2.o `test -f '../lowlevel/mul9clk2.c' || echo '$(srcdir)/'`../lowlevel/mul9clk2.c ../lowlevel/tune_mul9clk2-mul9clk2.obj: ../lowlevel/mul9clk2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9clk2-mul9clk2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Tpo -c -o ../lowlevel/tune_mul9clk2-mul9clk2.obj `if test -f '../lowlevel/mul9clk2.c'; then $(CYGPATH_W) '../lowlevel/mul9clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9clk2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Tpo ../lowlevel/$(DEPDIR)/tune_mul9clk2-mul9clk2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9clk2.c' object='../lowlevel/tune_mul9clk2-mul9clk2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9clk2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9clk2-mul9clk2.obj `if test -f '../lowlevel/mul9clk2.c'; then $(CYGPATH_W) '../lowlevel/mul9clk2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9clk2.c'; fi` ../lowlevel/tune_mul9k-mul9k.o: ../lowlevel/mul9k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k-mul9k.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Tpo -c -o ../lowlevel/tune_mul9k-mul9k.o `test -f '../lowlevel/mul9k.c' || echo '$(srcdir)/'`../lowlevel/mul9k.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k.c' object='../lowlevel/tune_mul9k-mul9k.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k-mul9k.o `test -f '../lowlevel/mul9k.c' || echo '$(srcdir)/'`../lowlevel/mul9k.c ../lowlevel/tune_mul9k-mul9k.obj: ../lowlevel/mul9k.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k-mul9k.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Tpo -c -o ../lowlevel/tune_mul9k-mul9k.obj `if test -f '../lowlevel/mul9k.c'; then $(CYGPATH_W) '../lowlevel/mul9k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k-mul9k.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k.c' object='../lowlevel/tune_mul9k-mul9k.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k-mul9k.obj `if test -f '../lowlevel/mul9k.c'; then $(CYGPATH_W) '../lowlevel/mul9k.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k.c'; fi` ../lowlevel/tune_mul9k2-mul9k2.o: ../lowlevel/mul9k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k2-mul9k2.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Tpo -c -o ../lowlevel/tune_mul9k2-mul9k2.o `test -f '../lowlevel/mul9k2.c' || echo '$(srcdir)/'`../lowlevel/mul9k2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k2.c' object='../lowlevel/tune_mul9k2-mul9k2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k2-mul9k2.o `test -f '../lowlevel/mul9k2.c' || echo '$(srcdir)/'`../lowlevel/mul9k2.c ../lowlevel/tune_mul9k2-mul9k2.obj: ../lowlevel/mul9k2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k2-mul9k2.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Tpo -c -o ../lowlevel/tune_mul9k2-mul9k2.obj `if test -f '../lowlevel/mul9k2.c'; then $(CYGPATH_W) '../lowlevel/mul9k2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k2-mul9k2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k2.c' object='../lowlevel/tune_mul9k2-mul9k2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k2-mul9k2.obj `if test -f '../lowlevel/mul9k2.c'; then $(CYGPATH_W) '../lowlevel/mul9k2.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k2.c'; fi` ../lowlevel/tune_mul9k3-mul9k3.o: ../lowlevel/mul9k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k3-mul9k3.o -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Tpo -c -o ../lowlevel/tune_mul9k3-mul9k3.o `test -f '../lowlevel/mul9k3.c' || echo '$(srcdir)/'`../lowlevel/mul9k3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k3.c' object='../lowlevel/tune_mul9k3-mul9k3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k3-mul9k3.o `test -f '../lowlevel/mul9k3.c' || echo '$(srcdir)/'`../lowlevel/mul9k3.c ../lowlevel/tune_mul9k3-mul9k3.obj: ../lowlevel/mul9k3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lowlevel/tune_mul9k3-mul9k3.obj -MD -MP -MF ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Tpo -c -o ../lowlevel/tune_mul9k3-mul9k3.obj `if test -f '../lowlevel/mul9k3.c'; then $(CYGPATH_W) '../lowlevel/mul9k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Tpo ../lowlevel/$(DEPDIR)/tune_mul9k3-mul9k3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lowlevel/mul9k3.c' object='../lowlevel/tune_mul9k3-mul9k3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tune_mul9k3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lowlevel/tune_mul9k3-mul9k3.obj `if test -f '../lowlevel/mul9k3.c'; then $(CYGPATH_W) '../lowlevel/mul9k3.c'; else $(CYGPATH_W) '$(srcdir)/../lowlevel/mul9k3.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? check_mul2k.log: check_mul2k$(EXEEXT) @p='check_mul2k$(EXEEXT)'; \ b='check_mul2k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul3k.log: check_mul3k$(EXEEXT) @p='check_mul3k$(EXEEXT)'; \ b='check_mul3k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul3k2.log: check_mul3k2$(EXEEXT) @p='check_mul3k2$(EXEEXT)'; \ b='check_mul3k2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul4k.log: check_mul4k$(EXEEXT) @p='check_mul4k$(EXEEXT)'; \ b='check_mul4k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5k_a.log: check_mul5k_a$(EXEEXT) @p='check_mul5k_a$(EXEEXT)'; \ b='check_mul5k_a'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5k_b.log: check_mul5k_b$(EXEEXT) @p='check_mul5k_b$(EXEEXT)'; \ b='check_mul5k_b'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5k_c.log: check_mul5k_c$(EXEEXT) @p='check_mul5k_c$(EXEEXT)'; \ b='check_mul5k_c'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5k_d.log: check_mul5k_d$(EXEEXT) @p='check_mul5k_d$(EXEEXT)'; \ b='check_mul5k_d'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul6k_a.log: check_mul6k_a$(EXEEXT) @p='check_mul6k_a$(EXEEXT)'; \ b='check_mul6k_a'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul6k_b.log: check_mul6k_b$(EXEEXT) @p='check_mul6k_b$(EXEEXT)'; \ b='check_mul6k_b'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul6k_c.log: check_mul6k_c$(EXEEXT) @p='check_mul6k_c$(EXEEXT)'; \ b='check_mul6k_c'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul7k.log: check_mul7k$(EXEEXT) @p='check_mul7k$(EXEEXT)'; \ b='check_mul7k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul8k.log: check_mul8k$(EXEEXT) @p='check_mul8k$(EXEEXT)'; \ b='check_mul8k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul9k.log: check_mul9k$(EXEEXT) @p='check_mul9k$(EXEEXT)'; \ b='check_mul9k'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul9k2.log: check_mul9k2$(EXEEXT) @p='check_mul9k2$(EXEEXT)'; \ b='check_mul9k2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul2t.log: check_mul2t$(EXEEXT) @p='check_mul2t$(EXEEXT)'; \ b='check_mul2t'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul2t2.log: check_mul2t2$(EXEEXT) @p='check_mul2t2$(EXEEXT)'; \ b='check_mul2t2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul4t.log: check_mul4t$(EXEEXT) @p='check_mul4t$(EXEEXT)'; \ b='check_mul4t'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul3t.log: check_mul3t$(EXEEXT) @p='check_mul3t$(EXEEXT)'; \ b='check_mul3t'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul1cl.log: check_mul1cl$(EXEEXT) @p='check_mul1cl$(EXEEXT)'; \ b='check_mul1cl'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul2cl.log: check_mul2cl$(EXEEXT) @p='check_mul2cl$(EXEEXT)'; \ b='check_mul2cl'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul2cl2.log: check_mul2cl2$(EXEEXT) @p='check_mul2cl2$(EXEEXT)'; \ b='check_mul2cl2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul3cl.log: check_mul3cl$(EXEEXT) @p='check_mul3cl$(EXEEXT)'; \ b='check_mul3cl'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul4cl1.log: check_mul4cl1$(EXEEXT) @p='check_mul4cl1$(EXEEXT)'; \ b='check_mul4cl1'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul4clk.log: check_mul4clk$(EXEEXT) @p='check_mul4clk$(EXEEXT)'; \ b='check_mul4clk'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5clk_c.log: check_mul5clk_c$(EXEEXT) @p='check_mul5clk_c$(EXEEXT)'; \ b='check_mul5clk_c'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5k3.log: check_mul5k3$(EXEEXT) @p='check_mul5k3$(EXEEXT)'; \ b='check_mul5k3'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul5clk2.log: check_mul5clk2$(EXEEXT) @p='check_mul5clk2$(EXEEXT)'; \ b='check_mul5clk2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul6clk2.log: check_mul6clk2$(EXEEXT) @p='check_mul6clk2$(EXEEXT)'; \ b='check_mul6clk2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul7cl.log: check_mul7cl$(EXEEXT) @p='check_mul7cl$(EXEEXT)'; \ b='check_mul7cl'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul7k3.log: check_mul7k3$(EXEEXT) @p='check_mul7k3$(EXEEXT)'; \ b='check_mul7k3'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul9k3.log: check_mul9k3$(EXEEXT) @p='check_mul9k3$(EXEEXT)'; \ b='check_mul9k3'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul9clk2.log: check_mul9clk2$(EXEEXT) @p='check_mul9clk2$(EXEEXT)'; \ b='check_mul9clk2'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check_mul9cl.log: check_mul9cl$(EXEEXT) @p='check_mul9cl$(EXEEXT)'; \ b='check_mul9cl'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(HEADERS) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f ../lowlevel/$(DEPDIR)/$(am__dirstamp) -rm -f ../lowlevel/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ../lowlevel/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ../lowlevel/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # EXTRA_PROGRAMS=gen_bb_mul_code$(EXEEXT_FOR_BUILD) # gen_bb_mul_code_SOURCES=gen_bb_mul_code.c gen_bb_mul_code$(EXEEXT_FOR_BUILD): ../lowlevel/gen_bb_mul_code.c $(CC_FOR_BUILD) `test -f '../lowlevel/gen_bb_mul_code.c' || echo '$(srcdir)/'`../lowlevel/gen_bb_mul_code.c -o gen_bb_mul_code$(EXEEXT_FOR_BUILD) # The stuff after "-- begin generated code --" following this comment # block is auto-generated by a perl script, from the input data provided # in this comment block in the ACTIVE COMMENTS below. # # After changing the set of functions to be tested below, use # perl -i ./generate-test-list.pl Makefile.am # in order to regenerate the generated automake code (note that the # generation is done in place) #* test_sizes 1 2 3 4 5 6 7 8 9 #* if GF2X_32BIT_SOURCES #* test gen_mul1_w32k{2..6} #* endif #* if GF2X_64BIT_SOURCES #* test gen_mul1_w64k{2..6} #* endif #* test mul2k #* test mul3k #* test mul3k2 #* test mul4k #* test mul5k_a #* test mul5k_b #* test mul5k_c #* test mul5k_d #* test mul6k_a #* test mul6k_b #* test mul6k_c #* test mul7k #* test mul8k #* test mul9k #* test mul9k2 #* if GF2X_SSE2_AVAILABLE #* if GF2X_64BIT_SOURCES #* test mul2t #* test mul2t2 #* endif #* if GF2X_32BIT_SOURCES #* test mul4t #* test mul3t #* endif #* endif #* if GF2X_PCLMUL_AVAILABLE #* test mul1cl #* test mul2cl # mul2cl2 uses psrldq, which is slightly different. #* test mul2cl2 #* test mul3cl #* test mul4cl1 #* test mul4clk #* test mul5clk_c #* test mul5k3 #* test mul5clk2 #* test mul6clk2 #* test mul7cl #* test mul7k3 #* test mul9k3 #* test mul9clk2 #* test mul9cl #* endif # Autotools already use sed, so normally sed is not an extraordinary # difficult dependency. # -- begin generated code -- tuning_undefs_1.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/1/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_1.h tuneup_1.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/1/g < $(srcdir)/tuneup_pre.c > tuneup_1.c tuneup_1.$(OBJEXT): tuning_undefs_1.h tuning_undefs_2.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/2/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_2.h tuneup_2.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/2/g < $(srcdir)/tuneup_pre.c > tuneup_2.c tuneup_2.$(OBJEXT): tuning_undefs_2.h tuning_undefs_3.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/3/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_3.h tuneup_3.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/3/g < $(srcdir)/tuneup_pre.c > tuneup_3.c tuneup_3.$(OBJEXT): tuning_undefs_3.h tuning_undefs_4.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/4/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_4.h tuneup_4.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/4/g < $(srcdir)/tuneup_pre.c > tuneup_4.c tuneup_4.$(OBJEXT): tuning_undefs_4.h tuning_undefs_5.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/5/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_5.h tuneup_5.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/5/g < $(srcdir)/tuneup_pre.c > tuneup_5.c tuneup_5.$(OBJEXT): tuning_undefs_5.h tuning_undefs_6.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/6/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_6.h tuneup_6.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/6/g < $(srcdir)/tuneup_pre.c > tuneup_6.c tuneup_6.$(OBJEXT): tuning_undefs_6.h tuning_undefs_7.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/7/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_7.h tuneup_7.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/7/g < $(srcdir)/tuneup_pre.c > tuneup_7.c tuneup_7.$(OBJEXT): tuning_undefs_7.h tuning_undefs_8.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/8/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_8.h tuneup_8.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/8/g < $(srcdir)/tuneup_pre.c > tuneup_8.c tuneup_8.$(OBJEXT): tuning_undefs_8.h tuning_undefs_9.h: $(srcdir)/tuning_undefs_pre.h ; sed -e s/@@SIZE@@/9/g < $(srcdir)/tuning_undefs_pre.h > tuning_undefs_9.h tuneup_9.c: $(srcdir)/tuneup_pre.c ; sed -e s/@@SIZE@@/9/g < $(srcdir)/tuneup_pre.c > tuneup_9.c tuneup_9.$(OBJEXT): tuning_undefs_9.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k2.$(OBJEXT): tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k2.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 2 > $@ @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k3.$(OBJEXT): tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k3.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 3 > $@ @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k4.$(OBJEXT): tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k4.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 4 > $@ @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k5.$(OBJEXT): tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k5.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 5 > $@ @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k6.$(OBJEXT): tuning_undefs_1.h @GF2X_32BIT_SOURCES_TRUE@gen_mul1_w32k6.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 32 6 > $@ @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k2.$(OBJEXT): tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k2.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 2 > $@ @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k3.$(OBJEXT): tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k3.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 3 > $@ @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k4.$(OBJEXT): tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k4.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 4 > $@ @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k5.$(OBJEXT): tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k5.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 5 > $@ @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k6.$(OBJEXT): tuning_undefs_1.h @GF2X_64BIT_SOURCES_TRUE@gen_mul1_w64k6.c: gen_bb_mul_code$(EXEEXT_FOR_BUILD) ; ./gen_bb_mul_code$(EXEEXT_FOR_BUILD) 64 6 > $@ mul2k.$(OBJEXT): tuning_undefs_2.h mul3k.$(OBJEXT): tuning_undefs_3.h mul3k2.$(OBJEXT): tuning_undefs_3.h mul4k.$(OBJEXT): tuning_undefs_4.h mul5k_a.$(OBJEXT): tuning_undefs_5.h mul5k_b.$(OBJEXT): tuning_undefs_5.h mul5k_c.$(OBJEXT): tuning_undefs_5.h mul5k_d.$(OBJEXT): tuning_undefs_5.h mul6k_a.$(OBJEXT): tuning_undefs_6.h mul6k_b.$(OBJEXT): tuning_undefs_6.h mul6k_c.$(OBJEXT): tuning_undefs_6.h mul7k.$(OBJEXT): tuning_undefs_7.h mul8k.$(OBJEXT): tuning_undefs_8.h mul9k.$(OBJEXT): tuning_undefs_9.h mul9k2.$(OBJEXT): tuning_undefs_9.h @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@mul2t.$(OBJEXT): tuning_undefs_2.h @GF2X_64BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@mul2t2.$(OBJEXT): tuning_undefs_2.h @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@mul4t.$(OBJEXT): tuning_undefs_4.h @GF2X_32BIT_SOURCES_TRUE@@GF2X_SSE2_AVAILABLE_TRUE@mul3t.$(OBJEXT): tuning_undefs_3.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul1cl.$(OBJEXT): tuning_undefs_1.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul2cl.$(OBJEXT): tuning_undefs_2.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul2cl2.$(OBJEXT): tuning_undefs_2.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul3cl.$(OBJEXT): tuning_undefs_3.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul4cl1.$(OBJEXT): tuning_undefs_4.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul4clk.$(OBJEXT): tuning_undefs_4.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul5clk_c.$(OBJEXT): tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul5k3.$(OBJEXT): tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul5clk2.$(OBJEXT): tuning_undefs_5.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul6clk2.$(OBJEXT): tuning_undefs_6.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul7cl.$(OBJEXT): tuning_undefs_7.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul7k3.$(OBJEXT): tuning_undefs_7.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul9k3.$(OBJEXT): tuning_undefs_9.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul9clk2.$(OBJEXT): tuning_undefs_9.h @GF2X_PCLMUL_AVAILABLE_TRUE@mul9cl.$(OBJEXT): tuning_undefs_9.h tune-lowlevel: $(LOWLEVEL) cd $(top_builddir) ; $(MAKE) MAKE="$(MAKE)" abs_srcdir=$(abs_srcdir) \ perl $(srcdir)/tune-lowlevel.pl $(LOWLEVEL) @GPL_CODE_PRESENT_TRUE@tunetoom.res: tunetoom$(EXEEXT) @GPL_CODE_PRESENT_TRUE@ ./tunetoom $(TOOM_TUNING_LIMIT) -o tunetoom.res @GPL_CODE_PRESENT_TRUE@tune-toom: tunetoom.res modify-thresholds$(EXEEXT) @GPL_CODE_PRESENT_TRUE@ cd $(top_builddir) ; $(MAKE) @GPL_CODE_PRESENT_TRUE@ cat ../gf2x/gf2x-thresholds.h > tuned_thresholds.h @GPL_CODE_PRESENT_TRUE@ ./modify-thresholds -o tuned_thresholds.h < tunetoom.res @GPL_CODE_PRESENT_TRUE@ mkdir -p ../already_tuned/tuned/ @GPL_CODE_PRESENT_TRUE@ mv -f tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h @GPL_CODE_PRESENT_TRUE@ rm -f ../gf2x/gf2x-thresholds.h @GPL_CODE_PRESENT_TRUE@ ln -sf ../already_tuned/tuned/gf2x-thresholds.h ../gf2x/ @GPL_CODE_PRESENT_TRUE@ cd $(top_builddir) ; $(MAKE) @GPL_CODE_PRESENT_FALSE@tune-toom: @GPL_CODE_PRESENT_FALSE@ echo "No toom tuning, LGPL-only code" @GPL_CODE_PRESENT_FALSE@ : tunefft.res: tunefft$(EXEEXT) ./tunefft -s $(FFT_TUNING_SCALE) $(FFT_TUNING_LIMIT) -o tunefft.res tune-fft: tunefft.res modify-thresholds$(EXEEXT) cd $(top_builddir) ; $(MAKE) cat ../gf2x/gf2x-thresholds.h > tuned_thresholds.h ./modify-thresholds -o tuned_thresholds.h < tunefft.res mkdir -p ../already_tuned/tuned/ mv -f tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h rm -f ../gf2x/gf2x-thresholds.h ln -sf ../already_tuned/tuned/gf2x-thresholds.h ../gf2x/ cd $(top_builddir) ; $(MAKE) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/src/README0000644000327606072450000000357512725540356010655 00000000000000 gf2x tuning gf2x should normally build out of the box with relatively sensible defaults (if it does not, it's a bug, and we would be glad if you could report it with accurate enough information). For best performance, it is wise to tune the library in order to select the best algorithm when appropriate. This can be done in three steps. This tuning job requires perl, and quite probably won't work if cross-compiling. It should work out-of-source cleanly, though. All the tuning steps below update the ../already_tuned/tuned subdirectory, and move the corresponding links in the top-level directory. * Step 1 -- tuning the low-level routines * Run ``make tune-lowlevel''. You need perl for that. Depending on the hardware, various codes may be tested. * Step 2 -- tuning the mid-sized multiplication routines * Run ``make tune-toom''. This may take some time. As an alternative, there is also a way to run this procedure more manually, for quicker tuning, or for better accuracy. See the program tunetoom.c for instructions (don't mix tune-toom which is the target, and tunetoom, which is the program). * Step 3 -- tuning the large multiplication * Run ``make tune-fft''. As for tune-toom, speed or accuracy of the tuning may be adapted by a manual procedure. The developers may be interested by your tuning results. You may thus post to the list gf2x-discuss@lists.gforge.inria.fr ; we need: - the contents of the already_tuned/tuned subdirectory - anything relevant for identifying your machine, or machine family, and compiler. This includes for example the output of the following commands, at least the ones that exist: sh /path/to/source/of/gf2x/config.guess uname -a arch cat /proc/cpuinfo psrinfo -v gcc -v cc -v cc -V - optionally, the complete output of the ``make tune-*'' commands, but this is only for having a look at the timings. gf2x-1.2/src/TODO0000644000327606072450000000021512725540356010451 00000000000000 - Find some way to test whether inlining helps or not. For the moment the GF2X_STORAGE_CLASS_* macros are static, which is not very good. gf2x-1.2/src/timing.c0000644000327606072450000000361113124273603011407 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gf2x/gf2x-config.h" #include #include #include #include "timing.h" uint64_t microseconds() { if (CLOCKS_PER_SEC < 1000000) return clock () * (1000000 / CLOCKS_PER_SEC); else return clock () / (CLOCKS_PER_SEC / 1000000); } /* returns the clock() resolution in seconds */ double clock_resolution () { clock_t c0, c1, c2; int i, iter = 100; /* with 100 iterations we expect an accuracy of 1% */ c0 = c1 = clock (); for (i = 0; i < iter; i++) { do { c2 = clock (); } while (c2 == c1); c1 = c2; } return (double) (c2 - c0) / iter; } gf2x-1.2/src/check_small_size.c0000644000327606072450000000362412725540356013433 00000000000000#include #include #include #include "gf2x.h" #include "gf2x-thresholds.h" #include SOURCEFILE #define PAD(X,Y) X ## Y #define FUNCTION_NAME(X) PAD(gf2x_mul, X) unsigned long bbb[TESTING_SIZE]; unsigned long aaa[TESTING_SIZE]; unsigned long ccc[2*TESTING_SIZE]; unsigned long rrr[2*TESTING_SIZE]; int main() { int errors=0; for(int i = 0 ; i < TESTING_SIZE * GF2X_WORDSIZE ; i++) { memset(aaa, 0, TESTING_SIZE*sizeof(unsigned long)); aaa[i / GF2X_WORDSIZE] = 1UL << (i % GF2X_WORDSIZE); for(int j = 0 ; j < TESTING_SIZE * GF2X_WORDSIZE ; j++) { memset(bbb, 0, TESTING_SIZE*sizeof(unsigned long)); bbb[j / GF2X_WORDSIZE] = 1UL << (j % GF2X_WORDSIZE); memset(ccc, 0, 2*TESTING_SIZE*sizeof(unsigned long)); memset(rrr, 0, 2*TESTING_SIZE*sizeof(unsigned long)); #if TESTING_SIZE > 1 FUNCTION_NAME(TESTING_SIZE)(ccc, aaa, bbb); #else FUNCTION_NAME(TESTING_SIZE)(ccc, aaa[0], bbb[0]); #endif gf2x_mul(rrr, aaa, TESTING_SIZE, bbb, TESTING_SIZE); if (memcmp(ccc, rrr, 2*TESTING_SIZE*sizeof(unsigned long)) != 0) { fprintf(stderr, "Error t^%d * t^%d\n", i, j); for(int i = 0 ; i < 2*TESTING_SIZE ; i++) { if (rrr[i] != ccc[i]) { fprintf(stderr, GF2X_WORDSIZE == 64 ? "[%02d] %016lx %016lx %016lx\n" : "[%02d] %08lx %08lx %08lx\n" , i, rrr[i], ccc[i], rrr[i] ^ ccc[i]); } } errors++; } } } if (errors) { fprintf(stderr, "Found %d errors\n", errors); exit(EXIT_FAILURE); } return 0; } gf2x-1.2/src/modify-thresholds.c0000644000327606072450000002763612725540356013611 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Program to update the thresholds table given a tuning result file. */ /* How to use this program: 1) Use the option -o to provide the location of thresholds.h file which will be overwritten. 2) feed as stdin the result of either the tunetoom or tunefft program. */ #define _DEFAULT_SOURCE /* _BSD_SOURCE is deprecated */ #include #include #include /* int64_t */ #include /* SCNd64 */ #include /* for LONG_MAX */ #include #include #include #include /* for uname */ /* We need some constants from gf2x */ #include "gf2x/gf2x-impl.h" #include "replace.h" #ifndef MAX #define MAX(a,b) ((a)<(b) ? (b) : (a)) #endif const char * thresholds_file = "thresholds.h"; struct hash_define replacements[100]; unsigned long nrepl=0; /* We build our private table here */ short best_tab[GF2X_TOOM_TUNING_LIMIT]; short best_utab[GF2X_TOOM_TUNING_LIMIT]; unsigned long blim = 0; unsigned long ulim = 0; struct fft_tuning_pair { int64_t sz; int method; }; struct fft_tuning_pair fft_tbl[1000]; unsigned long nstairs = 0; char * toom_info_string = "\"placeholder\""; char * fft_info_string = "\"placeholder\""; #define MINI_GF2X_MUL_TOOM_THRESHOLD 17 #define MINI_GF2X_MUL_TOOMW_THRESHOLD 8 #define MINI_GF2X_MUL_TOOM4_THRESHOLD 30 #define MINI_GF2X_MUL_TOOMU_THRESHOLD 33 #define BESTMIN (GF2X_MUL_KARA_THRESHOLD-1) #define BESTMINU (GF2X_MUL_TOOMU_THRESHOLD-1) int startswith(char ** pptr, const char * key) { unsigned long l = strlen(key); if (strncmp(*pptr, key, l) != 0) return 0; *pptr += l; for( ; **pptr && isspace(**pptr) ; (*pptr)++) ; return 1; } void read_table() { memset(best_tab, -1, sizeof(best_tab)); memset(best_utab, -1, sizeof(best_utab)); nstairs = 0; for(;;) { char buf[1024]; int r; int64_t sz; int m; char token[16]; char * ptr; ptr = fgets(buf, sizeof(buf), stdin); if (feof(stdin)) break; if (buf[0] == '#') continue; ptr = buf; if (startswith(&ptr, "info")) { if (startswith(&ptr, "-fft")) { fft_info_string = strdup(ptr); } else if (startswith(&ptr, "-toom")) { toom_info_string = strdup(ptr); } else { abort(); } continue; } r = sscanf(buf, "%15s %" SCNd64 " %d", token, &sz, &m); if (r != 3) { fprintf(stderr, "Bad input line: %s", buf); exit(1); } if (strcmp(token, "fft") == 0) { fft_tbl[nstairs].sz = sz; fft_tbl[nstairs].method = m; nstairs++; continue; } if (strcmp(token, "toom") == 0) { best_tab[sz - 1] = m; if (sz > (int64_t) blim) { blim = sz; } continue; } if (strcmp(token, "utoom") == 0) { best_utab[sz - 1] = m; if (sz > (int64_t) ulim) { ulim = sz; } continue; } } } typedef int (*sortfunc_t) (const void *, const void *); int compare_fft_tuning(const struct fft_tuning_pair * a, const struct fft_tuning_pair * b) { return a->sz - b->sz; } void fill_holes(short * tab, long lim, short dflt) { long i,j; for(i = 0 ; i < lim ; ) { for( ; i < lim && tab[i] >= 0 ; i++); if (i == lim) break; for(j = i ; j < lim && tab[j] < 0 ; j++); short m0 = i ? tab[i-1] : 0; short m1 = (j < lim) ? tab[j] : dflt; long k; k = j-1; for( ; i <= k ; i++,k--) { tab[k]=m1; tab[i]=m0; } } } void prepare_and_push_hash_define_tbl(const char * name, short * tbl, size_t n) { size_t sz = 3 + 3*n+(n+19)/20*4 + 10; size_t h = 0; char * table_string = malloc(sz); size_t i; h += snprintf(table_string + h, sz-h, "{"); for (i = 1 ; i <= n ; i++) { if ((i-1) % 20 == 0) { h += snprintf(table_string + h, sz-h, "\t\\\n\t"); } h += snprintf(table_string + h, sz-h, "%d, ", tbl[i-1]); } /* The last carriage return is added by the replacement engine anyway */ h += snprintf(table_string + h, sz-h, "}"); if (h >= sz) abort(); set_hash_define(replacements + nrepl++, name, table_string); free(table_string); } void prepare_and_push_hash_define_fft_tbl(const char *name, struct fft_tuning_pair *tbl, size_t n) { size_t sz = 10 + 30 * n; size_t h = 0; char *table_string = malloc(sz); size_t i; h += snprintf(table_string + h, sz - h, "{"); for (i = 0; i < n; i++) { if (i % 4 == 0) { h += snprintf(table_string + h, sz - h, "\t\\\n\t"); } if (tbl[i].sz >> 32) { // make sure that the constant looks somewhat right (even // though it's a stupid idea, using a thresholds file for a // 64bit cpu on a 32bit box shouldn't break the meaning of // the data). h += snprintf(table_string + h, sz - h, "{ INT64_C(%"PRId64"), %d }, ", tbl[i].sz, tbl[i].method); } else { h += snprintf(table_string + h, sz - h, "{ %"PRId64", %d }, ", tbl[i].sz, tbl[i].method); } } h += snprintf(table_string + h, sz - h, "}\n"); if (h >= sz) abort(); set_hash_define(replacements + nrepl++, name, table_string); free(table_string); } void get_toom_thresholds() { /* Get the values for the balanced thresholds: * GF2X_MUL_TOOM_THRESHOLD * GF2X_MUL_TOOMW_THRESHOLD * GF2X_MUL_TOOM4_THRESHOLD * GF2X_MUL_TOOM4_ALWAYS_THRESHOLD */ unsigned long t3 = UINT_MAX; unsigned long tw = UINT_MAX; unsigned long t4 = UINT_MAX; unsigned long t4a = UINT_MAX; unsigned long i; for (i = BESTMIN + 1; i && i <= blim; i++) { if (best_tab[i - 1] == GF2X_SELECT_TC3) { t3 = i; break; } } if (t3 == UINT_MAX) { t3 = MAX(blim, 17); } for (i = BESTMIN + 1; i && i <= blim; i++) { if (best_tab[i - 1] == GF2X_SELECT_TC3W) { tw = i; break; } } if (tw == UINT_MAX) { tw = MAX(blim, 8); } for (i = BESTMIN + 1; i && i <= blim; i++) { if (best_tab[i - 1] == GF2X_SELECT_TC4) { t4 = i; break; } } if (t4 == UINT_MAX) { t4 = MAX(blim, 30); } if (blim && t4 < blim) { for (t4a = blim; t4a >= MINI_GF2X_MUL_TOOM4_THRESHOLD; t4a--) { if (best_tab[t4a - 1] != GF2X_SELECT_TC4) { t4a++; break; } } } else { t4a = blim; } /* Now do some sanity checks */ if (!(tw <= t3)) { fprintf(stderr, "Note: we normally expect GF2X_MUL_TOOMW_THRESHOLD(%lu) to be below GF2X_MUL_TOOM_THRESHOLD(%lu). It is not the case here, but it is not an error either.\n", tw, t3); } /* GF2X_MUL_TOOM4_ALWAYS_THRESHOLD must be >= 30 */ if (t4a < 30) { fprintf (stderr, "GF2X_MUL_TOOM4_ALWAYS_THRESHOLD(%lu) must be >= 30\n", t4a); exit (1); } set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOM_THRESHOLD", t3); set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOMW_THRESHOLD", tw); set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOM4_THRESHOLD", t4); set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOM4_ALWAYS_THRESHOLD", t4a); blim = t4a; } void get_utoom_thresholds() { /**************************************************/ /* Get the values for the unbalanced thresholds: * GF2X_MUL_TOOM3U_THRESHOLD * GF2X_MUL_TOOM3U_ALWAYS_THRESHOLD */ unsigned long tu = UINT_MAX; unsigned long tua = UINT_MAX; unsigned long i; for (i = BESTMINU + 1; i && i <= ulim; i++) { if (best_utab[i - 1] == GF2X_SELECT_UNB_TC3U) { tu = i; break; } } if (tu == UINT_MAX) { tu = MAX(blim, 33); } if (ulim && tu < ulim) { for (tua = ulim; tua >= MINI_GF2X_MUL_TOOMU_THRESHOLD; tua--) { if (best_utab[tua - 1] != GF2X_SELECT_UNB_TC3U) { tua++; break; } } } else { tua = ulim; } set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOMU_THRESHOLD", tu); set_hash_define_int(replacements + nrepl++, "GF2X_MUL_TOOMU_ALWAYS_THRESHOLD", tua); ulim = tua; } void digest_table() { unsigned long i; if (blim || ulim) { set_hash_define(replacements + nrepl++, "GF2X_TOOM_TUNING_INFO", toom_info_string); if (blim) { printf("toom_table computed up to size %lu\n", blim); fill_holes(best_tab, blim, GF2X_SELECT_TC4); get_toom_thresholds(); prepare_and_push_hash_define_tbl("GF2X_BEST_TOOM_TABLE", best_tab, blim); } if (ulim) { printf("utoom_table computed up to size %lu\n", ulim); fill_holes(best_utab, ulim, GF2X_SELECT_UNB_TC3U); get_utoom_thresholds(); prepare_and_push_hash_define_tbl("GF2X_BEST_UTOOM_TABLE",best_utab,ulim); } } if (nstairs) { set_hash_define(replacements + nrepl++, "GF2X_FFT_TUNING_INFO", fft_info_string); qsort(fft_tbl, nstairs, sizeof(struct fft_tuning_pair), (sortfunc_t) &compare_fft_tuning); /* coalesce fft results */ unsigned long j = 0; for(i = 0 ; i < nstairs ; ) { unsigned long k; for(k = i ; k < nstairs ; k++) { if (fft_tbl[k].method != fft_tbl[i].method) break; } memcpy(&(fft_tbl[j]),&(fft_tbl[i]),sizeof(struct fft_tuning_pair)); j++; i = k; } nstairs = j; prepare_and_push_hash_define_fft_tbl("GF2X_MUL_FFT_TABLE", fft_tbl, nstairs); } replace(replacements, nrepl, thresholds_file); for(i = 0 ; i < nrepl; i++ ) { free(replacements[i].identifier); free(replacements[i].string); } } void usage(int rc) { FILE * f = rc ? stderr : stdout; fprintf(f, "Usage: modify-thresholds [-o ]\n"); exit(rc); } int main(int argc, char *argv[]) { argc--,argv++; for( ; argc ; argc--,argv++) { if (strcmp(argv[0], "--help") == 0) { usage(0); } if (strcmp(argv[0], "--output") == 0 || strcmp(argv[0], "-o") == 0) { argc--,argv++; if (! argc) { usage(1); } thresholds_file = argv[0]; continue; } usage(1); } read_table(); digest_table(); fflush(stdout); return 0; } /* vim: set sw=4 sta et: */ gf2x-1.2/src/replace.c0000644000327606072450000001110612725540356011541 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Helper program for rewriting headers after tuning. */ #define _GNU_SOURCE #include #include #include #include #include "replace.h" void set_hash_define_int(struct hash_define * ptr, const char * name, int x) { ptr->identifier = strdup(name); ptr->string = malloc(32); snprintf(ptr->string, 32, "%d", x); } void set_hash_define(struct hash_define * ptr, const char * name, const char *v) { ptr->identifier = strdup(name); ptr->string = strdup(v); unsigned long l = strlen(ptr->string); for( ; l && isspace(ptr->string[l-1]) ; l--); ptr->string[l] = '\0'; } typedef int (*sortfunc_t) (const void *, const void *); int cmp_hash_define(struct hash_define * a, struct hash_define * b) { return strcmp(a->identifier, b->identifier); } int search_hash_define(const char * a, struct hash_define * b) { return strcmp(a, b->identifier); } void replace(struct hash_define * ptr, unsigned long n, const char * fname) { qsort(ptr, n, sizeof(struct hash_define), (sortfunc_t) & cmp_hash_define); FILE * fi, * fo; char * fname_out; size_t sl = strlen(fname)+10; char buffer[1024]; char id[80]; fname_out = malloc(sl); snprintf(fname_out,sl,"%s.new",fname); fi = fopen(fname, "r"); fo = fopen(fname_out, "w"); for (;!feof(fi);) { const char * x, *y; if (fgets(buffer, sizeof(buffer), fi) == NULL) { /* EOF, most certainly */ break; } #define IS_HDEFINE(X) (strncmp(X,"#define",7) == 0) #define IS_HUNDEF(X) (strncmp(X,"#undef",6) == 0) if (!(IS_HDEFINE(buffer) || IS_HUNDEF(buffer))) { fputs(buffer, fo); continue; } x = buffer; for(;*x && !isspace(*x);x++); for(;*x && isspace(*x);x++); for(y=x;*y&&!isspace(*y);y++); strncpy(id,x,y-x); id[y-x]='\0'; /* identifier is id */ struct hash_define * loc; loc = bsearch(id, ptr, n, sizeof(struct hash_define), (sortfunc_t) & search_hash_define); if (loc == NULL) { fputs(buffer, fo); continue; } if (loc->string[0] == '\0') { fprintf(stderr, "Error: replacement string %s used twice!\n", loc->identifier); exit(1); } for( ;; ) { x = buffer + strlen(buffer) - 1; for( ; (x - buffer >= 0) && isspace(*x) ; x--); /* If the current line was followed by a backslash, gobble * the following line as well. */ if ((x - buffer >= 0) && *x != '\\') break; /* It's normally an error to arrive here, although there's * not much questioning as to what to do in such a situation */ if (fgets(buffer, sizeof(buffer), fi) == NULL) break; } fprintf(fo,"#define %s\t\t%s\n", id, loc->string); loc->string[0]='\0'; } for(unsigned long i = 0 ; i < n ; i++) { struct hash_define * loc = ptr + i; if (loc->string[0] != '\0') { fprintf(stderr, "Warning: replacement string %s not used ; value:\n%s\n", loc->identifier, loc->string); } } fclose(fi); fclose(fo); rename(fname_out, fname); } gf2x-1.2/src/tunefft.c0000644000327606072450000002275612725540356011616 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Program to tune the FFT multiplication over GF(2). */ /* How to use this program: 1) beforehand, tune the low-level and mid-sized multiplication routines with ``make tune-lowlevel'' and ``make tune-toom'' 2) build the tunefft binary using ``make tunefft'' 3) run tunefft, giving as argument the maximum word size, for example ./tunefft 8000000 will tune multiplication of polynomials up to degree 512000000 on a 64-bit machine. The results are printed on stdout by default, but is possible and perhaps preferrable to save them to another file using the -o option. Giving a multiplicative step value with the -s argument makes the tuning quicker, but less accurate. The output file tunefft.res can then be used as input for the modify-thresholds program, like in the following: cat ../gf2x-thresholds.h > tuned_thresholds.h ./modify-thresholds -o tuned_thresholds.h < tunefft.res mkdir -p ../already_tuned/tuned/ mv tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h rm -f ../gf2x-thresholds.h ln -sf already_tuned/tuned/gf2x-thresholds.h ../ */ #define _DEFAULT_SOURCE /* _BSD_SOURCE is deprecated */ #define _POSIX_C_SOURCE 200112L /* solaris needs >= 199506L for ctime_r */ #include #include #include #include #include /* for LONG_MAX */ #include /* for DBL_MAX */ #include #include /* for uname */ #include "gf2x.h" #include "gf2x/gf2x-impl.h" #include "timing.h" #include "tuning-common.h" /* This version of tunefft uses the midpoint of each stair */ /* Must be at least >=GF2X_MUL_FFT_THRESHOLD (28), but it saves time to set larger */ #define GF2X_MUL_FFT_BEGIN_TUNE 1000 #define STEPMAX 50 /* Return the largest m >= n such that a product of m*m words with an FFT of length K leads to the same size of pointwise products as with n words. More precisely if f(n) = K/3 * ceil(6*n*GF2X_WORDSIZE/K^2) then m is the largest integer such that ceil(f(n)/GF2X_WORDSIZE) = ceil(f(m)/GF2X_WORDSIZE). In fact we take for m the largest integer such that g(n) = g(m) with g(n) = ceil(6*n*GF2X_WORDSIZE/K^2). */ long end_of_stair(long n, long K) { long g = 6 * n * GF2X_WORDSIZE; g = 1 + (g - 1) / K; /* ceil(g/K) */ g = 1 + (g - 1) / K; /* ceil(g/K^2) */ g = g * K * K; return g / (6 * GF2X_WORDSIZE); } long next_step(long n, long K) { // Return the minimum so steps are not too large return MIN(end_of_stair(n, K), MAX(n+1, n*mulstep)); } void usage(int rc) { FILE * f = rc ? stderr : stdout; fprintf(f, "Usage: tunefft [options] [min_word_size] max_word_size\n"); fprintf(f, "Allowed options:\n"); fprintf(f, "\t-s \n"); fprintf(f, "\t-o (default is stdout or file desc. 3)\n"); exit(rc); } int main(int argc, char *argv[]) { long minn, maxn, mid, n, n2, ns, i; long besti; /* 0 for TC, 1, 2, ... for FFT(K0*3^(bestK-1)) */ long bestK; long K, K0 = 3; /* try K0, 3*K0, 9*K0 */ double T[4]; /* T[0] is for TC, T[1] for K0, T[2] for 3*K0, T[3] for 9*K0 */ double t1[4], t2[4]; unsigned long *a, *b, *c, *t, *u, *v; int nsz = 0; int tc_takes_too_long = 0; const char * reference = "TC"; maxn = 1000000; // default minn = GF2X_MUL_FFT_BEGIN_TUNE / 2 + 1; char * progname = argc ? argv[0] : ""; argc--,argv++; for( ; argc ; argc--,argv++) { int r; if (strcmp(argv[0], "--help") == 0) { usage(0); } if (strcmp(argv[0], "--no-toom") == 0) { tc_takes_too_long = 1; reference = "F1(K0)"; continue; } r = handle_tuning_mulstep(&argc, &argv); if (r < 0) usage(1); else if (r) continue; r = handle_tuning_outfile(&argc, &argv); if (r < 0) usage(1); else if (r) continue; if (strcmp(argv[0], "-k0") == 0) { argc--,argv++; if (! argc) usage(1); K0 = atoi(argv[0]); continue; } if (nsz == 0) { maxn = atoi(argv[0]); nsz++; continue; } if (nsz == 1) { minn = maxn; maxn = atoi(argv[0]); nsz++; continue; } usage(1); } if (nsz == 0) usage(1); set_tuning_output(); { char date[40]; time_t t; size_t u; struct utsname buf; time(&t); ctime_r(&t, date); u = strlen(date); for (; u && isspace(date[u - 1]); date[--u] = '\0'); uname(&buf); /* strip the dirname */ char * ptr = strrchr(progname, '/'); if (ptr) { ptr++; } else { ptr = progname; } fprintf(rp, "info-fft \"%s -s %.2f %ld run on %s on %s ; based on %s\"\n", ptr,mulstep,maxn,buf.nodename,date,GF2X_TOOM_TUNING_INFO); } printf("Tuning FFT multiplication to wordsize %ld\n\n", maxn); a = (unsigned long *) malloc(maxn * sizeof(unsigned long)); b = (unsigned long *) malloc(maxn * sizeof(unsigned long)); c = (unsigned long *) malloc(2 * maxn * sizeof(unsigned long)); u = (unsigned long *) malloc(2 * maxn * sizeof(unsigned long)); v = (unsigned long *) malloc(2 * maxn * sizeof(unsigned long)); t = (unsigned long *) malloc(gf2x_toomspace(maxn) * sizeof(unsigned long)); random_wordstring(a, maxn); random_wordstring(b, maxn); /* Skip n if (2*n < GF2X_MUL_FFT_BEGIN_TUNE) as this is too small for the FFT */ for (n = minn; n <= maxn;) { n2 = next_step(n, 3 * K0); // End of interval if (n2 > maxn) // Only go as far n2 = maxn; // as maxn. mid = (n + n2) / 2; // Mid-point printf("%ld..%ld ", n, n2); fflush(stdout); if (tc_takes_too_long) { T[0] = DBL_MAX; } else { TIME(T[0], gf2x_mul_toom(u, a, b, mid, t)); // Time Toom-Cook printf("TC:%1.1e ", T[0]); } fflush(stdout); besti = 0; bestK = 1; K = K0; i = 1; ugly_label: for ( ; i <= 3; i++, K *= 3) { TIME(t1[i], gf2x_mul_fft(c, a, mid, b, mid, K)); if (tc_takes_too_long) { memcpy(u, c, 2 * maxn * sizeof(unsigned long)); } check(a, mid, b, mid, reference, u, "F1", c); if (K >= GF2X_WORDSIZE) { TIME(t2[i], gf2x_mul_fft(v, a, mid, b, mid, -K)); check(a, mid, b, mid, "F1", c, "F2", v); } else { t2[i] = DBL_MAX; } if (t1[i] < t2[i]) { T[i] = t1[i]; printf("F1(%ld):%1.1e ", K, T[i]); } else { T[i] = t2[i]; printf("F2(%ld):%1.1e ", K, T[i]); } fflush(stdout); if (T[i] < T[besti]) { besti = i; bestK = (t2[i] > t1[i]) ? K : -K; /* -K for FFT2(|K|) */ } } if (T[3] < T[1] && T[3] < T[2]) { if (besti) { if (besti == 1) abort(); besti--; } K0 *= 3; /* K just stays as it was */ i = 3; T[1] = T[2]; T[2] = T[3]; goto ugly_label; /* Notice that we can't loop forever here. If we have T[3] < * T[2], this will ensure T[2] < T[1] at the next turn, * thereby forcing the other case not to happen */ } else if (T[1] < T[2] && T[1] < T[3] && K0 > 3) { K0 /= 3; } /* OK, this stair is done */ if (bestK == 1) printf("TC"); else { if (bestK > 0) printf("F1(%ld)", bestK); else printf("F2(%ld)", -bestK); } printf("\n"); fflush(stdout); if (T[0] >= 4 * T[besti] && !tc_takes_too_long) { printf("TC is taking too long, disabling for next sizes\n"); tc_takes_too_long = 1; reference = "F1(K0)"; } /* go to next size */ ns = n; n = next_step(n, 3 * K0); /* middle value of K */ if (n > n2) n = n2; /* end of last stair if K0 increased */ n++; if (n < mid) { /* redo the last stair if K0 decreased */ n = ns; } else { fprintf(rp, "fft %ld %ld\n", ns == minn ? 1 : ns, ns == minn ? 1 : bestK); } } free(a); free(b); free(c); free(t); free(u); free(v); return 0; } gf2x-1.2/src/tuning-common.c0000644000327606072450000001200513125176245012714 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _DEFAULT_SOURCE /* _BSD_SOURCE is deprecated */ #define _XOPEN_SOURCE 500 /* for random() */ #define _POSIX_C_SOURCE 200112L #include #include #include #include #include #include "tuning-common.h" double mulstep = 1.0; FILE * rp; const char * outfile = NULL; double MINTIME = 0.5; /* timer resolution */ /* sets the clock() resolution in seconds */ void set_clock_resolution () { clock_t c0, c1, c2; int i, iter = 1000; /* with 1000 iterations we expect an accuracy of 0.1% */ double resolution; c0 = c1 = clock (); for (i = 0; i < iter; i++) { do { c2 = clock (); } while (c2 == c1); c1 = c2; } resolution = (double) (c2 - c0) / (double) CLOCKS_PER_SEC; MINTIME = (resolution > 0.5) ? 0.5 : resolution; printf ("Using MINTIME = %.2es with clock() resolution of %.2es\n", MINTIME, resolution / (double) iter); } void random_wordstring(unsigned long *a, long n) { long i; for (i = 0; i < n; i++) { /* random () returns a value between 0 and RAND_MAX = 2^31-1 */ a[i] = random () | (random () << 31); if (sizeof (long) > sizeof (int)) a[i] = (a[1] << 31) | random (); } } void dump(const unsigned long *a, long m, const unsigned long *b, long n, const unsigned long *c, const unsigned long *d) { printf("failed:=["); printf("["); int j; for (j = 0; j < m; j++) { if (j) printf(", "); printf("%lu", a[j]); } printf("],"); printf("["); for (j = 0; j < n; j++) { if (j) printf(", "); printf("%lu", b[j]); } printf("],"); printf("["); for (j = 0; j < m + n; j++) { if (j) printf(", "); printf("%lu", c[j]); } printf("],"); printf("["); for (j = 0; j < m + n; j++) { if (j) printf(", "); printf("%lu", d[j]); } printf("]"); printf("];\n"); } void check(const unsigned long *a, long m, const unsigned long *b, long n, const char * cname, const unsigned long *c, const char * dname, const unsigned long *d) { long i = 0; int error = 0; for(i = 0 ; i < m + n ; i++) { if (c[i] != d[i]) { if (error++ < 10) { fprintf(stderr, "Error: %s and %s differ for %ldx%ld at word %ld\n", cname, dname, m, n, i); fprintf (stderr, "expected %lx, got %lx\n", c[i], d[i]); } } } if (error) { if (m + n < 1000) { dump(a, m, b, n, c, d); } abort(); } } void set_tuning_output() { if (outfile) { if ((rp = fopen(outfile, "w")) == NULL) { fprintf(stderr, "fopen(%s): %s\n", outfile, strerror(errno)); exit(1); } } else { #if 0 /* Not really useful since there is -o anyway */ /* If file descriptor # 3 is open for writing, use it. */ if ((rp = fdopen(3, "w")) == NULL) { rp = stdout; } #else rp = stdout; #endif } setbuf(rp, NULL); setbuf(stdout, NULL); } void close_tuning_output() { if (outfile) fclose (rp); } int handle_tuning_mulstep(int * p_argc, char *** p_argv) { if (strcmp((*p_argv)[0], "--step") == 0 || strcmp((*p_argv)[0], "-s") == 0) { (*p_argc)--,(*p_argv)++; if (! (*p_argc)) { return -1; } mulstep = atof((*p_argv)[0]); return 1; } return 0; } int handle_tuning_outfile(int * p_argc, char *** p_argv) { if (strcmp((*p_argv)[0], "--output") == 0 || strcmp((*p_argv)[0], "-o") == 0) { (*p_argc)--,(*p_argv)++; if (! (*p_argc)) { return -1; } outfile = (*p_argv)[0]; return 1; } return 0; } gf2x-1.2/src/tunetoom.c0000644000327606072450000003447613124273610012005 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Program to tune Toom-Cook multiplication over GF(2). */ /* How to use this program: 1) beforehand, tune the low-level multiplication routines with ``make tune-lowlevel'' 2) build the tunetoom binary using ``make tunetoom'' 3) run tunetoom, giving as argument the maximum word size, for example ./tunetoom 2000 will tune multiplication of polynomials up to degree 128000 on a 64-bit machine. For higher degrees the FFT is probably faster - see tunefft. tunetoom works in two phases - first the "balanced" routines with equal-sized inputs are tuned, then the "unbalanced" routines where one input is about twice as large as the other are tuned. The results are printed on stdout by default, but is possible and perhaps preferrable to save them to another file using the -o option. Steps are equal-sized by 1, but with the -s option, it is possible to force multiplicative steps, e.g. -s 1.01 for 1% steps. Summary: ./tunetoom -s 1.05 2048 -o tunetoom.res -> does 5% steps up to size 2048, prepare output in tunetoom.res ./tunetoom 2048 -o tunetoom.res -> does 1 by 1 steps up to size 2048, prepare output in tunetoom.res The output file tunetoom.res can then be used as input for the modify-thresholds program, like in the following: cat ../gf2x-thresholds.h > tuned_thresholds.h ./modify-thresholds -o tuned_thresholds.h < tunetoom.res mkdir -p ../already_tuned/tuned/ mv tuned_thresholds.h ../already_tuned/tuned/gf2x-thresholds.h rm -f ../gf2x-thresholds.h ln -sf already_tuned/tuned/gf2x-thresholds.h ../ 4) compile and run tunefft to tune FFT multiplication (see instructions in tunefft.c). */ #define _DEFAULT_SOURCE /* _BSD_SOURCE is deprecated */ #define _POSIX_C_SOURCE 200112L /* solaris needs >= 199506L for ctime_r */ #define _XOPEN_SOURCE 500L /* FreeBSD wants that for srandom() */ #include #include #include /* for LONG_MAX */ #include #include #include #include #include /* for uname */ #include #include "gf2x.h" #include "gf2x/gf2x-impl.h" #include "gf2x/gf2x-small.h" #include "timing.h" #include "tuning-common.h" /* those values are the minimal thresholds for each routine */ #define MINI_GF2X_MUL_KARAX_THRESHOLD 2 #define MINI_GF2X_MUL_TOOM_THRESHOLD 17 #define MINI_GF2X_MUL_TOOMW_THRESHOLD 8 #define MINI_GF2X_MUL_TOOM4_THRESHOLD 30 #define MINI_GF2X_MUL_TOOMU_THRESHOLD 33 #define MINI_GF2X_MUL_TC3X_THRESHOLD 15 #define BESTMIN (GF2X_MUL_KARA_THRESHOLD-1) #define BESTMINU (GF2X_MUL_TOOMU_THRESHOLD-1) const char * gf2x_toom_select_string[] = { [GF2X_SELECT_KARA] = "TC2", [GF2X_SELECT_KARAX] = "TC2X", [GF2X_SELECT_TC3] = "TC3", [GF2X_SELECT_TC3W] = "TC3W", [GF2X_SELECT_TC3X] = "TC3X", [GF2X_SELECT_TC4] = "TC4", }; const char * gf2x_utoom_select_string[] = { [GF2X_SELECT_UNB_DFLT] = "default", [GF2X_SELECT_UNB_TC3U] = "TC3U", }; FILE *rp; void tunetoom(long tablesz) { long high, n; int k; double T3[1], TK[1], TKX[1], TW[1], T3X[1], T4[1]; double mint; unsigned long *a, *b, *c, *d, *t; high = tablesz; if (high < BESTMIN) high = BESTMIN; if (high > GF2X_TOOM_TUNING_LIMIT) { fprintf(stderr, "Increase constant GF2X_TOOM_TUNING_LIMIT in thresholds.h to %ld\n", high); exit(1); } a = (unsigned long *) malloc(high * sizeof(unsigned long)); b = (unsigned long *) malloc(high * sizeof(unsigned long)); c = (unsigned long *) malloc(2 * high * sizeof(unsigned long)); d = (unsigned long *) malloc(2 * high * sizeof(unsigned long)); t = (unsigned long *) malloc(gf2x_toomspace(high) * sizeof(unsigned long)); int count = 0; /* S[i] is the sum of the log of the timing for method 'i', and nb[i] is the # of times method 'i' was tuned. We use i=255 for the best times. */ double S[256] = {0, }; int nb[256] = {0, }; for (n = BESTMIN + 1; n <= high;) { if (count++ % 10 == 0) #ifdef HAVE_KARAX printf (" TC2 TC2X TC3 TC3W TC3X TC4 best\n"); #else printf (" TC2 TC3 TC3W TC4 best\n"); #endif TK[0] = TKX[0] = T3[0] = TW[0] = T3X[0] = T4[0] = 0.0; printf("%ld ", n); fflush(stdout); srandom(1); random_wordstring(a, n); random_wordstring(b, n); if (n >= GF2X_MUL_KARA_THRESHOLD) { TIME(TK[0], gf2x_mul_kara(c, a, b, n, t)); nb[GF2X_SELECT_KARA] ++; S[GF2X_SELECT_KARA] += log (TK[0]); } #ifdef HAVE_KARAX if (n >= MINI_GF2X_MUL_KARAX_THRESHOLD) { TIME(TKX[0], gf2x_mul_karax(d, a, b, n, t)); check(a, n, b, n, "Kara", c, "TC2X", d); nb[GF2X_SELECT_KARAX] ++; S[GF2X_SELECT_KARAX] += log (TKX[0]); } #endif if (n >= MINI_GF2X_MUL_TOOM_THRESHOLD) { TIME(T3[0], gf2x_mul_tc3(d, a, b, n, t)); check(a, n, b, n, "Kara", c, "TC3", d); nb[GF2X_SELECT_TC3] ++; S[GF2X_SELECT_TC3] += log (T3[0]); } if (n >= MINI_GF2X_MUL_TOOMW_THRESHOLD) { TIME(TW[0], gf2x_mul_tc3w(d, a, b, n, t)); check(a, n, b, n, "Kara", c, "TC3W", d); nb[GF2X_SELECT_TC3W] ++; S[GF2X_SELECT_TC3W] += log (TW[0]); } #ifdef HAVE_KARAX if (n >= MINI_GF2X_MUL_TC3X_THRESHOLD) { TIME(T3X[0], gf2x_mul_tc3x(d, a, b, n, t)); check(a, n, b, n, "Kara", c, "TC3X", d); nb[GF2X_SELECT_TC3X] ++; S[GF2X_SELECT_TC3X] += log (T3X[0]); } #endif if (n >= MINI_GF2X_MUL_TOOM4_THRESHOLD) { TIME(T4[0], gf2x_mul_tc4(d, a, b, n, t)); check(a, n, b, n, "Kara", c, "TC4", d); nb[GF2X_SELECT_TC4] ++; S[GF2X_SELECT_TC4] += log (T4[0]); } #ifdef HAVE_KARAX printf ("%1.2e %1.2e %1.2e %1.2e %1.2e %1.2e ", TK[0], TKX[0], T3[0], TW[0], T3X[0], T4[0]); #else printf ("%1.2e %1.2e %1.2e %1.2e ", TK[0], T3[0], TW[0], T4[0]); #endif mint = TK[0]; k = GF2X_SELECT_KARA; #ifdef HAVE_KARAX if ((TKX[0] < mint) && (n >= MINI_GF2X_MUL_KARAX_THRESHOLD)) { mint = TKX[0]; k = GF2X_SELECT_KARAX; } #endif if ((T3[0] < mint) && (n >= MINI_GF2X_MUL_TOOM_THRESHOLD)) { mint = T3[0]; k = GF2X_SELECT_TC3; } if ((TW[0] < mint) && (n >= MINI_GF2X_MUL_TOOMW_THRESHOLD)) { mint = TW[0]; k = GF2X_SELECT_TC3W; } #ifdef HAVE_KARAX if ((T3X[0] < mint) && (n >= MINI_GF2X_MUL_TC3X_THRESHOLD)) { mint = T3X[0]; k = GF2X_SELECT_TC3X; } #endif if ((T4[0] < mint) && (n >= MINI_GF2X_MUL_TOOM4_THRESHOLD)) { mint = T4[0]; k = GF2X_SELECT_TC4; } nb[255] ++; S[255] += log (mint); printf("%1.2e %s\n", mint, gf2x_toom_select_string[k]); fprintf(rp, "toom %ld %d\n", n, k); fflush(stdout); long nn = MAX(n * mulstep, n + 1); for( ; n < nn && n <= high ; n++) best_tab[n - 1] = k; } #ifdef HAVE_KARAX printf ("avg %1.2e %1.2e %1.2e %1.2e %1.2e %1.2e %1.2e\n", exp (S[GF2X_SELECT_KARA] / nb[GF2X_SELECT_KARA]), exp (S[GF2X_SELECT_KARAX] / nb[GF2X_SELECT_KARAX]), exp (S[GF2X_SELECT_TC3] / nb[GF2X_SELECT_TC3]), exp (S[GF2X_SELECT_TC3W] / nb[GF2X_SELECT_TC3W]), exp (S[GF2X_SELECT_TC3X] / nb[GF2X_SELECT_TC3X]), exp (S[GF2X_SELECT_TC4] / nb[GF2X_SELECT_TC4]), exp (S[255] / nb[255])); #else printf ("avg %1.2e %1.2e %1.2e %1.2e %1.2e\n", exp (S[GF2X_SELECT_KARA] / nb[GF2X_SELECT_KARA]), exp (S[GF2X_SELECT_TC3] / nb[GF2X_SELECT_TC3]), exp (S[GF2X_SELECT_TC3W] / nb[GF2X_SELECT_TC3W]), exp (S[GF2X_SELECT_TC4] / nb[GF2X_SELECT_TC4]), exp (S[255] / nb[255])); #endif free(a); free(b); free(c); free(d); free(t); return; } /* Forms c := a*b where b has size sb, a has size sa = (sb+1)/2 (words), representing polynomials over GF(2). c needs space for sa+sb words. Needs space 2*sa + gf2x_toomspace(sa) words in stk[0] ... The code is essentially the same as in HalfGCD.c */ static void gf2x_mul21(unsigned long *c, const unsigned long *b, long sb, const unsigned long *a, unsigned long *stk) { long i, j; long sa = (sb + 1) / 2; long sc = sa + sb; unsigned long *v; v = stk; stk += 2 * sa; for (i = 0; i < sc; i++) c[i] = 0; do { if (sa == 0) break; if (sa == 1) { c[sb] ^= gf2x_addmul_1_n(c, c, b, sb, a[0]); break; } for (i = 0; i + sa <= sb; i += sa) { gf2x_mul_toom(v, a, b + i, sa, stk); // Generic Toom-Cook mult. for (j = 0; j < 2 * sa; j++) c[i + j] ^= v[j]; } { const unsigned long *t; t = a; a = b + i; b = t; } { long t; t = sa; sa = sb - i; sb = t; } c = c + i; } while (1); } void checku(const unsigned long *a, const unsigned long *b, long n) { long i; for (i = 0; i < n; i++) { if (a[i] == b[i]) continue; fprintf(stderr, "Error detected: mul_toom3u and " "default give different results\n"); printf("index %ld\n", i); exit(1); } } void tuneutoom(long tabsz) { long high; int k; double T3[1], TK[1]; double mint; unsigned long *a, *b, *c, *d, *t; high = tabsz; if (high < BESTMINU) high = BESTMINU; if (high > GF2X_TOOM_TUNING_LIMIT) { fprintf(stderr, "Increase constant GF2X_TOOM_TUNING_LIMIT in thresholds.c to %ld\n", high); exit(1); } long sa = high; long sb = (sa + 1) / 2; long sp1 = gf2x_toomuspace(sa); // space for mul_toom3u long sp2 = gf2x_toomspace(sb) + 2 * sb; // space for mul21 long sp = (sp1 > sp2) ? sp1 : sp2; a = (unsigned long *) malloc(sa * sizeof(unsigned long)); b = (unsigned long *) malloc(sb * sizeof(unsigned long)); c = (unsigned long *) malloc(3 * sb * sizeof(unsigned long)); d = (unsigned long *) malloc(3 * sb * sizeof(unsigned long)); t = (unsigned long *) malloc(sp * sizeof(unsigned long)); for (sa = BESTMINU + 1; sa <= high; ) { sb = (sa + 1) / 2; random_wordstring(a, sa); random_wordstring(b, sb); TK[0] = T3[0] = 0.0; printf("%ld ", sa); fflush(stdout); TIME(TK[0], gf2x_mul21(c, a, sa, b, t)); #if GPL_CODE_PRESENT if (sa >= MINI_GF2X_MUL_TOOMU_THRESHOLD) { TIME(T3[0], gf2x_mul_tc3u(d, a, sa, b, t)); checku(c, d, sa + sb); } #endif /* GPL_CODE_PRESENT */ printf("default:%1.2e TC3U:%1.2e ", TK[0], T3[0]); mint = TK[0]; k = GF2X_SELECT_UNB_DFLT; if ((T3[0] < mint) && (sa >= MINI_GF2X_MUL_TOOMU_THRESHOLD)) { mint = T3[0]; k = GF2X_SELECT_UNB_TC3U; } printf("best:%1.2e %s\n", mint, gf2x_utoom_select_string[k]); fflush(stdout); fprintf(rp, "utoom %ld %d\n", sa, k); long nn = MAX(sa * mulstep, sa + 1); for( ; sa < nn && sa <= high ; sa++) best_utab[sa - 1] = k; } free(a); free(b); free(c); free(d); free(t); return; } void usage(int rc) { FILE * f = rc ? stderr : stdout; fprintf(f, "Usage: tunetoom [options] table-size1 [table-size2]\n"); fprintf(f, " where %d <= table-size1 <= %d\n", BESTMIN, GF2X_TOOM_TUNING_LIMIT); fprintf(f, " and %d <= table-size2 <= %d\n", BESTMINU, GF2X_TOOM_TUNING_LIMIT); fprintf(f, "Allowed options:\n"); fprintf(f, "\t-s \n"); fprintf(f, "\t-o (default is stdout or file desc. 3)\n"); exit(rc); } int main(int argc, char *argv[]) { long tabsz1 = 0, tabsz2 = 0; int nsz = 0; char * progname = argc ? argv[0] : ""; argc--,argv++; for( ; argc ; argc--,argv++) { int r; if (strcmp(argv[0], "--help") == 0) { usage(0); } r = handle_tuning_mulstep(&argc, &argv); if (r < 0) usage(1); else if (r) continue; r = handle_tuning_outfile(&argc, &argv); if (r < 0) usage(1); else if (r) continue; if (nsz == 0) { tabsz1 = tabsz2 = atoi(argv[0]); nsz++; continue; } if (nsz == 1) { tabsz2 = atoi(argv[0]); nsz++; continue; } usage(1); } if (nsz == 0) usage(1); set_clock_resolution (); if (MINTIME >= 0.5 && mulstep == 1.0) mulstep = 1.05; set_tuning_output(); { char date[40]; time_t t; size_t u; struct utsname buf; time(&t); ctime_r(&t, date); u = strlen(date); for(;u && isspace(date[u-1]);date[--u]='\0'); uname(&buf); /* strip the dirname */ char * ptr = strrchr(progname, '/'); if (ptr) { ptr++; } else { ptr = progname; } fprintf(rp, "info-toom \"%s -s %.2f %ld %ld run on %s on %s\"\n", ptr,mulstep,tabsz1,tabsz2,buf.nodename,date); } tunetoom(tabsz1); // Tune balanced routines tuneutoom(tabsz2); // Tune unbalanced routines fflush(stdout); close_tuning_output (); return 0; } /* vim: set sw=4 sta et: */ gf2x-1.2/src/generate-test-list.pl0000755000327606072450000001004212725540356014040 00000000000000#!/usr/bin/perl # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2011, 2012 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. use warnings; use strict; my $fragment = ''; while (<>) { if (/^# -- begin generated code --$/) { print; print $fragment; while (<>) { if (/^# -- end generated code --$/) { print; last; } } next; } if (!/^#\*/) { print; next; } /^#\*\s*(.*)$/ or die; my $cmd = $1; $cmd =~ s/(\S*)\{(\d+)\.\.(\d+)\}(\S*)/join(" ", map { "$1$_$4" } ($2..$3))/gex; if ($cmd =~ /^test_sizes ([\d\s]+)$/) { my @sizes = split(' ', $1); for my $x (@sizes) { $fragment .= < tuning_undefs_$x.h tuneup_$x.c: \$(srcdir)/tuneup_pre.c ; sed -e s/\@\@SIZE\@\@/$x/g < \$(srcdir)/tuneup_pre.c > tuneup_$x.c tuneup_$x.\$(OBJEXT): tuning_undefs_$x.h BUILT_SOURCES +=tuneup_$x.c tuning_undefs_$x.h EXTRA_LTLIBRARIES+=libtuneup-s$x.la nodist_libtuneup_s${x}_la_SOURCES=tuneup_$x.c tuning_undefs_$x.h libtuneup_s${x}_la_CPPFLAGS=-I\$(top_builddir) -I\$(top_srcdir) CLEANFILES+=tuning_undefs_$x.h DISTCLEANFILES+=tuning_undefs_$x.h EOF $fragment .= "\n"; } } elsif ($cmd =~ /^test\s+(.*)/) { my $funcs = $1; for my $f (split(' ', $funcs)) { $f =~ /^((?:gen_)?mul(\d+)\w+)$/ or die; my $code=$1; my $size=$2; if ($code =~ /^gen/) { $code =~ /w(\d+)k(\d+)/ or die; my $w = $1; my $k = $2; $fragment .= < \$@ BUILT_SOURCES+=$code.c EOF } else { $fragment .= < #include #include #include #include #include /* gf2x is used for checking correctness -- not otherwise */ #include "gf2x.h" #include "timing.h" #include "tuning_undefs_@@SIZE@@.h" // make it somewhat realistic. #define N (1 << 16) #define NMASK ((N)-1) #if @@SIZE@@ == 1 extern void gf2x_mul@@SIZE@@(unsigned long *c, unsigned long a, unsigned long b); #else extern void gf2x_mul@@SIZE@@(unsigned long *c, const unsigned long *a, const unsigned long *b); #endif int main(int argc, char *argv[]) { unsigned long i, *c0, *c, *a, *b; uint64_t st; char *benchtime; uint64_t btime = 1000000; char * progname = "me"; if (argc >= 1) { progname = argv[0]; } benchtime = getenv("GF2X_TUNE_LOWLEVEL_TIME"); if (benchtime != NULL) { btime = strtol(benchtime, (char **)NULL, 10); if (btime < 1000 || btime > 100000000) { fprintf(stderr, "Warning: unrealistic GF2X_TUNE_LOWLEVEL_TIME, "); fprintf(stderr, "set back to default\n"); btime = 1000000; } } a = (unsigned long *) malloc((N + @@SIZE@@) * sizeof(unsigned long)); b = (unsigned long *) malloc((N + @@SIZE@@) * sizeof(unsigned long)); c = (unsigned long *) malloc(2 * @@SIZE@@ * sizeof(unsigned long)); c0 = (unsigned long *) malloc(2 * @@SIZE@@ * sizeof(unsigned long)); for (i = 0; i < N + @@SIZE@@; i++) { a[i] = (unsigned long) rand(); b[i] = (unsigned long) rand(); } st = 0; for (i = 0; i < 10 && i < N; i++) { /* Use this one as a reference implementation */ gf2x_mul(c0, a + i, @@SIZE@@, b + i, @@SIZE@@); st -= microseconds(); #if @@SIZE@@ == 1 gf2x_mul@@SIZE@@ (c, a[i & NMASK], b[i & NMASK]); #else gf2x_mul@@SIZE@@ (c, a + (i & NMASK), b + (i & NMASK)); #endif st += microseconds(); if (memcmp(c, c0, 2 * @@SIZE@@ * sizeof(unsigned long)) != 0) { unsigned long i; fprintf (stderr, "Error, computed test values do not match\n"); fprintf (stderr, "a="); for (i = 0; i < @@SIZE@@; i++) fprintf (stderr, "%lu ", a[i]); fprintf (stderr, "\n"); fprintf (stderr, "b="); for (i = 0; i < @@SIZE@@; i++) fprintf (stderr, "%lu ", b[i]); fprintf (stderr, "\n"); fprintf (stderr, "gf2x_mul gives:\n"); for (i = 0; i < 2 * @@SIZE@@; i++) fprintf (stderr, "%lu ", c0[i]); fprintf (stderr, "\n"); fprintf (stderr, "gf2x_mul@@SIZE@@ gives:\n"); for (i = 0; i < 2 * @@SIZE@@; i++) fprintf (stderr, "%lu ", c[i]); fprintf (stderr, "\n"); exit (255); } } uint64_t m = i; /* arrange for the measure to take at least .1 seconds */ for( ; ; ) { st = -microseconds(); for (i = 0; i < m; i++) { #if @@SIZE@@ == 1 gf2x_mul@@SIZE@@ (c, a[i & NMASK], b[i & NMASK]); #else gf2x_mul@@SIZE@@ (c, a + (i & NMASK), b + (i & NMASK)); #endif } st += microseconds(); if (st >= btime) break; m *= 3; } printf("%s : %1.1f ns\n", progname, (double) st / (double) m * 1.0e3); free(c0); free(c); free(b); free(a); return 0; } gf2x-1.2/src/tuning_undef_wrapper.h0000644000327606072450000000335312725540356014365 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This header file is unprotected on purpose */ #if TUNING == 1 #include "tuning_undefs_1.h" #elif TUNING == 2 #include "tuning_undefs_2.h" #elif TUNING == 3 #include "tuning_undefs_3.h" #elif TUNING == 4 #include "tuning_undefs_4.h" #elif TUNING == 5 #include "tuning_undefs_5.h" #elif TUNING == 6 #include "tuning_undefs_6.h" #elif TUNING == 7 #include "tuning_undefs_7.h" #elif TUNING == 8 #include "tuning_undefs_8.h" #elif TUNING == 9 #include "tuning_undefs_9.h" #endif gf2x-1.2/src/tuning_undefs_pre.h0000644000327606072450000000627512725540357013665 00000000000000/* This file is part of the gf2x library. Copyright 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TUNING_UNDEFS_@@SIZE@@_H_ #define TUNING_UNDEFS_@@SIZE@@_H_ #ifdef __cplusplus extern "C" { #endif /* Tuning code does two things. It uses the gf2x library, compiled with * its default settings, and it tries as well other candidate functions, * to see if performance improves. The trick is that the code for these * functions is also valid code for the library include files. Therefore, * the ``candidate functions'' must not have the same name as in the gf2x * library, because otherwise we could end up with two different * definitions for the same code, and ambiguity as to what gf2x_mul_X * stands for: the library code, or the function we are currently testing ? */ /* First we include the gf2x standard inlines. Not necessarily because we * need them, but rather because we might have seen a prototype for one * of these with static declaration. Therefore we need the code. * Including it here causes declaration for the standard functions to be * emitted, since this header is protected: when gf2x-small.h includes * gf2x/gf2x_mul@@SIZE@@.h, the file _is_ read due to the fact that we * undefine the protection flag below. However this file * tuning_undefs_@@SIZE@@.h is not included again. */ #undef GF2X_MUL@@SIZE@@_H_ #include "gf2x/gf2x_mul@@SIZE@@.h" /* Now we undefine this flag, so that it is possible to re-include * another function for doing mul@@SIZE@@ */ #define gf2x_mul@@SIZE@@ tuning_gf2x_mul@@SIZE@@ #undef GF2X_FUNC #define GF2X_FUNC(x) tuning_ ## x #undef GF2X_STORAGE_CLASS_mul@@SIZE@@ #define GF2X_STORAGE_CLASS_mul@@SIZE@@ /**/ #if @@SIZE@@ == 1 #define gf2x_mul_1_n tuning_gf2x_mul_1_n #define gf2x_addmul_1_n tuning_gf2x_addmul_1_n #undef GF2X_STORAGE_CLASS_mul_1_n #define GF2X_STORAGE_CLASS_mul_1_n /**/ #undef GF2X_STORAGE_CLASS_addmul_1_n #define GF2X_STORAGE_CLASS_addmul_1_n /**/ #endif #ifdef __cplusplus } #endif #endif /* TUNING_UNDEFS_@@SIZE@@_H_ */ gf2x-1.2/src/tune-lowlevel.pl0000755000327606072450000001243212725540356013127 00000000000000#!/usr/bin/perl -w # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2012, 2013, 2015, 2016 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. use warnings; use strict; sub usage { die "Usage: ./tune-lowlevel.pl \n"; } my %sizes=(); for my $x (@ARGV) { $x =~ /^tune_/ or die "Bad test program $x"; $x =~ /mul(\d)/ or die "Bad test program $x"; my $s=$1; if (!exists $sizes{$s}) { $sizes{$s}=[]; } push @{$sizes{$s}}, $x; } sub mysys { print STDERR "@_\n"; system @_; } my $make; if (!defined($make=$ENV{'MAKE'})) { $make="$make"; } # make sure the upper build is complete. It might be bad to do this # check, but since this script is bound to call make anyway... mysys "cd .. ; $make"; my @summary = (); for my $s (sort { $a <=> $b } keys %sizes) { print STDERR "Tuning for $s word(s)\n"; # Now we check everything, always. # if (scalar @{$sizes{$s}} == 1 && !defined($ENV{'BENCH'})) { # (my $x = $sizes{$s}->[0]) =~ s/^tune_//; # print STDERR "Only one possibility ($x) -- check skipped\n"; # push @summary, "mul$s -> $x.c (only choice)\n"; # next; # } my @results; print STDERR "Building the library afresh with current code selection.\n"; mysys "cd .. ; $make clean"; mysys "cd .. ; $make"; for my $p (@{$sizes{$s}}) { mysys "$make $p"; my $r = `./$p`; chomp($r); print STDERR "$r\n"; $r =~ /^(.*)\s:\s([\d\.]+)\sns$/; die "$p returned no results" unless defined($1) && defined($2); push @results, [$1, $2]; } @results = sort { $a->[1] <=> $b->[1] } @results; my $best = $results[0]; $best->[0] =~ /tune_(.*)$/ or die; my $selected="$1.c"; print STDERR "Selected $selected\n"; my $keep_already_selected; my $ltarget="already_tuned/tuned/gf2x_mul$s.h"; my $slot="gf2x/gf2x_mul$s.h"; my $link_target_in_already_tuned_subdir; for my $r (@results) { $r->[0] =~ /tune_(.*)$/ or die; my $cfile = $1 . ".c"; my $msg = "mul$s -> $cfile [ $r->[1] ns ]"; if ($r == $best) { $msg .= " **BEST**"; } my $xxlink_target_in_already_tuned_subdir = "../../lowlevel/$cfile"; # Arrange so that $cfile is something reachable for us, and also # so that $xxlink_target_in_already_tuned_subdir is reachable from the # already_tuned/tuned subdirectory. if (! -f $cfile) { my $e; if (defined($e=$ENV{'abs_srcdir'}) && -f "$e/../lowlevel/$cfile") { # We are building out of source, so we resort to putting an # absolute path in the link target. $xxlink_target_in_already_tuned_subdir="$e/../lowlevel/$cfile"; $cfile = "$e/../lowlevel/$cfile"; } else { die "Cannot find $cfile anywhere !" } } # my $prepared="ready_gf2x_mul$s.c"; # mysys "sed -e s///g $selected > $prepared"; # print "diff ../$slot $cfile\n"; my $rc=system "diff ../$slot $cfile > /dev/null"; if ($rc == 0) { $msg .= " (previous)"; if ($r == $best) { $msg .= " -> no change"; $keep_already_selected = 1; } } if ($r == $best) { $selected = $cfile; $link_target_in_already_tuned_subdir = $xxlink_target_in_already_tuned_subdir; } push @summary, $msg . "\n"; } if ($keep_already_selected) { next; } mkdir "../already_tuned" unless -d "../already_tuned"; mkdir "../already_tuned/tuned" unless -d "../already_tuned/tuned"; # Show the commands at the same time as we execute them. mysys "rm -f ../$slot"; mysys "rm -f ../$ltarget"; if ($selected =~ /gen_/) { # generated file: do a copy, not a link. mysys "cp -f $selected ../$ltarget"; } else { mysys "ln -sf $link_target_in_already_tuned_subdir ../$ltarget"; } mysys "ln -sf ../$ltarget ../$slot"; } print STDERR "Summary of tune-lowlevel results\n"; for my $m (@summary) { print STDERR $m; } gf2x-1.2/tests/0000755000327606072450000000000013126452067010413 500000000000000gf2x-1.2/tests/Makefile.am0000644000327606072450000003216613125162152012367 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. # Be aware that ``make check'' from here cannot ensure that the # upper-level library is up-to-date. AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/fft -I$(top_srcdir)/fft/mpfq -I$(top_builddir) AM_LDFLAGS = -no-install check_PROGRAMS=check-addmul check_addmul_SOURCES=check-addmul.c check_addmul_LDADD=$(top_builddir)/libgf2x.la SYNTHESIZED_TESTS = TESTS = check-addmul TEST_EXTENSIONS = EXTRA_DIST=test-tools.h check-and-bench-common.h ############# mul checks check_PROGRAMS += check-mul check_mul_SOURCES=check-mul.c test-tools.c check_mul_LDADD=$(top_builddir)/libgf2x.la SYNTHESIZED_TESTS += \ check_1_1_1_819ea234.mul \ check_2_2_1_928e7e94.mul \ check_3_3_1_14aac2f1.mul \ check_4_4_1_fbc8042f.mul \ check_5_5_1_049e6e28.mul \ check_6_6_1_f7fa48ac.mul \ check_7_7_1_39d1a8b9.mul \ check_8_8_1_11334230.mul \ check_9_9_1_a499e414.mul \ check_20_20_1_d40a21e3.mul \ check_100_20_1_6dc5ac13.mul \ check_100_100_1_5094c182.mul \ check_1000_20_1_6ce07fed.mul \ check_1000_100_1_08825281.mul \ check_1000_1000_1_c28bc2e3.mul # Do more tests only on 64-bit machines. if WORDSIZE_IS_64 SYNTHESIZED_TESTS += \ check_5437_20_1_ad84f617.mul \ check_5437_100_1_8eb064ef.mul \ check_5437_1000_1_c546a34c.mul \ check_5437_5437_1_f09c5936.mul \ check_10000_20_1_4d3b9b2d.mul \ check_10000_100_1_f2e7cc20.mul \ check_10000_1000_1_3b8778b1.mul \ check_10000_5437_1_b337c8eb.mul \ check_10000_10000_1_2706ca53.mul \ check_832040_1346269_1_8513d1fb.mul \ check_785672_1271244_1_842e0d19.mul endif TEST_EXTENSIONS += .mul # We'll run the *.mul tests above as: # ./do-check-mul.sh -m check_10000_5437_64751d23.mul MUL_LOG_COMPILER = $(srcdir)/do-check-mul.sh AM_MUL_LOG_FLAGS = -b $(builddir) -m ############# fft interface checks general_fftcheck_sources=check.c \ check-and-bench-common.c \ test-tools.c # This must be exactly the same list of configurations as in fft/Makefile.am # the flags WITHOUT_CANTOR_TRUNCATION, CANTOR_GM, and CANTOR_GM_TRUNCATE # are irrelevant here, but we lazily copy the config block from # fft/Makefile.am CCOMMON=-DENGINE_CANTOR -DESCAPE_CANTOR_SYMBOLS C64=$(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=64 C64nt=$(C64) -DWITHOUT_CANTOR_TRUNCATION C64gm=$(C64) -DCANTOR_GM C64gmt=$(C64gm) -DCANTOR_GM_TRUNCATE C128=$(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=128 C128nt=$(C128) -DWITHOUT_CANTOR_TRUNCATION C128gm=$(C128) -DCANTOR_GM C128gmt=$(C128gm) -DCANTOR_GM_TRUNCATE TERNARY=-DENGINE_TERNARY TERNARY_NS=-DENGINE_TERNARY -DARTIFICIAL_NON_SPLIT_VERSION # The list of tests is auto-generated with perl, and edited afterwards. # The edits are: # - link check_ternaryns with libternary (since this is the same # library, really). # - add bench_ternary (introduced 7b9a9b45) # -- begin pattern -- # check_PROGRAMS+=check_ARG0 # check_ARG0_SOURCES=$(general_fftcheck_sources) # check_ARG0_CFLAGS=$(AM_CFLAGS) ARG1 # check_ARG0_LDADD=$(top_builddir)/fft/libARG0.la # SYNTHESIZED_TESTS+= \ # check_ARG0_1000_1_c28bc2e3.fft \ # check_ARG0_1000_2_77db95cc.fft \ # check_ARG0_1000_3_6dc06b2f.fft # if WORDSIZE_IS_64 # SYNTHESIZED_TESTS+= \ # check_ARG0_10000_1_2706ca53.fft \ # check_ARG0_10000_2_3f32a516.fft \ # check_ARG0_10000_3_fd7bba07.fft \ # check_ARG0_100000_1_fca70ced.fft \ # check_ARG0_100000_2_cd1293a5.fft \ # check_ARG0_100000_3_91e7d307.fft # endif # -- end pattern -- # -- begin arguments -- # ternary $(TERNARY) # ternaryns $(TERNARY_NS) # if ENABLE_FFT_INTERFACE # cantor64 $(C64) # cantor64nt $(C64nt) # cantor64gm $(C64gm) # cantor64gmt $(C64gmt) # cantor128 $(C128) # cantor128nt $(C128nt) # cantor128gm $(C128gm) # cantor128gmt $(C128gmt) # endif # -- end arguments -- # -- begin generated code -- check_PROGRAMS+=check_ternary check_ternary_SOURCES=$(general_fftcheck_sources) check_ternary_CFLAGS=$(AM_CFLAGS) $(TERNARY) check_ternary_LDADD=$(top_builddir)/fft/libternary.la check_PROGRAMS+=bench_ternary bench_ternary_SOURCES=bench.c check-and-bench-common.c test-tools.c bench_ternary_CFLAGS=$(AM_CFLAGS) $(TERNARY) bench_ternary_LDADD=$(top_builddir)/fft/libternary.la SYNTHESIZED_TESTS+= \ check_ternary_1000_1_c28bc2e3.fft \ check_ternary_1000_2_77db95cc.fft \ check_ternary_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_ternary_10000_1_2706ca53.fft \ check_ternary_10000_2_3f32a516.fft \ check_ternary_10000_3_fd7bba07.fft \ check_ternary_100000_1_fca70ced.fft \ check_ternary_100000_2_cd1293a5.fft \ check_ternary_100000_3_91e7d307.fft endif check_PROGRAMS+=check_ternaryns check_ternaryns_SOURCES=$(general_fftcheck_sources) check_ternaryns_CFLAGS=$(AM_CFLAGS) $(TERNARY_NS) check_ternaryns_LDADD=$(top_builddir)/fft/libternary.la SYNTHESIZED_TESTS+= \ check_ternaryns_1000_1_c28bc2e3.fft \ check_ternaryns_1000_2_77db95cc.fft \ check_ternaryns_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_ternaryns_10000_1_2706ca53.fft \ check_ternaryns_10000_2_3f32a516.fft \ check_ternaryns_10000_3_fd7bba07.fft \ check_ternaryns_100000_1_fca70ced.fft \ check_ternaryns_100000_2_cd1293a5.fft \ check_ternaryns_100000_3_91e7d307.fft endif if ENABLE_FFT_INTERFACE check_PROGRAMS+=check_cantor64 check_cantor64_SOURCES=$(general_fftcheck_sources) check_cantor64_CFLAGS=$(AM_CFLAGS) $(C64) check_cantor64_LDADD=$(top_builddir)/fft/libcantor64.la SYNTHESIZED_TESTS+= \ check_cantor64_1000_1_c28bc2e3.fft \ check_cantor64_1000_2_77db95cc.fft \ check_cantor64_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor64_10000_1_2706ca53.fft \ check_cantor64_10000_2_3f32a516.fft \ check_cantor64_10000_3_fd7bba07.fft \ check_cantor64_100000_1_fca70ced.fft \ check_cantor64_100000_2_cd1293a5.fft \ check_cantor64_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor64nt check_cantor64nt_SOURCES=$(general_fftcheck_sources) check_cantor64nt_CFLAGS=$(AM_CFLAGS) $(C64nt) check_cantor64nt_LDADD=$(top_builddir)/fft/libcantor64nt.la SYNTHESIZED_TESTS+= \ check_cantor64nt_1000_1_c28bc2e3.fft \ check_cantor64nt_1000_2_77db95cc.fft \ check_cantor64nt_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor64nt_10000_1_2706ca53.fft \ check_cantor64nt_10000_2_3f32a516.fft \ check_cantor64nt_10000_3_fd7bba07.fft \ check_cantor64nt_100000_1_fca70ced.fft \ check_cantor64nt_100000_2_cd1293a5.fft \ check_cantor64nt_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor64gm check_cantor64gm_SOURCES=$(general_fftcheck_sources) check_cantor64gm_CFLAGS=$(AM_CFLAGS) $(C64gm) check_cantor64gm_LDADD=$(top_builddir)/fft/libcantor64gm.la SYNTHESIZED_TESTS+= \ check_cantor64gm_1000_1_c28bc2e3.fft \ check_cantor64gm_1000_2_77db95cc.fft \ check_cantor64gm_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor64gm_10000_1_2706ca53.fft \ check_cantor64gm_10000_2_3f32a516.fft \ check_cantor64gm_10000_3_fd7bba07.fft \ check_cantor64gm_100000_1_fca70ced.fft \ check_cantor64gm_100000_2_cd1293a5.fft \ check_cantor64gm_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor64gmt check_cantor64gmt_SOURCES=$(general_fftcheck_sources) check_cantor64gmt_CFLAGS=$(AM_CFLAGS) $(C64gmt) check_cantor64gmt_LDADD=$(top_builddir)/fft/libcantor64gmt.la SYNTHESIZED_TESTS+= \ check_cantor64gmt_1000_1_c28bc2e3.fft \ check_cantor64gmt_1000_2_77db95cc.fft \ check_cantor64gmt_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor64gmt_10000_1_2706ca53.fft \ check_cantor64gmt_10000_2_3f32a516.fft \ check_cantor64gmt_10000_3_fd7bba07.fft \ check_cantor64gmt_100000_1_fca70ced.fft \ check_cantor64gmt_100000_2_cd1293a5.fft \ check_cantor64gmt_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor128 check_cantor128_SOURCES=$(general_fftcheck_sources) check_cantor128_CFLAGS=$(AM_CFLAGS) $(C128) check_cantor128_LDADD=$(top_builddir)/fft/libcantor128.la SYNTHESIZED_TESTS+= \ check_cantor128_1000_1_c28bc2e3.fft \ check_cantor128_1000_2_77db95cc.fft \ check_cantor128_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor128_10000_1_2706ca53.fft \ check_cantor128_10000_2_3f32a516.fft \ check_cantor128_10000_3_fd7bba07.fft \ check_cantor128_100000_1_fca70ced.fft \ check_cantor128_100000_2_cd1293a5.fft \ check_cantor128_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor128nt check_cantor128nt_SOURCES=$(general_fftcheck_sources) check_cantor128nt_CFLAGS=$(AM_CFLAGS) $(C128nt) check_cantor128nt_LDADD=$(top_builddir)/fft/libcantor128nt.la SYNTHESIZED_TESTS+= \ check_cantor128nt_1000_1_c28bc2e3.fft \ check_cantor128nt_1000_2_77db95cc.fft \ check_cantor128nt_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor128nt_10000_1_2706ca53.fft \ check_cantor128nt_10000_2_3f32a516.fft \ check_cantor128nt_10000_3_fd7bba07.fft \ check_cantor128nt_100000_1_fca70ced.fft \ check_cantor128nt_100000_2_cd1293a5.fft \ check_cantor128nt_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor128gm check_cantor128gm_SOURCES=$(general_fftcheck_sources) check_cantor128gm_CFLAGS=$(AM_CFLAGS) $(C128gm) check_cantor128gm_LDADD=$(top_builddir)/fft/libcantor128gm.la SYNTHESIZED_TESTS+= \ check_cantor128gm_1000_1_c28bc2e3.fft \ check_cantor128gm_1000_2_77db95cc.fft \ check_cantor128gm_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor128gm_10000_1_2706ca53.fft \ check_cantor128gm_10000_2_3f32a516.fft \ check_cantor128gm_10000_3_fd7bba07.fft \ check_cantor128gm_100000_1_fca70ced.fft \ check_cantor128gm_100000_2_cd1293a5.fft \ check_cantor128gm_100000_3_91e7d307.fft endif check_PROGRAMS+=check_cantor128gmt check_cantor128gmt_SOURCES=$(general_fftcheck_sources) check_cantor128gmt_CFLAGS=$(AM_CFLAGS) $(C128gmt) check_cantor128gmt_LDADD=$(top_builddir)/fft/libcantor128gmt.la SYNTHESIZED_TESTS+= \ check_cantor128gmt_1000_1_c28bc2e3.fft \ check_cantor128gmt_1000_2_77db95cc.fft \ check_cantor128gmt_1000_3_6dc06b2f.fft if WORDSIZE_IS_64 SYNTHESIZED_TESTS+= \ check_cantor128gmt_10000_1_2706ca53.fft \ check_cantor128gmt_10000_2_3f32a516.fft \ check_cantor128gmt_10000_3_fd7bba07.fft \ check_cantor128gmt_100000_1_fca70ced.fft \ check_cantor128gmt_100000_2_cd1293a5.fft \ check_cantor128gmt_100000_3_91e7d307.fft endif endif # -- end generated code -- TEST_EXTENSIONS += .fft # We'll run the *.fft tests above as: # ./do-check-fft.sh -m check_cantor64_100_1_00000000.fft FFT_LOG_COMPILER = $(srcdir)/do-check-fft.sh AM_FFT_LOG_FLAGS=-b $(builddir) -m $(SYNTHESIZED_TESTS) : ; @touch $@ TESTS += $(SYNTHESIZED_TESTS) EXTRA_DIST+=do-check-mul.sh do-check-fft.sh gf2x-1.2/tests/Makefile.in0000644000327606072450000040353513126452055012407 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. # Be aware that ``make check'' from here cannot ensure that the # upper-level library is up-to-date. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = check-addmul$(EXEEXT) check-mul$(EXEEXT) \ check_ternary$(EXEEXT) bench_ternary$(EXEEXT) \ check_ternaryns$(EXEEXT) $(am__EXEEXT_1) TESTS = check-addmul$(EXEEXT) $(SYNTHESIZED_TESTS) # Do more tests only on 64-bit machines. @WORDSIZE_IS_64_TRUE@am__append_1 = \ @WORDSIZE_IS_64_TRUE@ check_5437_20_1_ad84f617.mul \ @WORDSIZE_IS_64_TRUE@ check_5437_100_1_8eb064ef.mul \ @WORDSIZE_IS_64_TRUE@ check_5437_1000_1_c546a34c.mul \ @WORDSIZE_IS_64_TRUE@ check_5437_5437_1_f09c5936.mul \ @WORDSIZE_IS_64_TRUE@ check_10000_20_1_4d3b9b2d.mul \ @WORDSIZE_IS_64_TRUE@ check_10000_100_1_f2e7cc20.mul \ @WORDSIZE_IS_64_TRUE@ check_10000_1000_1_3b8778b1.mul \ @WORDSIZE_IS_64_TRUE@ check_10000_5437_1_b337c8eb.mul \ @WORDSIZE_IS_64_TRUE@ check_10000_10000_1_2706ca53.mul \ @WORDSIZE_IS_64_TRUE@ check_832040_1346269_1_8513d1fb.mul \ @WORDSIZE_IS_64_TRUE@ check_785672_1271244_1_842e0d19.mul @WORDSIZE_IS_64_TRUE@am__append_2 = \ @WORDSIZE_IS_64_TRUE@ check_ternary_10000_1_2706ca53.fft \ @WORDSIZE_IS_64_TRUE@ check_ternary_10000_2_3f32a516.fft \ @WORDSIZE_IS_64_TRUE@ check_ternary_10000_3_fd7bba07.fft \ @WORDSIZE_IS_64_TRUE@ check_ternary_100000_1_fca70ced.fft \ @WORDSIZE_IS_64_TRUE@ check_ternary_100000_2_cd1293a5.fft \ @WORDSIZE_IS_64_TRUE@ check_ternary_100000_3_91e7d307.fft @WORDSIZE_IS_64_TRUE@am__append_3 = \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_10000_1_2706ca53.fft \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_10000_2_3f32a516.fft \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_10000_3_fd7bba07.fft \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_100000_1_fca70ced.fft \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_100000_2_cd1293a5.fft \ @WORDSIZE_IS_64_TRUE@ check_ternaryns_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_4 = check_cantor64 \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64nt check_cantor64gm \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gmt check_cantor128 \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128nt check_cantor128gm \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gmt @ENABLE_FFT_INTERFACE_TRUE@am__append_5 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_6 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_7 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64nt_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64nt_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64nt_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_8 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64nt_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_9 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gm_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gm_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gm_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_10 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gm_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_11 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gmt_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gmt_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gmt_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_12 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor64gmt_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_13 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_14 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_15 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128nt_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128nt_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128nt_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_16 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128nt_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_17 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gm_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gm_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gm_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_18 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gm_100000_3_91e7d307.fft @ENABLE_FFT_INTERFACE_TRUE@am__append_19 = \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gmt_1000_1_c28bc2e3.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gmt_1000_2_77db95cc.fft \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gmt_1000_3_6dc06b2f.fft @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@am__append_20 = \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_10000_1_2706ca53.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_10000_2_3f32a516.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_10000_3_fd7bba07.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_100000_1_fca70ced.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_100000_2_cd1293a5.fft \ @ENABLE_FFT_INTERFACE_TRUE@@WORDSIZE_IS_64_TRUE@ check_cantor128gmt_100000_3_91e7d307.fft subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ENABLE_FFT_INTERFACE_TRUE@am__EXEEXT_1 = check_cantor64$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64nt$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gm$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor64gmt$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128nt$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gm$(EXEEXT) \ @ENABLE_FFT_INTERFACE_TRUE@ check_cantor128gmt$(EXEEXT) am_bench_ternary_OBJECTS = bench_ternary-bench.$(OBJEXT) \ bench_ternary-check-and-bench-common.$(OBJEXT) \ bench_ternary-test-tools.$(OBJEXT) bench_ternary_OBJECTS = $(am_bench_ternary_OBJECTS) bench_ternary_DEPENDENCIES = $(top_builddir)/fft/libternary.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = bench_ternary_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(bench_ternary_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_check_addmul_OBJECTS = check-addmul.$(OBJEXT) check_addmul_OBJECTS = $(am_check_addmul_OBJECTS) check_addmul_DEPENDENCIES = $(top_builddir)/libgf2x.la am_check_mul_OBJECTS = check-mul.$(OBJEXT) test-tools.$(OBJEXT) check_mul_OBJECTS = $(am_check_mul_OBJECTS) check_mul_DEPENDENCIES = $(top_builddir)/libgf2x.la am__check_cantor128_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_1 = check_cantor128-check.$(OBJEXT) \ check_cantor128-check-and-bench-common.$(OBJEXT) \ check_cantor128-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor128_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_1) check_cantor128_OBJECTS = $(am_check_cantor128_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128_DEPENDENCIES = $(top_builddir)/fft/libcantor128.la check_cantor128_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor128_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_cantor128gm_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_2 = check_cantor128gm-check.$(OBJEXT) \ check_cantor128gm-check-and-bench-common.$(OBJEXT) \ check_cantor128gm-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor128gm_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_2) check_cantor128gm_OBJECTS = $(am_check_cantor128gm_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gm_DEPENDENCIES = $(top_builddir)/fft/libcantor128gm.la check_cantor128gm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor128gm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_cantor128gmt_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_3 = check_cantor128gmt-check.$(OBJEXT) \ check_cantor128gmt-check-and-bench-common.$(OBJEXT) \ check_cantor128gmt-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor128gmt_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_3) check_cantor128gmt_OBJECTS = $(am_check_cantor128gmt_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gmt_DEPENDENCIES = $(top_builddir)/fft/libcantor128gmt.la check_cantor128gmt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor128gmt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__check_cantor128nt_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_4 = check_cantor128nt-check.$(OBJEXT) \ check_cantor128nt-check-and-bench-common.$(OBJEXT) \ check_cantor128nt-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor128nt_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_4) check_cantor128nt_OBJECTS = $(am_check_cantor128nt_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128nt_DEPENDENCIES = $(top_builddir)/fft/libcantor128nt.la check_cantor128nt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor128nt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_cantor64_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_5 = check_cantor64-check.$(OBJEXT) \ check_cantor64-check-and-bench-common.$(OBJEXT) \ check_cantor64-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor64_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_5) check_cantor64_OBJECTS = $(am_check_cantor64_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64_DEPENDENCIES = \ @ENABLE_FFT_INTERFACE_TRUE@ $(top_builddir)/fft/libcantor64.la check_cantor64_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor64_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ $@ am__check_cantor64gm_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_6 = check_cantor64gm-check.$(OBJEXT) \ check_cantor64gm-check-and-bench-common.$(OBJEXT) \ check_cantor64gm-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor64gm_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_6) check_cantor64gm_OBJECTS = $(am_check_cantor64gm_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gm_DEPENDENCIES = $(top_builddir)/fft/libcantor64gm.la check_cantor64gm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor64gm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_cantor64gmt_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_7 = check_cantor64gmt-check.$(OBJEXT) \ check_cantor64gmt-check-and-bench-common.$(OBJEXT) \ check_cantor64gmt-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor64gmt_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_7) check_cantor64gmt_OBJECTS = $(am_check_cantor64gmt_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gmt_DEPENDENCIES = $(top_builddir)/fft/libcantor64gmt.la check_cantor64gmt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor64gmt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_cantor64nt_SOURCES_DIST = check.c check-and-bench-common.c \ test-tools.c am__objects_8 = check_cantor64nt-check.$(OBJEXT) \ check_cantor64nt-check-and-bench-common.$(OBJEXT) \ check_cantor64nt-test-tools.$(OBJEXT) @ENABLE_FFT_INTERFACE_TRUE@am_check_cantor64nt_OBJECTS = \ @ENABLE_FFT_INTERFACE_TRUE@ $(am__objects_8) check_cantor64nt_OBJECTS = $(am_check_cantor64nt_OBJECTS) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64nt_DEPENDENCIES = $(top_builddir)/fft/libcantor64nt.la check_cantor64nt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_cantor64nt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__objects_9 = check_ternary-check.$(OBJEXT) \ check_ternary-check-and-bench-common.$(OBJEXT) \ check_ternary-test-tools.$(OBJEXT) am_check_ternary_OBJECTS = $(am__objects_9) check_ternary_OBJECTS = $(am_check_ternary_OBJECTS) check_ternary_DEPENDENCIES = $(top_builddir)/fft/libternary.la check_ternary_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(check_ternary_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__objects_10 = check_ternaryns-check.$(OBJEXT) \ check_ternaryns-check-and-bench-common.$(OBJEXT) \ check_ternaryns-test-tools.$(OBJEXT) am_check_ternaryns_OBJECTS = $(am__objects_10) check_ternaryns_OBJECTS = $(am_check_ternaryns_OBJECTS) check_ternaryns_DEPENDENCIES = $(top_builddir)/fft/libternary.la check_ternaryns_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(check_ternaryns_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gf2x depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bench_ternary_SOURCES) $(check_addmul_SOURCES) \ $(check_mul_SOURCES) $(check_cantor128_SOURCES) \ $(check_cantor128gm_SOURCES) $(check_cantor128gmt_SOURCES) \ $(check_cantor128nt_SOURCES) $(check_cantor64_SOURCES) \ $(check_cantor64gm_SOURCES) $(check_cantor64gmt_SOURCES) \ $(check_cantor64nt_SOURCES) $(check_ternary_SOURCES) \ $(check_ternaryns_SOURCES) DIST_SOURCES = $(bench_ternary_SOURCES) $(check_addmul_SOURCES) \ $(check_mul_SOURCES) $(am__check_cantor128_SOURCES_DIST) \ $(am__check_cantor128gm_SOURCES_DIST) \ $(am__check_cantor128gmt_SOURCES_DIST) \ $(am__check_cantor128nt_SOURCES_DIST) \ $(am__check_cantor64_SOURCES_DIST) \ $(am__check_cantor64gm_SOURCES_DIST) \ $(am__check_cantor64gmt_SOURCES_DIST) \ $(am__check_cantor64nt_SOURCES_DIST) $(check_ternary_SOURCES) \ $(check_ternaryns_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) am__test_logs3 = $(am__test_logs2:.mul.log=.log) MUL_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver MUL_LOG_COMPILE = $(MUL_LOG_COMPILER) $(AM_MUL_LOG_FLAGS) \ $(MUL_LOG_FLAGS) TEST_LOGS = $(am__test_logs3:.fft.log=.log) FFT_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver FFT_LOG_COMPILE = $(FFT_LOG_COMPILER) $(AM_FFT_LOG_FLAGS) \ $(FFT_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/fft -I$(top_srcdir)/fft/mpfq -I$(top_builddir) AM_LDFLAGS = -no-install check_addmul_SOURCES = check-addmul.c check_addmul_LDADD = $(top_builddir)/libgf2x.la SYNTHESIZED_TESTS = check_1_1_1_819ea234.mul check_2_2_1_928e7e94.mul \ check_3_3_1_14aac2f1.mul check_4_4_1_fbc8042f.mul \ check_5_5_1_049e6e28.mul check_6_6_1_f7fa48ac.mul \ check_7_7_1_39d1a8b9.mul check_8_8_1_11334230.mul \ check_9_9_1_a499e414.mul check_20_20_1_d40a21e3.mul \ check_100_20_1_6dc5ac13.mul check_100_100_1_5094c182.mul \ check_1000_20_1_6ce07fed.mul check_1000_100_1_08825281.mul \ check_1000_1000_1_c28bc2e3.mul $(am__append_1) \ check_ternary_1000_1_c28bc2e3.fft \ check_ternary_1000_2_77db95cc.fft \ check_ternary_1000_3_6dc06b2f.fft $(am__append_2) \ check_ternaryns_1000_1_c28bc2e3.fft \ check_ternaryns_1000_2_77db95cc.fft \ check_ternaryns_1000_3_6dc06b2f.fft $(am__append_3) \ $(am__append_5) $(am__append_6) $(am__append_7) \ $(am__append_8) $(am__append_9) $(am__append_10) \ $(am__append_11) $(am__append_12) $(am__append_13) \ $(am__append_14) $(am__append_15) $(am__append_16) \ $(am__append_17) $(am__append_18) $(am__append_19) \ $(am__append_20) # -- end generated code -- TEST_EXTENSIONS = .mul .fft EXTRA_DIST = test-tools.h check-and-bench-common.h do-check-mul.sh \ do-check-fft.sh check_mul_SOURCES = check-mul.c test-tools.c check_mul_LDADD = $(top_builddir)/libgf2x.la # We'll run the *.mul tests above as: # ./do-check-mul.sh -m check_10000_5437_64751d23.mul MUL_LOG_COMPILER = $(srcdir)/do-check-mul.sh AM_MUL_LOG_FLAGS = -b $(builddir) -m ############# fft interface checks general_fftcheck_sources = check.c \ check-and-bench-common.c \ test-tools.c # This must be exactly the same list of configurations as in fft/Makefile.am # the flags WITHOUT_CANTOR_TRUNCATION, CANTOR_GM, and CANTOR_GM_TRUNCATE # are irrelevant here, but we lazily copy the config block from # fft/Makefile.am CCOMMON = -DENGINE_CANTOR -DESCAPE_CANTOR_SYMBOLS C64 = $(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=64 C64nt = $(C64) -DWITHOUT_CANTOR_TRUNCATION C64gm = $(C64) -DCANTOR_GM C64gmt = $(C64gm) -DCANTOR_GM_TRUNCATE C128 = $(CCOMMON) -DCANTOR_BASE_FIELD_SIZE=128 C128nt = $(C128) -DWITHOUT_CANTOR_TRUNCATION C128gm = $(C128) -DCANTOR_GM C128gmt = $(C128gm) -DCANTOR_GM_TRUNCATE TERNARY = -DENGINE_TERNARY TERNARY_NS = -DENGINE_TERNARY -DARTIFICIAL_NON_SPLIT_VERSION check_ternary_SOURCES = $(general_fftcheck_sources) check_ternary_CFLAGS = $(AM_CFLAGS) $(TERNARY) check_ternary_LDADD = $(top_builddir)/fft/libternary.la bench_ternary_SOURCES = bench.c check-and-bench-common.c test-tools.c bench_ternary_CFLAGS = $(AM_CFLAGS) $(TERNARY) bench_ternary_LDADD = $(top_builddir)/fft/libternary.la check_ternaryns_SOURCES = $(general_fftcheck_sources) check_ternaryns_CFLAGS = $(AM_CFLAGS) $(TERNARY_NS) check_ternaryns_LDADD = $(top_builddir)/fft/libternary.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor64_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64_CFLAGS = $(AM_CFLAGS) $(C64) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64_LDADD = $(top_builddir)/fft/libcantor64.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor64nt_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64nt_CFLAGS = $(AM_CFLAGS) $(C64nt) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64nt_LDADD = $(top_builddir)/fft/libcantor64nt.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gm_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gm_CFLAGS = $(AM_CFLAGS) $(C64gm) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gm_LDADD = $(top_builddir)/fft/libcantor64gm.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gmt_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gmt_CFLAGS = $(AM_CFLAGS) $(C64gmt) @ENABLE_FFT_INTERFACE_TRUE@check_cantor64gmt_LDADD = $(top_builddir)/fft/libcantor64gmt.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor128_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128_CFLAGS = $(AM_CFLAGS) $(C128) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128_LDADD = $(top_builddir)/fft/libcantor128.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor128nt_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128nt_CFLAGS = $(AM_CFLAGS) $(C128nt) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128nt_LDADD = $(top_builddir)/fft/libcantor128nt.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gm_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gm_CFLAGS = $(AM_CFLAGS) $(C128gm) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gm_LDADD = $(top_builddir)/fft/libcantor128gm.la @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gmt_SOURCES = $(general_fftcheck_sources) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gmt_CFLAGS = $(AM_CFLAGS) $(C128gmt) @ENABLE_FFT_INTERFACE_TRUE@check_cantor128gmt_LDADD = $(top_builddir)/fft/libcantor128gmt.la # We'll run the *.fft tests above as: # ./do-check-fft.sh -m check_cantor64_100_1_00000000.fft FFT_LOG_COMPILER = $(srcdir)/do-check-fft.sh AM_FFT_LOG_FLAGS = -b $(builddir) -m all: all-am .SUFFIXES: .SUFFIXES: .c .fft .fft$(EXEEXT) .lo .log .mul .mul$(EXEEXT) .o .obj .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list bench_ternary$(EXEEXT): $(bench_ternary_OBJECTS) $(bench_ternary_DEPENDENCIES) $(EXTRA_bench_ternary_DEPENDENCIES) @rm -f bench_ternary$(EXEEXT) $(AM_V_CCLD)$(bench_ternary_LINK) $(bench_ternary_OBJECTS) $(bench_ternary_LDADD) $(LIBS) check-addmul$(EXEEXT): $(check_addmul_OBJECTS) $(check_addmul_DEPENDENCIES) $(EXTRA_check_addmul_DEPENDENCIES) @rm -f check-addmul$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_addmul_OBJECTS) $(check_addmul_LDADD) $(LIBS) check-mul$(EXEEXT): $(check_mul_OBJECTS) $(check_mul_DEPENDENCIES) $(EXTRA_check_mul_DEPENDENCIES) @rm -f check-mul$(EXEEXT) $(AM_V_CCLD)$(LINK) $(check_mul_OBJECTS) $(check_mul_LDADD) $(LIBS) check_cantor128$(EXEEXT): $(check_cantor128_OBJECTS) $(check_cantor128_DEPENDENCIES) $(EXTRA_check_cantor128_DEPENDENCIES) @rm -f check_cantor128$(EXEEXT) $(AM_V_CCLD)$(check_cantor128_LINK) $(check_cantor128_OBJECTS) $(check_cantor128_LDADD) $(LIBS) check_cantor128gm$(EXEEXT): $(check_cantor128gm_OBJECTS) $(check_cantor128gm_DEPENDENCIES) $(EXTRA_check_cantor128gm_DEPENDENCIES) @rm -f check_cantor128gm$(EXEEXT) $(AM_V_CCLD)$(check_cantor128gm_LINK) $(check_cantor128gm_OBJECTS) $(check_cantor128gm_LDADD) $(LIBS) check_cantor128gmt$(EXEEXT): $(check_cantor128gmt_OBJECTS) $(check_cantor128gmt_DEPENDENCIES) $(EXTRA_check_cantor128gmt_DEPENDENCIES) @rm -f check_cantor128gmt$(EXEEXT) $(AM_V_CCLD)$(check_cantor128gmt_LINK) $(check_cantor128gmt_OBJECTS) $(check_cantor128gmt_LDADD) $(LIBS) check_cantor128nt$(EXEEXT): $(check_cantor128nt_OBJECTS) $(check_cantor128nt_DEPENDENCIES) $(EXTRA_check_cantor128nt_DEPENDENCIES) @rm -f check_cantor128nt$(EXEEXT) $(AM_V_CCLD)$(check_cantor128nt_LINK) $(check_cantor128nt_OBJECTS) $(check_cantor128nt_LDADD) $(LIBS) check_cantor64$(EXEEXT): $(check_cantor64_OBJECTS) $(check_cantor64_DEPENDENCIES) $(EXTRA_check_cantor64_DEPENDENCIES) @rm -f check_cantor64$(EXEEXT) $(AM_V_CCLD)$(check_cantor64_LINK) $(check_cantor64_OBJECTS) $(check_cantor64_LDADD) $(LIBS) check_cantor64gm$(EXEEXT): $(check_cantor64gm_OBJECTS) $(check_cantor64gm_DEPENDENCIES) $(EXTRA_check_cantor64gm_DEPENDENCIES) @rm -f check_cantor64gm$(EXEEXT) $(AM_V_CCLD)$(check_cantor64gm_LINK) $(check_cantor64gm_OBJECTS) $(check_cantor64gm_LDADD) $(LIBS) check_cantor64gmt$(EXEEXT): $(check_cantor64gmt_OBJECTS) $(check_cantor64gmt_DEPENDENCIES) $(EXTRA_check_cantor64gmt_DEPENDENCIES) @rm -f check_cantor64gmt$(EXEEXT) $(AM_V_CCLD)$(check_cantor64gmt_LINK) $(check_cantor64gmt_OBJECTS) $(check_cantor64gmt_LDADD) $(LIBS) check_cantor64nt$(EXEEXT): $(check_cantor64nt_OBJECTS) $(check_cantor64nt_DEPENDENCIES) $(EXTRA_check_cantor64nt_DEPENDENCIES) @rm -f check_cantor64nt$(EXEEXT) $(AM_V_CCLD)$(check_cantor64nt_LINK) $(check_cantor64nt_OBJECTS) $(check_cantor64nt_LDADD) $(LIBS) check_ternary$(EXEEXT): $(check_ternary_OBJECTS) $(check_ternary_DEPENDENCIES) $(EXTRA_check_ternary_DEPENDENCIES) @rm -f check_ternary$(EXEEXT) $(AM_V_CCLD)$(check_ternary_LINK) $(check_ternary_OBJECTS) $(check_ternary_LDADD) $(LIBS) check_ternaryns$(EXEEXT): $(check_ternaryns_OBJECTS) $(check_ternaryns_DEPENDENCIES) $(EXTRA_check_ternaryns_DEPENDENCIES) @rm -f check_ternaryns$(EXEEXT) $(AM_V_CCLD)$(check_ternaryns_LINK) $(check_ternaryns_OBJECTS) $(check_ternaryns_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench_ternary-bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench_ternary-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench_ternary-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-addmul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gm-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gm-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gm-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gmt-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gmt-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128gmt-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128nt-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128nt-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor128nt-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gm-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gm-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gm-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gmt-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gmt-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64gmt-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64nt-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64nt-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cantor64nt-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternary-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternary-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternary-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternaryns-check-and-bench-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternaryns-check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ternaryns-test-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-tools.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< bench_ternary-bench.o: bench.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-bench.o -MD -MP -MF $(DEPDIR)/bench_ternary-bench.Tpo -c -o bench_ternary-bench.o `test -f 'bench.c' || echo '$(srcdir)/'`bench.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-bench.Tpo $(DEPDIR)/bench_ternary-bench.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bench.c' object='bench_ternary-bench.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-bench.o `test -f 'bench.c' || echo '$(srcdir)/'`bench.c bench_ternary-bench.obj: bench.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-bench.obj -MD -MP -MF $(DEPDIR)/bench_ternary-bench.Tpo -c -o bench_ternary-bench.obj `if test -f 'bench.c'; then $(CYGPATH_W) 'bench.c'; else $(CYGPATH_W) '$(srcdir)/bench.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-bench.Tpo $(DEPDIR)/bench_ternary-bench.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bench.c' object='bench_ternary-bench.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-bench.obj `if test -f 'bench.c'; then $(CYGPATH_W) 'bench.c'; else $(CYGPATH_W) '$(srcdir)/bench.c'; fi` bench_ternary-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/bench_ternary-check-and-bench-common.Tpo -c -o bench_ternary-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-check-and-bench-common.Tpo $(DEPDIR)/bench_ternary-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='bench_ternary-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c bench_ternary-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/bench_ternary-check-and-bench-common.Tpo -c -o bench_ternary-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-check-and-bench-common.Tpo $(DEPDIR)/bench_ternary-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='bench_ternary-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` bench_ternary-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-test-tools.o -MD -MP -MF $(DEPDIR)/bench_ternary-test-tools.Tpo -c -o bench_ternary-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-test-tools.Tpo $(DEPDIR)/bench_ternary-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='bench_ternary-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c bench_ternary-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -MT bench_ternary-test-tools.obj -MD -MP -MF $(DEPDIR)/bench_ternary-test-tools.Tpo -c -o bench_ternary-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench_ternary-test-tools.Tpo $(DEPDIR)/bench_ternary-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='bench_ternary-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_ternary_CFLAGS) $(CFLAGS) -c -o bench_ternary-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor128-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-check.o -MD -MP -MF $(DEPDIR)/check_cantor128-check.Tpo -c -o check_cantor128-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-check.Tpo $(DEPDIR)/check_cantor128-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor128-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-check.obj -MD -MP -MF $(DEPDIR)/check_cantor128-check.Tpo -c -o check_cantor128-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-check.Tpo $(DEPDIR)/check_cantor128-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor128-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor128-check-and-bench-common.Tpo -c -o check_cantor128-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor128-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor128-check-and-bench-common.Tpo -c -o check_cantor128-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor128-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor128-test-tools.Tpo -c -o check_cantor128-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-test-tools.Tpo $(DEPDIR)/check_cantor128-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor128-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -MT check_cantor128-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor128-test-tools.Tpo -c -o check_cantor128-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128-test-tools.Tpo $(DEPDIR)/check_cantor128-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128_CFLAGS) $(CFLAGS) -c -o check_cantor128-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor128gm-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-check.o -MD -MP -MF $(DEPDIR)/check_cantor128gm-check.Tpo -c -o check_cantor128gm-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-check.Tpo $(DEPDIR)/check_cantor128gm-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128gm-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor128gm-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-check.obj -MD -MP -MF $(DEPDIR)/check_cantor128gm-check.Tpo -c -o check_cantor128gm-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-check.Tpo $(DEPDIR)/check_cantor128gm-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128gm-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor128gm-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor128gm-check-and-bench-common.Tpo -c -o check_cantor128gm-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128gm-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128gm-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor128gm-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor128gm-check-and-bench-common.Tpo -c -o check_cantor128gm-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128gm-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128gm-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor128gm-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor128gm-test-tools.Tpo -c -o check_cantor128gm-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-test-tools.Tpo $(DEPDIR)/check_cantor128gm-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128gm-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor128gm-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -MT check_cantor128gm-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor128gm-test-tools.Tpo -c -o check_cantor128gm-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gm-test-tools.Tpo $(DEPDIR)/check_cantor128gm-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128gm-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gm_CFLAGS) $(CFLAGS) -c -o check_cantor128gm-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor128gmt-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-check.o -MD -MP -MF $(DEPDIR)/check_cantor128gmt-check.Tpo -c -o check_cantor128gmt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-check.Tpo $(DEPDIR)/check_cantor128gmt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128gmt-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor128gmt-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-check.obj -MD -MP -MF $(DEPDIR)/check_cantor128gmt-check.Tpo -c -o check_cantor128gmt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-check.Tpo $(DEPDIR)/check_cantor128gmt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128gmt-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor128gmt-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Tpo -c -o check_cantor128gmt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128gmt-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor128gmt-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Tpo -c -o check_cantor128gmt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128gmt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128gmt-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor128gmt-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor128gmt-test-tools.Tpo -c -o check_cantor128gmt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-test-tools.Tpo $(DEPDIR)/check_cantor128gmt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128gmt-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor128gmt-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -MT check_cantor128gmt-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor128gmt-test-tools.Tpo -c -o check_cantor128gmt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128gmt-test-tools.Tpo $(DEPDIR)/check_cantor128gmt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128gmt-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128gmt_CFLAGS) $(CFLAGS) -c -o check_cantor128gmt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor128nt-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-check.o -MD -MP -MF $(DEPDIR)/check_cantor128nt-check.Tpo -c -o check_cantor128nt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-check.Tpo $(DEPDIR)/check_cantor128nt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128nt-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor128nt-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-check.obj -MD -MP -MF $(DEPDIR)/check_cantor128nt-check.Tpo -c -o check_cantor128nt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-check.Tpo $(DEPDIR)/check_cantor128nt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor128nt-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor128nt-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor128nt-check-and-bench-common.Tpo -c -o check_cantor128nt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128nt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128nt-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor128nt-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor128nt-check-and-bench-common.Tpo -c -o check_cantor128nt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor128nt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor128nt-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor128nt-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor128nt-test-tools.Tpo -c -o check_cantor128nt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-test-tools.Tpo $(DEPDIR)/check_cantor128nt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128nt-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor128nt-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -MT check_cantor128nt-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor128nt-test-tools.Tpo -c -o check_cantor128nt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor128nt-test-tools.Tpo $(DEPDIR)/check_cantor128nt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor128nt-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor128nt_CFLAGS) $(CFLAGS) -c -o check_cantor128nt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor64-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-check.o -MD -MP -MF $(DEPDIR)/check_cantor64-check.Tpo -c -o check_cantor64-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-check.Tpo $(DEPDIR)/check_cantor64-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor64-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-check.obj -MD -MP -MF $(DEPDIR)/check_cantor64-check.Tpo -c -o check_cantor64-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-check.Tpo $(DEPDIR)/check_cantor64-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor64-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor64-check-and-bench-common.Tpo -c -o check_cantor64-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor64-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor64-check-and-bench-common.Tpo -c -o check_cantor64-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor64-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor64-test-tools.Tpo -c -o check_cantor64-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-test-tools.Tpo $(DEPDIR)/check_cantor64-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor64-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -MT check_cantor64-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor64-test-tools.Tpo -c -o check_cantor64-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64-test-tools.Tpo $(DEPDIR)/check_cantor64-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64_CFLAGS) $(CFLAGS) -c -o check_cantor64-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor64gm-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-check.o -MD -MP -MF $(DEPDIR)/check_cantor64gm-check.Tpo -c -o check_cantor64gm-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-check.Tpo $(DEPDIR)/check_cantor64gm-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64gm-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor64gm-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-check.obj -MD -MP -MF $(DEPDIR)/check_cantor64gm-check.Tpo -c -o check_cantor64gm-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-check.Tpo $(DEPDIR)/check_cantor64gm-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64gm-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor64gm-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor64gm-check-and-bench-common.Tpo -c -o check_cantor64gm-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64gm-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64gm-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor64gm-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor64gm-check-and-bench-common.Tpo -c -o check_cantor64gm-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64gm-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64gm-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor64gm-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor64gm-test-tools.Tpo -c -o check_cantor64gm-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-test-tools.Tpo $(DEPDIR)/check_cantor64gm-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64gm-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor64gm-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -MT check_cantor64gm-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor64gm-test-tools.Tpo -c -o check_cantor64gm-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gm-test-tools.Tpo $(DEPDIR)/check_cantor64gm-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64gm-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gm_CFLAGS) $(CFLAGS) -c -o check_cantor64gm-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor64gmt-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-check.o -MD -MP -MF $(DEPDIR)/check_cantor64gmt-check.Tpo -c -o check_cantor64gmt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-check.Tpo $(DEPDIR)/check_cantor64gmt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64gmt-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor64gmt-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-check.obj -MD -MP -MF $(DEPDIR)/check_cantor64gmt-check.Tpo -c -o check_cantor64gmt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-check.Tpo $(DEPDIR)/check_cantor64gmt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64gmt-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor64gmt-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Tpo -c -o check_cantor64gmt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64gmt-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor64gmt-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Tpo -c -o check_cantor64gmt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64gmt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64gmt-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor64gmt-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor64gmt-test-tools.Tpo -c -o check_cantor64gmt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-test-tools.Tpo $(DEPDIR)/check_cantor64gmt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64gmt-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor64gmt-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -MT check_cantor64gmt-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor64gmt-test-tools.Tpo -c -o check_cantor64gmt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64gmt-test-tools.Tpo $(DEPDIR)/check_cantor64gmt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64gmt-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64gmt_CFLAGS) $(CFLAGS) -c -o check_cantor64gmt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_cantor64nt-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-check.o -MD -MP -MF $(DEPDIR)/check_cantor64nt-check.Tpo -c -o check_cantor64nt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-check.Tpo $(DEPDIR)/check_cantor64nt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64nt-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_cantor64nt-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-check.obj -MD -MP -MF $(DEPDIR)/check_cantor64nt-check.Tpo -c -o check_cantor64nt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-check.Tpo $(DEPDIR)/check_cantor64nt-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_cantor64nt-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_cantor64nt-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_cantor64nt-check-and-bench-common.Tpo -c -o check_cantor64nt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64nt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64nt-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_cantor64nt-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_cantor64nt-check-and-bench-common.Tpo -c -o check_cantor64nt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-check-and-bench-common.Tpo $(DEPDIR)/check_cantor64nt-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_cantor64nt-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_cantor64nt-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-test-tools.o -MD -MP -MF $(DEPDIR)/check_cantor64nt-test-tools.Tpo -c -o check_cantor64nt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-test-tools.Tpo $(DEPDIR)/check_cantor64nt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64nt-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_cantor64nt-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -MT check_cantor64nt-test-tools.obj -MD -MP -MF $(DEPDIR)/check_cantor64nt-test-tools.Tpo -c -o check_cantor64nt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_cantor64nt-test-tools.Tpo $(DEPDIR)/check_cantor64nt-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_cantor64nt-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_cantor64nt_CFLAGS) $(CFLAGS) -c -o check_cantor64nt-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_ternary-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-check.o -MD -MP -MF $(DEPDIR)/check_ternary-check.Tpo -c -o check_ternary-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-check.Tpo $(DEPDIR)/check_ternary-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_ternary-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_ternary-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-check.obj -MD -MP -MF $(DEPDIR)/check_ternary-check.Tpo -c -o check_ternary-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-check.Tpo $(DEPDIR)/check_ternary-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_ternary-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_ternary-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_ternary-check-and-bench-common.Tpo -c -o check_ternary-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-check-and-bench-common.Tpo $(DEPDIR)/check_ternary-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_ternary-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_ternary-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_ternary-check-and-bench-common.Tpo -c -o check_ternary-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-check-and-bench-common.Tpo $(DEPDIR)/check_ternary-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_ternary-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_ternary-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-test-tools.o -MD -MP -MF $(DEPDIR)/check_ternary-test-tools.Tpo -c -o check_ternary-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-test-tools.Tpo $(DEPDIR)/check_ternary-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_ternary-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_ternary-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -MT check_ternary-test-tools.obj -MD -MP -MF $(DEPDIR)/check_ternary-test-tools.Tpo -c -o check_ternary-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternary-test-tools.Tpo $(DEPDIR)/check_ternary-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_ternary-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternary_CFLAGS) $(CFLAGS) -c -o check_ternary-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` check_ternaryns-check.o: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-check.o -MD -MP -MF $(DEPDIR)/check_ternaryns-check.Tpo -c -o check_ternaryns-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-check.Tpo $(DEPDIR)/check_ternaryns-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_ternaryns-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c check_ternaryns-check.obj: check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-check.obj -MD -MP -MF $(DEPDIR)/check_ternaryns-check.Tpo -c -o check_ternaryns-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-check.Tpo $(DEPDIR)/check_ternaryns-check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check.c' object='check_ternaryns-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi` check_ternaryns-check-and-bench-common.o: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-check-and-bench-common.o -MD -MP -MF $(DEPDIR)/check_ternaryns-check-and-bench-common.Tpo -c -o check_ternaryns-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-check-and-bench-common.Tpo $(DEPDIR)/check_ternaryns-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_ternaryns-check-and-bench-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-check-and-bench-common.o `test -f 'check-and-bench-common.c' || echo '$(srcdir)/'`check-and-bench-common.c check_ternaryns-check-and-bench-common.obj: check-and-bench-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-check-and-bench-common.obj -MD -MP -MF $(DEPDIR)/check_ternaryns-check-and-bench-common.Tpo -c -o check_ternaryns-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-check-and-bench-common.Tpo $(DEPDIR)/check_ternaryns-check-and-bench-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check-and-bench-common.c' object='check_ternaryns-check-and-bench-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-check-and-bench-common.obj `if test -f 'check-and-bench-common.c'; then $(CYGPATH_W) 'check-and-bench-common.c'; else $(CYGPATH_W) '$(srcdir)/check-and-bench-common.c'; fi` check_ternaryns-test-tools.o: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-test-tools.o -MD -MP -MF $(DEPDIR)/check_ternaryns-test-tools.Tpo -c -o check_ternaryns-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-test-tools.Tpo $(DEPDIR)/check_ternaryns-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_ternaryns-test-tools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-test-tools.o `test -f 'test-tools.c' || echo '$(srcdir)/'`test-tools.c check_ternaryns-test-tools.obj: test-tools.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -MT check_ternaryns-test-tools.obj -MD -MP -MF $(DEPDIR)/check_ternaryns-test-tools.Tpo -c -o check_ternaryns-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_ternaryns-test-tools.Tpo $(DEPDIR)/check_ternaryns-test-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-tools.c' object='check_ternaryns-test-tools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_ternaryns_CFLAGS) $(CFLAGS) -c -o check_ternaryns-test-tools.obj `if test -f 'test-tools.c'; then $(CYGPATH_W) 'test-tools.c'; else $(CYGPATH_W) '$(srcdir)/test-tools.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? check-addmul.log: check-addmul$(EXEEXT) @p='check-addmul$(EXEEXT)'; \ b='check-addmul'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .mul.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(MUL_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_MUL_LOG_DRIVER_FLAGS) $(MUL_LOG_DRIVER_FLAGS) -- $(MUL_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.mul$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(MUL_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_MUL_LOG_DRIVER_FLAGS) $(MUL_LOG_DRIVER_FLAGS) -- $(MUL_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) .fft.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(FFT_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_FFT_LOG_DRIVER_FLAGS) $(FFT_LOG_DRIVER_FLAGS) -- $(FFT_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.fft$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(FFT_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_FFT_LOG_DRIVER_FLAGS) $(FFT_LOG_DRIVER_FLAGS) -- $(FFT_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile $(SYNTHESIZED_TESTS) : ; @touch $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/tests/bench.c0000644000327606072450000001333313125176245011561 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _ISOC99_SOURCE #include #include #include #include #include #include // for random #include "gf2x.h" #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-impl.h" #include "gf2x/gf2x-thresholds.h" #include "test-tools.h" #include "check-and-bench-common.h" void usage_and_die(char **argv) { fprintf(stderr, "usage: %s nmin nmax [-s step|-f factor] [-o order]\n", argv[0]); fprintf(stderr, " where nmin and nmax are numbers of 64-words\n"); exit(1); } /* we are talking numbers of words here */ void bench(int nwords, int dim, int quick, long supplied) { size_t n32bitwords = nwords; #if GF2X_WORDSIZE == 64 n32bitwords *= 2; #endif int d = quick ? 1 : dim; unsigned long ** f = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); unsigned long ** g = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); unsigned long ** h = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { f[i*d+j] = (unsigned long *) malloc(nwords * sizeof(unsigned long)); g[i*d+j] = (unsigned long *) malloc(nwords * sizeof(unsigned long)); h[i*d+j] = (unsigned long *) malloc(2 * nwords * sizeof(unsigned long)); } uint32_t start=0x32104567UL; uint32_t ratio=0x76540123UL; uint32_t v = start; for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { v = fill(f[i*d+j], n32bitwords, v, ratio); } for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { v = fill(g[i*d+j], n32bitwords, v, ratio); } int rep; time_total = 0; time_dft = 0; time_ift = 0; time_conv = 0; set_extra_arg_from_n32bitwords(n32bitwords, supplied); long order = 0; for(rep = 0 ; time_total < 0.5 ; rep++) { order = ENGINE_mul(h, f, nwords, g, nwords, d); } double mmul_ft = ((double) dim/d) * ((double) dim/d); double mmul_cv = ((double) dim/d) * ((double) dim/d) * ((double) dim/d); printf("%d %f %f %f %f %ld\n", nwords, quick ? NAN : ((double) time_total / rep), mmul_ft * time_dft / 2.0 / rep, mmul_ft * time_ift / rep, mmul_cv * time_conv/ rep, order ); fflush(stdout); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { free(f[i*d+j]); free(g[i*d+j]); free(h[i*d+j]); } free(h); free(g); free(f); } /* usage: * ./bench nmin nmax [step] */ int main(int argc, char **argv) { int nmin = 0, nmax = 0; int step = 1; double factor = 1.0; int additive = 1; int i; long supplied = 0; int d = 1; int quick = 0; for(i = 1 ; i < argc ; i++) { if (strcmp(argv[i], "-h") == 0) usage_and_die(argv); if (strcmp(argv[i], "-") == 0) usage_and_die(argv); if (strcmp(argv[i], "--help") == 0) usage_and_die(argv); if (i < argc - 1 && strcmp(argv[i], "-f") == 0) { additive = 0; factor = atof(argv[++i]); continue; } if (i < argc - 1 && strcmp(argv[i], "-s") == 0) { additive = 1; step = atoi(argv[++i]); continue; } if (i < argc - 1 && strcmp(argv[i], "-d") == 0) { d = atoi(argv[++i]); continue; } if (strcmp(argv[i], "-q") == 0) { quick=1; continue; } if (i < argc - 1 && strcmp(argv[i], "-o") == 0) { supplied = atol(argv[++i]); continue; } if (!nmin) { nmin = atoi(argv[i]); if (!nmin) usage_and_die(argv); continue; } if (!nmax) { nmax = atoi(argv[i]); if (!nmax) usage_and_die(argv); continue; } usage_and_die(argv); } if (nmin < 33) { fprintf(stderr, "Warning: nmin adjusted to the minimal value allowed: 33.\n"); nmin = 33; } if (nmin > nmax) { fprintf(stderr, "Error: nmin should be less or equal to nmax\n"); usage_and_die(argv); } for(int n = nmin ; n < nmax ; ) { bench(n, d, quick, supplied); if (additive) n += step; else { int new_n = (int) (((double) n) * factor); if (new_n <= n) n++; else n = new_n; } } return 0; } gf2x-1.2/tests/check-and-bench-common.c0000644000327606072450000001227413125176245014665 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gf2x/gf2x-config.h" #include #include #include #include #include #include #include "gf2x/gf2x-impl.h" #include "gf2x/gf2x-thresholds.h" #include "test-tools.h" #include "check-and-bench-common.h" static long init_extra_arg = ENGINE_EXTRA_ARG_DEFAULT; // cputime in millisec. static int cputime() { return (int) (clock () / ((double) CLOCKS_PER_SEC / 1000.0)); } int time_total; int time_dft; int time_conv; int time_ift; /* using the selected FFT engine, multiply two n by n matrices of * polynomials with Fl and Gl words in each entry, respectively */ long ENGINE_mul(unsigned long ** H, unsigned long ** F, size_t Fl, unsigned long ** G, size_t Gl, int n) { int t; ENGINE_info_t order; t=cputime(); time_total -= t; ENGINE_init(order, Fl * GF2X_WORDSIZE, Gl * GF2X_WORDSIZE, init_extra_arg); ENGINE_ptr f = ENGINE_alloc(order, n*n); t=cputime(); time_dft -= t; for(int i = 0 ; i < n ; i++) for(int j = 0 ; j < n ; j++) ENGINE_dft(order, ENGINE_get(order, f, i*n+j), F[i*n+j], Fl * GF2X_WORDSIZE); t=cputime(); time_dft += t; ENGINE_ptr g = ENGINE_alloc(order, n*n); t=cputime(); time_dft -= t; for(int i = 0 ; i < n ; i++) for(int j = 0 ; j < n ; j++) ENGINE_dft(order, ENGINE_get(order, g, i*n+j), G[i*n+j], Gl * GF2X_WORDSIZE); t=cputime(); time_dft += t; ENGINE_ptr h = ENGINE_alloc(order, n*n); t=cputime(); time_conv -= t; for(int i = 0 ; i < n ; i++) for(int j = 0 ; j < n ; j++) { ENGINE_srcptr * ff = malloc(n * sizeof(ENGINE_srcptr)); ENGINE_srcptr * gg = malloc(n * sizeof(ENGINE_srcptr)); for(int k = 0 ; k < n ; k++) { ff[k] = ENGINE_get_const(order, (ENGINE_srcptr) f, i*n+k); gg[k] = ENGINE_get_const(order, (ENGINE_srcptr) g, k*n+j); } ENGINE_zero(order, ENGINE_get(order, h, i*n+j), 1); ENGINE_addcompose_n(order, ENGINE_get(order, h, i*n+j), ff, gg, n); free(ff); free(gg); } t=cputime(); time_conv += t; ENGINE_free(order, g, n*n); ENGINE_free(order, f, n*n); t=cputime(); time_ift -= t; for(int i = 0 ; i < n ; i++) for(int j = 0 ; j < n ; j++) ENGINE_ift(order, H[i*n+j], (Fl+Gl) * GF2X_WORDSIZE - 1, ENGINE_get(order, h, i*n+j)); t=cputime(); time_ift += t; long res = ENGINE_recoverorder(order); ENGINE_free(order, h, n*n); ENGINE_clear(order); t=cputime(); time_total += t; return res; } void set_extra_arg_from_n32bitwords(size_t n32 GF2X_MAYBE_UNUSED, long supplied) { if (supplied) { init_extra_arg = supplied; return; } #ifdef GF2X_MUL_FFT_TABLE #ifdef ENGINE_TERNARY int nwords = n32; #if GF2X_WORDSIZE == 64 nwords = nwords / 2 + (nwords & 1); #endif int64_t T_FFT_TAB[][2] = GF2X_MUL_FFT_TABLE; long max_ix = sizeof(T_FFT_TAB)/sizeof(T_FFT_TAB[0]); int j; #ifdef ARTIFICIAL_NON_SPLIT_VERSION /* remove completely the FFT2 setups */ j = 0; for(int i = 0 ; i < max_ix ; i++) { if (T_FFT_TAB[i][1] > 0) { T_FFT_TAB[j][0] = T_FFT_TAB[i][0]; T_FFT_TAB[j][1] = T_FFT_TAB[i][1]; j++; } } max_ix = j; #endif /* artificial: use FFT always */ assert(T_FFT_TAB[0][0] == 1); if (T_FFT_TAB[0][1] == 1) T_FFT_TAB[0][1] = 3; /* also for intermediary steps */ j = 0; for(int i = 0 ; i < max_ix ; i++) { if (T_FFT_TAB[i][1] != 1) { T_FFT_TAB[j][0] = T_FFT_TAB[i][0]; T_FFT_TAB[j][1] = T_FFT_TAB[i][1]; j++; } } max_ix = j; int i; for (i = 0; i + 1 < max_ix && T_FFT_TAB[i + 1][0] <= nwords; i++); /* now T_FFT_TAB[i][0] <= nwords < T_FFT_TAB[i+1][0] */ init_extra_arg = T_FFT_TAB[i][1]; #endif /* ENGINE_TERNARY */ #endif /* GF2X_MUL_FFT_TABLE */ } gf2x-1.2/tests/test-tools.c0000644000327606072450000000613712725540357012627 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-thresholds.h" #include "test-tools.h" /* Fill the ulong* array a by n1 32-bit values in geometric progression. * Returns a value which is appropriate for chaining. */ uint32_t fill(unsigned long * a, int n1, uint32_t startvalue, uint32_t ratio) { int i; uint32_t v = startvalue; #if GF2X_WORDSIZE == 32 for(i = 0 ; i < n1 ; i++) { a[i] = v; v *= ratio; } #elif GF2X_WORDSIZE == 64 int N1 = n1 / 2 + (n1 & 1); unsigned long w = 1; for(i = 0 ; i < N1 ; i++) { w = (unsigned long) v * (unsigned long) ratio; a[i] = w << 32 | (unsigned long) v; v = w * ratio; } if (n1 & 1) { v = w; a[N1-1] &= (1UL << 32) - 1; } #else #error "Config problem" #endif return v; } #define RED(l,h) do { \ /* Compute crc mod x^32 + x^7 + x^6 + x^2 + 1 */ \ l ^= h ^ h << 2 ^ h << 6 ^ h << 7; \ h = h >> 30 ^ h >> 26 ^ h >> 25; \ /* h is at most 7 bits now. */ \ l ^= h ^ h << 2 ^ h << 6 ^ h << 7; \ h = 0; \ } while (0) uint32_t crc32(unsigned long * c, int n3, uint32_t v) { int i; #if GF2X_WORDSIZE == 32 for(i = 0 ; i < n3 ; i++) { uint32_t l,h; l = c[n3-1-i]; h = v; RED(l,h); v = l; } #elif GF2X_WORDSIZE == 64 int N3 = n3 / 2 + (n3 & 3); i = 0; for(int j = 0 ; j < N3 ; j++) { uint32_t l, h; unsigned long cj = c[N3-1-j]; if (2*(N3-1-j) + 1 < n3) { h = v; l = cj >> 32; RED(l,h); i++; v = l; } if (i == n3) break; if (2*(N3-1-j) < n3) { h = v; l = cj; RED(l,h); i++; v = l; } if (i == n3) break; } #endif return v; } gf2x-1.2/tests/check-addmul.c0000644000327606072450000000617512725540357013035 00000000000000/* This file is part of the gf2x library. Copyright 2010 Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include "gf2x.h" #include "gf2x/gf2x-impl.h" #include "gf2x/gf2x_mul1.h" unsigned long longrand() { #if RAND_MAX < LONG_MAX return rand() * ((long)RAND_MAX+1) + rand(); #else return rand(); #endif } /* check gf2x_mul_1_n against gf2x_addmul_1_n */ static void check_gf2x_mul_1_n (long sb) { unsigned long *cp = malloc ((sb + 1) * sizeof (unsigned long)); unsigned long *refcp = malloc ((sb + 1) * sizeof (unsigned long)); unsigned long *bp = malloc (sb * sizeof (unsigned long)); long i; unsigned long a; for (i = 0; i < sb; i++) bp[i] = longrand (); a = longrand (); /* using gf2x_mul_1_n */ /* put initial noise into cp */ for (i = 0; i < sb; i++) cp[i] = longrand (); cp[sb] = gf2x_mul_1_n (cp, bp, sb, a); /* using gf2x_addmul_1_n */ for (i = 0; i < sb + 1; i++) refcp[i] = (unsigned long) 0; cp[sb] ^= gf2x_addmul_1_n (refcp, refcp, bp, sb, a); for (i = 0; i < sb + 1; i++) if (cp[i] != refcp[i]) { fprintf (stderr, "Error, gf2x_mul_1_n and gf2x_addmul_1_n differ\n"); fprintf (stderr, "bp="); for (i = 0; i < sb; i++) fprintf (stderr, "%lu ", bp[i]); fprintf (stderr, "\na=%lu\n", a); fprintf (stderr, "gf2x_mul_1_n gives"); for (i = 0; i < sb + 1; i++) fprintf (stderr, " %lu", cp[i]); fprintf (stderr, "\ngf2x_addmul_1_n gives"); for (i = 0; i < sb + 1; i++) fprintf (stderr, " %lu", refcp[i]); fprintf (stderr, "\n"); printf(" FAILED\n"); exit (1); } } int main(int argc, char * argv[]) { if (argc != 1) { fprintf(stderr, "Usage: %s\n", argv[0]); exit(1); } int sb; printf ("Checking gf2x_mul_1_n against gf2x_addmul_1_n..."); fflush(stdout); for (sb = 1; sb <= 1000; sb++) check_gf2x_mul_1_n (sb); printf ("ok\n"); return 0; } gf2x-1.2/tests/check-mul.c0000644000327606072450000000576612725540357012371 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include "gf2x.h" #include "gf2x/gf2x-impl.h" #include "test-tools.h" int main(int argc, char * argv[]) { if (argc != 2 && argc != 3) { fprintf(stderr, "Usage: ./check []\n"); fprintf(stderr, "Output of this program must be" " checked against precomputed tables\n"); exit(1); } int n1 = atoi(argv[1]); int n2 = n1; if (argc >= 3) { n2 = atoi(argv[2]); } int n3 = n1 + n2; /* n1 and n2 must be understood as a number of 32-bit words */ int N1 = n1; int N2 = n2; #if GF2X_WORDSIZE == 64 N1 = N1 / 2 + (N1 & 1); N2 = N2 / 2 + (N2 & 1); #endif int N3 = N1 + N2; unsigned long * a = malloc(N1 * sizeof(unsigned long)); unsigned long * b = malloc(N2 * sizeof(unsigned long)); unsigned long * c = malloc(N3 * sizeof(unsigned long)); uint32_t start=0x32104567UL; uint32_t ratio=0x76540123UL; start |= 1UL; uint32_t v; uint32_t check0, check1; v = start; v = fill(a, n1, v, ratio); v = fill(b, n2, v, ratio); gf2x_mul(c,a,N1,b,N2); check0 = crc32(c, n3, 0); v = start; v = fill(c, n1, v, ratio); gf2x_mul(c,c,N1,b,N2); check1 = crc32(c, n3, 0); if (check0 != check1) { printf("aliasing test failed\n"); exit(1); } v = start; v = fill(a, n1, v, ratio); v = fill(c, n2, v, ratio); gf2x_mul(c,a,N1,c,N2); check1 = crc32(c, n3, 0); if (check0 != check1) { printf("aliasing test failed\n"); exit(1); } printf("%d %d %08" PRIx32 "\n", n1, n2, check0); free(a); free(b); free(c); return 0; } gf2x-1.2/tests/check.c0000644000327606072450000001306413125176245011560 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include #include "gf2x/gf2x-config.h" #include "gf2x/gf2x-impl.h" #include "gf2x/gf2x-thresholds.h" #include "test-tools.h" #include "check-and-bench-common.h" int print_crc = 0; /* n32bitwords is a number of 32-bit words ; k is a matrix dimension */ int test(int n32bitwords, int d) { int nwords = n32bitwords; #if GF2X_WORDSIZE == 64 nwords = nwords / 2 + (nwords & 1); #endif /* now nwords is a number of unsigned longs */ unsigned long ** f = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); unsigned long ** g = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); unsigned long ** h = (unsigned long**) malloc(d*d*sizeof(unsigned long*)); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { f[i*d+j] = (unsigned long *) malloc(nwords * sizeof(unsigned long)); g[i*d+j] = (unsigned long *) malloc(nwords * sizeof(unsigned long)); h[i*d+j] = (unsigned long *) malloc(2 * nwords * sizeof(unsigned long)); } uint32_t start=0x32104567UL; uint32_t ratio=0x76540123UL; uint32_t v = start; for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { v = fill(f[i*d+j], n32bitwords, v, ratio); } for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { v = fill(g[i*d+j], n32bitwords, v, ratio); } if (!print_crc) { printf("w := %u;\n", GF2X_WORDSIZE); #ifdef ENGINE_CANTOR printf("b := %u;\n", CANTOR_BASE_FIELD_SIZE); #endif printf("f := [\n"); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { if (i || j) printf(", "); printf("["); for (int k = 0; k < nwords - 1; ++k) printf("%lu, ", f[i*d+j][k]); printf("%lu\n]\n", f[i*d+j][nwords - 1]); } printf("];\n"); printf("g := [\n"); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { if (i || j) printf(", "); printf("["); for (int k = 0; k < nwords - 1; ++k) printf("%lu, ", g[i*d+j][k]); printf("%lu\n]\n", g[i*d+j][nwords - 1]); } printf("];\n"); } //for (int i = 0; i < 10; ++i) ENGINE_mul(h,f,nwords,g,nwords,d); if (!print_crc) { printf("fg := [\n"); for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { if (i || j) printf(", "); printf("["); for (int k = 0; k < 2*nwords - 1; ++k) printf("%lu, ", h[i*d+j][k]); printf("%lu\n]\n", h[i*d+j][2*nwords - 1]); } printf("];\n"); } else { uint32_t check0 = 0; for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) check0 = crc32(h[(d-1-i)*d+(d-1-j)], 2*n32bitwords, check0); printf("%d %d %08" PRIx32 "\n", n32bitwords, d, check0); } for(int i = 0 ; i < d ; i++) for(int j = 0 ; j < d ; j++) { free(f[i*d+j]); free(g[i*d+j]); free(h[i*d+j]); } free(h); free(g); free(f); return 0; } void usage_and_die(char **argv) { fprintf(stderr, "usage: %s --n --k \n", argv[0]); exit(1); } int main(int argc, char **argv) { int n32bitwords = -1; int k = 1; for(int i = 1 ; i < argc ; i++) { if (strcmp(argv[i], "-h") == 0) usage_and_die(argv); if (strcmp(argv[i], "-") == 0) usage_and_die(argv); if (strcmp(argv[i], "--help") == 0) usage_and_die(argv); if (strcmp(argv[i], "--crc") == 0) { print_crc=1; continue; } if (i < argc - 1 && strcmp(argv[i], "--n") == 0) { n32bitwords = atoi(argv[++i]); continue; } if (i < argc - 1 && strcmp(argv[i], "--k") == 0) { k = atoi(argv[++i]); continue; } usage_and_die(argv); } if (n32bitwords < 0) usage_and_die(argv); set_extra_arg_from_n32bitwords(n32bitwords, 0); test(n32bitwords, k); return 0; } gf2x-1.2/tests/test-tools.h0000644000327606072450000000354512725540357012634 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009, 2010, 2013, 2014, 2015 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of either: - If the archive contains a file named toom-gpl.c (not a trivial placeholder), the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - If the archive contains a file named toom-gpl.c which is a trivial placeholder, the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. You should have received a copy of the GNU General Public License as well as the GNU Lesser General Public License along with this program; see the files COPYING and COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TEST_TOOLS_H_ #define TEST_TOOLS_H_ #include #ifdef __cplusplus extern "C" { #endif /* fill the area a[0..X[ with n1 32-bit integers, all equal to * startvalue*ratio^i (for to i&2; exit 1;; esac done if [ "$magic" ] ; then magic_tr=`basename $magic | tr '_.' ' '` read check n1 n2 k v mul <&2 exit 1 fi echo "n1 = $n1 ; n2=$n2 ; v=$v" expected="$n1 $n2 $v" cmdline="$builddir/check-mul $n1 $n2" echo "## $cmdline" echo "## expected output: $expected" got="`$cmdline`" if [ "$got" != "$expected" ] ; then echo "failed check for ${n1}x${n2} : '$got' != '$expected'" >&2 echo "failed : '$got' != '$expected'" exit 1 fi else echo "No test to run ??" >&2 exit 1 fi gf2x-1.2/tests/do-check-fft.sh0000755000327606072450000000454713124735401013130 00000000000000# This file is part of the gf2x library. # # Copyright 2007, 2008, 2009, 2010, 2013 # Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann # # This program is free software; you can redistribute it and/or modify it # under the terms of either: # - If the archive contains a file named toom-gpl.c (not a trivial # placeholder), the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # - If the archive contains a file named toom-gpl.c which is a trivial # placeholder, the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the license text for more details. # # You should have received a copy of the GNU General Public License as # well as the GNU Lesser General Public License along with this program; # see the files COPYING and COPYING.LIB. If not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. echo "## $0 $@" # $builddir can be overridden with -b # defaulting to the location of $0 would be wrong in the out-of-source # case, so we always use -b in Makefile.am. However, for quick testing, a # priori in source, we're fine with a mere -m with this default (and # having -b in this case too cannot hurt) builddir="`dirname $0`" while [ $# -gt 0 ] ; do arg="$1" shift case "$arg" in -m) magic="$1" ; shift;; -b) builddir="$1" ; shift;; *) echo "unexpected test arg: $arg" >&2; exit 1;; esac done if [ "$magic" ] ; then magic_tr=`basename $magic | tr '_.' ' '` read check binary n k v fft <&2 echo "failed : '$got' != '$expected'" exit 1 fi else echo "No test to run ??" >&2 exit 1 fi gf2x-1.2/apps/0000755000327606072450000000000013126452067010214 500000000000000gf2x-1.2/apps/Makefile.am0000644000327606072450000000101413125127525012161 00000000000000# put here the location of the NTL installation (for example /usr/local) NTL= # add -mbmi2 to use the pdep_u64 instruction AM_CPPFLAGS = -I$(top_srcdir) -T$(top_builddir) -fopenmp -std=c++11 -I$(NTL)/include check_PROGRAMS=factor factor_SOURCES=factor.cpp halfgcd.cpp noinst_HEADERS=halfgcd.hpp factor_LDFLAGS=-fopenmp factor_LDADD=../libgf2x.la $(NTL)/lib/libntl.a -lgmp LOG_COMPILER=$(SHELL) 2>/dev/null TESTS=check-factor-000.sh check-factor-001.sh \ check-factor-002.sh check-factor-003.sh EXTRA_DIST=$(TESTS) gf2x-1.2/apps/halfgcd.hpp0000644000327606072450000000214512725540356012242 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307, USA. */ #ifndef HALFGCD_HPP_ #define HALFGCD_HPP_ #include extern void mul_gen(NTL::GF2X& c, const NTL::GF2X& a, const NTL::GF2X& b); extern void FastGCD(NTL::GF2X& d, const NTL::GF2X& u, const NTL::GF2X& v); #endif /* HALFGCD_HPP_ */ gf2x-1.2/apps/Makefile.in0000644000327606072450000010157513126452055012207 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = factor$(EXEEXT) subdir = apps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/gf2x/gf2x-config.h \ $(top_builddir)/gf2x/gf2x-config-export.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_factor_OBJECTS = factor.$(OBJEXT) halfgcd.$(OBJEXT) factor_OBJECTS = $(am_factor_OBJECTS) factor_DEPENDENCIES = ../libgf2x.la $(NTL)/lib/libntl.a AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = factor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(factor_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gf2x depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(factor_SOURCES) DIST_SOURCES = $(factor_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/test-driver COPYING DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GF2X_WORDSIZE = @GF2X_WORDSIZE@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAYBE_APPS = @MAYBE_APPS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gf2x_lib_version = @gf2x_lib_version@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # put here the location of the NTL installation (for example /usr/local) NTL = # add -mbmi2 to use the pdep_u64 instruction AM_CPPFLAGS = -I$(top_srcdir) -T$(top_builddir) -fopenmp -std=c++11 -I$(NTL)/include factor_SOURCES = factor.cpp halfgcd.cpp noinst_HEADERS = halfgcd.hpp factor_LDFLAGS = -fopenmp factor_LDADD = ../libgf2x.la $(NTL)/lib/libntl.a -lgmp LOG_COMPILER = $(SHELL) 2>/dev/null TESTS = check-factor-000.sh check-factor-001.sh \ check-factor-002.sh check-factor-003.sh EXTRA_DIST = $(TESTS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu apps/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list factor$(EXEEXT): $(factor_OBJECTS) $(factor_DEPENDENCIES) $(EXTRA_factor_DEPENDENCIES) @rm -f factor$(EXEEXT) $(AM_V_CXXLD)$(factor_LINK) $(factor_OBJECTS) $(factor_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/halfgcd.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? check-factor-000.sh.log: check-factor-000.sh @p='check-factor-000.sh'; \ b='check-factor-000.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check-factor-001.sh.log: check-factor-001.sh @p='check-factor-001.sh'; \ b='check-factor-001.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check-factor-002.sh.log: check-factor-002.sh @p='check-factor-002.sh'; \ b='check-factor-002.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) check-factor-003.sh.log: check-factor-003.sh @p='check-factor-003.sh'; \ b='check-factor-003.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gf2x-1.2/apps/COPYING0000644000327606072450000010451312725540356011176 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gf2x-1.2/apps/factor.cpp0000644000327606072450000012543512725540356012133 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307, USA. */ /* Finds smallest irreducible factor of trinomial over GF(2) */ #define VERSION 2.01 #define USE_PDEP /* -mbmi2 should be added to CFLAGS */ #include #include #include /* for CHAR_BIT */ #include #include #include #include #include #include #include #include #include #ifdef USE_PDEP #include /* for _pdep_u64 */ #endif #include "halfgcd.hpp" NTL_CLIENT double WctTime (void) { struct timeval tv[1]; gettimeofday (tv, NULL); return (double)tv->tv_sec + (double)tv->tv_usec*1.0e-6; } /* Usage: factor [options] -s0 s0 -s1 s1 r [see usage() function for options] Check every trinomial x^r+x^s+1 for s0 <= s < s1, with 0 < s0 and s1 <= r, and "s k px..y" is output if it has a factor of degree k (the factor is x..y in hex encoding); otherwise "s irreducible" (or "s primitive") is output. If the "-z" option is used then "s u" may be output (in this case we need to check the trinomial with another program, e.g. irred). */ #define BITS_PER_LONG2 (2*NTL_BITS_PER_LONG) void fastsqr_old(GF2X& b, GF2X& a, _ntl_ulong r, _ntl_ulong s) /* Returns b = a*a mod (x^r + x^s + 1) Here a and b represent polynomials (in GF(2)[x]) of degree < r, using the natural representation (as used in NTL and irred) of one bit per coefficient (least significant bit of word 0 is the constant term). The input a is destroyed and must not overlap the output b. r and s must be odd. In addition, this implementation assumes that min(s, r-s) > 2*wlen, where wlen is the wordlength in bits (assumed to be 32 or 64). The algorithm is as described in Section 4 of Brent, Larvala and Zimmermann, Math. Comp. 72 (2003), 1443--1452 [rpb199], but without any overlap of the arrays. The algorithm has two steps (reduce and interleave). The first step reduces the implicit square of polynomial a of degree < r "in place" given x^r = x^s + 1 (mod 2), with the result left in scrambled order 0 2 4 ... r-3 r-1 1 3 5 ... r-4 r-2 in a. The second step then "interleaves" the bits to give the correct order in b. Uses about (2*load + 1.5*store)*r/wlen memory operations, which is better than the obvious "square and reduce" algorithm as in NTL's SqrMod. The saving is because operations are not performed on bits that are known to be zero. RPB, 20070318 (based on reducep, reducer and interlvf in irred.c). */ { _ntl_ulong old, nex, mask1, mask2; /* "new" is a reserved word */ _ntl_ulong t, u, v, w, next1, next2; long j, alpha, delta, deltaw, deltaq, deltaqc, q1, q4, q5, s1, s2; long smax; #if (NTL_BITS_PER_LONG == 64) _ntl_ulong c0, c1, c2, c3, c4, c5; long wd = 6; /* 64-bit words */ unsigned long wlen = 64; /* wordlength (bits) = 2^wd */ long wlenm = 63; /* wlen - 1 */ if ((r&s&1) == 0) { printf("Error in fastsqr: r = %lu and s = %lu must be odd\n", r, s); exit (1); } if (s <= 2*wlen) { printf("Error in fastsqr: s = %lu must be at least %lu\n", s, 2*wlen+1); exit (1); } if ((r-s) <= 2*wlen) { printf("Error in fastsqr: r-s = %lu must be at least %lu\n", r-s, 2*wlen+1); exit (1); } smax = (r+wlen-1) >> wd; /* max size in words = ceil(r/wlen) */ long sa = a.xrep.length(); /* size in words */ if (sa < smax) a.xrep.SetLength(smax); /* Always use length smax for a */ _ntl_ulong *ap = a.xrep.elts(); for (j = sa; j < smax; j++) /* Clear high words of a if necessary */ ap[j] = 0; b.xrep.SetLength(smax+2); /* Allow 2 words extra space for b */ _ntl_ulong *bp = b.xrep.elts(); bp[smax] = 0; /* Clear the extra two words of b */ bp[smax+1] = 0; /* No need to clear words 0..(smax-1) */ c0 = 0x00000000FFFFFFFFL; /* Some 64-bit constants */ c1 = 0x0000FFFF0000FFFFL; c2 = 0x00FF00FF00FF00FFL; c3 = 0x0F0F0F0F0F0F0F0FL; c4 = 0x3333333333333333L; c5 = 0x2222222222222222L; alpha = r >> 1; /* alpha = (r-1)/2 */ delta = (r - s) >> 1; /* delta = (r - s)/2 */ deltaw = delta >> wd; /* deltaw = delta div wlen */ deltaq = delta & wlenm; /* deltaq = delta mod wlen */ deltaqc = wlen - deltaq; q1 = (r-1) >> wd; /* q1 = (r-1) div wlen = smax - 1 */ q4 = alpha >> wd; /* q4 = alpha div wlen */ mask1 = (_ntl_ulong)(~0L) >> (wlenm - ((r-1) & wlenm)); /* mask1 has wlen-1 - ((r-1) mod wlen) zero bits in high positions */ mask2 = (~1L) << (alpha & wlenm); /* mask2 has (alpha mod wlen) + 1 zero bits in low positions */ ap[q1] &= mask1; /* Mask irrelevant high bits of a */ nex = 0; if (deltaq == 0) { /* Special case, deltaq == 0 (word-aligned) */ for (j = q1; j > q4; j--) ap[j-deltaw] ^= ap[j]; ap[q4-deltaw] ^= ap[q4] & mask2; } else { /* Usual case, 0 < deltaq < wlen */ for (j = q1; j > q4; j--) { old = nex; nex = ap[j]; ap[j-deltaw] ^= (nex >> deltaq) | (old << deltaqc); } /* The last two iterations are special as need to mask some bits */ old = nex; nex = ap[q4] & mask2; ap[q4-deltaw] ^= (nex >> deltaq) | (old << deltaqc); ap[q4-deltaw-1] ^= (nex << deltaqc); } /* Interleave starts here */ q5 = (alpha+1) >> wd; /* q5 = (alpha+1) div wlen */ s1 = (alpha+1) & wlenm; /* s1 = (alpha+1) mod wlen */ s2 = wlenm - s1; /* In [0, wlen) */ next1 = ap[0]; old = ap[q5]; nex = ap[q5+1]; for (j = 0; j <= q5; j++) { next2 = (old >> s1) | ((nex << 1) << s2); /* Beware case s2 == 63 */ u = next1>>32; /* High order 32 bits low part of a */ w = next2>>32; /* Ditto high part of a */ t = next1 & c0; /* Low order 32 bits low part of a */ v = next2 & c0; /* Ditto high part of a */ next1 = ap[j+1]; old = nex; nex = ap[j+q5+2]; u = (u | u<<16) & c1; /* Operations on t,u,v,w */ t = (t | t<<16) & c1; /* can be done in parallel */ w = (w | w<<16) & c1; v = (v | v<<16) & c1; u = (u | u<<8) & c2; t = (t | t<<8) & c2; w = (w | w<<8) & c2; v = (v | v<<8) & c2; u = (u | u<<4) & c3; t = (t | t<<4) & c3; w = (w | w<<4) & c3; v = (v | v<<4) & c3; u = (u | u<<2) & c4; t = (t | t<<2) & c4; w = (w | w<<2) & c4; v = (v | v<<2) & c4; u += u & c5; t += t & c5; w += w & c5; v += v & c5; bp[2*j+1] = u | (w << 1); bp[2*j] = t | (v << 1); } bp[smax+1] = 0; /* Clear high words of b */ bp[smax] = 0; /* Note: smax = q1 + 1 */ bp[q1] &= mask1; /* Mask high bits */ b.normalize(); /* Normalize output */ return; } #else /* This is for 32-bit words */ _ntl_ulong c1, c2, c3, c4, c5; long wd = 5; long wlen = 32; /* wordlength (bits) = 2^wd */ long wlenm = 31; /* wlen - 1 */ if ((r&s&1) == 0) { printf("Error in fastsqr: r = %d and s = %d must be odd\n", r, s); exit (1); } if (s <= 2*wlen) { printf("Error in fastsqr: s = %d must be at least %d\n", s, 2*wlen+1); exit (1); } if ((r-s) <= 2*wlen) { printf("Error in fastsqr: r-s = %d must be at least %d\n", r-s, 2*wlen+1); exit (1); } smax = (r+wlen-1) >> wd; /* max size in words = ceil(r/wlen) */ long sa = a.xrep.length(); /* size in words */ if (sa < smax) a.xrep.SetLength(smax); /* Always use length smax for a */ _ntl_ulong *ap = a.xrep.elts(); for (j = sa; j < smax; j++) /* Clear high words of a if necessary */ ap[j] = 0; b.xrep.SetLength(smax+2); /* Allow 2 words extra space for b */ _ntl_ulong *bp = b.xrep.elts(); bp[smax] = 0; /* Clear the extra two words of b */ bp[smax+1] = 0; /* No need to clear words 0..(smax-1) */ c1 = 0x0000FFFFL; /* Some 32-bit constants */ c2 = 0x00FF00FFL; c3 = 0x0F0F0F0FL; c4 = 0x33333333L; c5 = 0x22222222L; alpha = r >> 1; /* alpha = (r-1)/2 */ delta = (r - s) >> 1; /* delta = (r - s)/2 */ deltaw = delta >> wd; /* deltaw = delta div wlen */ deltaq = delta & wlenm; /* deltaq = delta mod wlen */ deltaqc = wlen - deltaq; q1 = (r-1) >> wd; /* q1 = (r-1) div wlen = smax - 1 */ q4 = alpha >> wd; /* q4 = alpha div wlen */ mask1 = (_ntl_ulong)(~0L) >> (wlenm - ((r-1) & wlenm)); /* mask1 has wlen-1 - ((r-1) mod wlen) zero bits in high positions */ mask2 = (~1L) << (alpha & wlenm); /* mask2 has (alpha mod wlen) + 1 zero bits in low positions */ ap[q1] &= mask1; /* Mask irrelevant high bits of a */ nex = 0; if (deltaq == 0) { /* Special case, deltaq == 0 (word-aligned) */ for (j = q1; j > q4; j--) ap[j-deltaw] ^= ap[j]; ap[q4-deltaw] ^= ap[q4] & mask2; } else { /* Usual case, 0 < deltaq < wlen */ for (j = q1; j > q4; j--) { old = nex; nex = ap[j]; ap[j-deltaw] ^= (nex >> deltaq) | (old << deltaqc); } /* The last two iterations are special as need to mask some bits */ old = nex; nex = ap[q4] & mask2; ap[q4-deltaw] ^= (nex >> deltaq) | (old << deltaqc); ap[q4-deltaw-1] ^= (nex << deltaqc); } /* Interleave starts here */ q5 = (alpha+1) >> wd; /* q5 = (alpha+1) div wlen */ s1 = (alpha+1) & wlenm; /* s1 = (alpha+1) mod wlen */ s2 = wlenm - s1; /* In [0, wlen) */ next1 = ap[0]; old = ap[q5]; nex = ap[q5+1]; for (j = 0; j <= q5; j++) { next2 = (old >> s1) | ((nex << 1) << s2); /* Beware case s2 == 31 */ u = next1>>16; /* High order 16 bits low part of a */ w = next2>>16; /* Ditto high part of a */ t = next1 & c1; /* Low order 16 bits low part of a */ v = next2 & c1; /* Ditto high part of a */ next1 = ap[j+1]; old = nex; nex = ap[j+q5+2]; u = (u | u<<8) & c2; /* Operations on t,u,v,v */ t = (t | t<<8) & c2; /* can be done in parallel */ w = (w | w<<8) & c2; v = (v | v<<8) & c2; u = (u | u<<4) & c3; t = (t | t<<4) & c3; w = (w | w<<4) & c3; v = (v | v<<4) & c3; u = (u | u<<2) & c4; t = (t | t<<2) & c4; w = (w | w<<2) & c4; v = (v | v<<2) & c4; u += u & c5; t += t & c5; w += w & c5; v += v & c5; bp[2*j+1] = u | (w << 1); bp[2*j] = t | (v << 1); } bp[smax+1] = 0; /* Clear high words of b */ bp[smax] = 0; /* Note: smax = q1 + 1 */ bp[q1] &= mask1; /* Mask high bits */ b.normalize(); /* Normalize output */ return; } #endif void print_gf2x (GF2X& a) { _ntl_ulong *ap = a.xrep.elts(); for (long j = 0; j < 64 * a.xrep.length(); j++) if (ap[j / 64] >> (j % 64) & 1) printf ("+x^%lu", j); printf ("\n"); } #ifdef USE_PDEP /* b <- a^2 mod (x^r + x^s + 1) Assumes r and s are odd, and NTL_BITS_PER_LONG = 64. Assumes r-s >= 128. Destroys the value in a. */ void fastsqr_pdep (GF2X& b, GF2X& a, _ntl_ulong r, _ntl_ulong s) { assert (r & 1); assert (s & 1); assert (NTL_BITS_PER_LONG == 64); unsigned long smax = (r + 63) / 64; /* ceil(r/64) */ unsigned long j, sa = a.xrep.length (); /* size in words */ if (sa < smax) a.xrep.SetLength (smax); /* Always use length smax for a */ _ntl_ulong *ap = a.xrep.elts(); for (j = sa; j < smax; j++) ap[j] = 0; /* Clear high words of a if necessary */ b.xrep.SetLength (smax); unsigned long alpha = (r - 1) / 2; unsigned long delta = (r - s) / 2; assert (delta >= 64); /* to avoid word-overlap between b_j and b_{j+delta} */ /* first loop (Section 4.1 of "A fast algorithm ...", Math. Comp., 2002): for j <- r-1 downto alpha+1 do b_{j - delta} <- b_{j - delta} xor b_j for j <- r-1-delta downto alpha+1-delta do b_j <- b_j xor b_{j+delta} */ unsigned long jmin, jmax, deltaq, deltar; jmin = (alpha + 1 - delta) / 64; /* floor((alpha+1-delta)/64 */ jmax = (r - 1 - delta) / 64; /* floor((r-1-delta)/64 */ deltaq = delta / 64; deltar = delta % 64; assert (jmax + deltaq < smax); assert (jmin + deltaq >= 1); /* separate case for j = jmax, since jmax + deltaq + 1 might equal smax */ ap[jmax] ^= ap[jmax + deltaq] >> deltar; if (jmax + deltaq + 1 < smax && deltar != 0) ap[jmax] ^= ap[jmax + deltaq + 1] << (64 - deltar); if (deltar != 0) { for (j = jmax - 1; j > jmin; j--) { /* add the 64 - deltar least significant bits of ap[j + deltaq], after shift right by deltar */ ap[j] ^= ap[j + deltaq] >> deltar; /* add the deltar least significant bits of ap[j + deltaq + 1], after shift left by 64-deltar */ ap[j] ^= ap[j + deltaq + 1] << (64 - deltar); } } else /* special case for deltar = 0 */ { for (j = jmax - 1; j > jmin; j--) ap[j] ^= ap[j + deltaq]; } /* separate case for j = jmin, we should only modify bits x..64 where x = (alpha+1-delta) % 64 */ unsigned long x = (alpha + 1 - delta) % 64; _ntl_ulong mask = (~0UL >> x) << x; ap[jmin] ^= mask & (ap[jmin + deltaq] >> deltar); if (deltar != 0) ap[jmin] ^= mask & (ap[jmin + deltaq + 1] << (64 - deltar)); /* truncate the upper bits */ ap[r / 64] &= (1UL << (r % 64)) - 1UL; /* now we have the bits of the result interleaved in 'a' (cf "A fast ..."): b_0 b_2 b_4 b_6 ... b_{r-1} b_1 b_3 b_5 b_7 ... b_{r-2} */ jmax = (alpha + 1) / 64; /* floor(((r-1)/2+1)/64) */ deltar = (alpha + 1) % 64; _ntl_ulong *bp = b.xrep.elts(), even, odd; if (deltar != 0) { for (j = 0; j < jmax; j++) { even = ap[j]; odd = (ap[j + jmax] >> deltar) ^ (ap[j + jmax + 1] << (64 - deltar)); bp[2 * j] = _pdep_u64 (even, 0x5555555555555555) ^ _pdep_u64 (odd, 0xaaaaaaaaaaaaaaaa); bp[2 * j + 1] = _pdep_u64 (even >> 32, 0x5555555555555555) ^ _pdep_u64 (odd >> 32, 0xaaaaaaaaaaaaaaaa); } } else /* case deltar = 0 */ { for (j = 0; j < jmax; j++) { even = ap[j]; odd = ap[j + jmax]; bp[2 * j] = _pdep_u64 (even, 0x5555555555555555) ^ _pdep_u64 (odd, 0xaaaaaaaaaaaaaaaa); bp[2 * j + 1] = _pdep_u64 (even >> 32, 0x5555555555555555) ^ _pdep_u64 (odd >> 32, 0xaaaaaaaaaaaaaaaa); } } /* special case for j = jmax */ even = ap[jmax]; odd = (2 * jmax < smax) ? ap[2 * jmax] >> deltar : 0; if (2 * jmax + 1 < smax && deltar != 0) odd ^= ap[2 * jmax + 1] << (64 - deltar); if (2 * jmax < smax) bp[2 * jmax] = _pdep_u64 (even, 0x5555555555555555) ^ _pdep_u64 (odd, 0xaaaaaaaaaaaaaaaa); if (2 * jmax + 1 < smax) bp[2 * jmax + 1] = _pdep_u64 (even >> 32, 0x5555555555555555) ^ _pdep_u64 (odd >> 32, 0xaaaaaaaaaaaaaaaa); /* truncate the upper bits */ bp[r / 64] &= (1UL << (r % 64)) - 1UL; b.normalize(); } #endif void fastsqr (GF2X& b, GF2X& a, _ntl_ulong r, _ntl_ulong s) { #if 0 /* debug code */ GF2X copy_a = a, c; fastsqr_old (b, a, r, s); a = copy_a; fastsqr_pdep (c, a, r, s); if (b != c) { printf ("error for r=%lu s=%lu\n", r, s); printf ("a="); print_gf2x (copy_a); printf ("fastsqr_old: "); print_gf2x (b); printf ("fastsqr_pdep: "); print_gf2x (c); exit (1); } #else #ifdef USE_PDEP return fastsqr_pdep (b, a, r, s); #else return fastsqr_old (b, a, r, s); #endif #endif } void fastrem (GF2X& a, _ntl_ulong r, _ntl_ulong s) // Sets a := a mod (x^r + x^s + 1) using a word operations where possible. // This is much faster than NTL's rem if s > r/2. // Assumes 0 < s < r and 32-bit or 64-bit words. RPB 20070321 { long d, jw, krb, krw, ksb, ksw; long apr, aps, lastr, lasts, sh1, sh2; unsigned long rs, j, wlenr, jb; #if (NTL_BITS_PER_LONG == 64) /* Assume wordlength is 32 or 64 bits */ /* This is for 64 bits */ long wd = 6; unsigned long wlen = 64; /* wordlength (bits) = 2^wd */ unsigned long wlenm = 63; /* wlen - 1 */ #else long wd = 5; /* This is for 32 bits */ unsigned long wlen = 32; /* wordlength (bits) = 2^wd */ unsigned long wlenm = 31; /* wlen - 1 */ #endif _ntl_ulong high; int slow; _ntl_ulong *ap = a.xrep.elts(); rs = r - s; if ((s <= 0) || (rs <= 0)) { printf("Error in fastrem: r = %lu and s = %lu must satisfy r > s > 0\n", r, s); exit (1); } d = deg(a); if (d < (long) r) return; slow = ((s <= 2*wlen) || (rs <= 2*wlen)); // Avoid word ops if slow wlenr = wlen + r; for (j = d; j >= r;) { jw = j>>wd; // (j div wlen) = word index jb = j&wlenm; // (j mod wlen) = bit index in word jw if (slow || (jb != wlenm) || (j < wlenr)) { if (rep (coeff (a, j)) != 0) // This is slow but only { // executed a few times SetCoeff(a, j, 0); SetCoeff(a, j-r, !(rep (coeff (a, j-r)))); SetCoeff(a, j-rs, !(rep (coeff (a, j-rs)))); } j--; // Process next bit } else // Process by words { // Loop precomputation krb = (j-r)&wlenm; // bit index in [0..wlen) krw = (j-r)>>wd; // word index > 0 ksb = (j-rs)&wlenm; // bit index in [0..wlen) ksw = (j-rs)>>wd; // word index > 0 sh1 = wlenm - krb; // first shift amount sh2 = wlenm - ksb; // second shift amount for (lastr = lasts = 0; krw > 0; ) { // Loop to process by words high = ap[jw]; apr = ap[krw]; // In this version we avoid aps = ap[ksw]; // the " ^= " operator in ap[jw--] = 0; // the inner loop. ap[krw--] = (apr^lastr)^(high >> sh1); // This reduced dependencies. ap[ksw--] = (aps^lasts)^(high >> sh2); high = high << 1; lastr = high << krb; // krb == wlenm possible lasts = high << ksb; // ksb == wlenm possible } ap[krw] ^= lastr; ap[ksw] ^= lasts; j = r + krb; // krb bits remain } } a.normalize(); /* Normalize output */ } int lex_less (GF2X a, GF2X b, int flip) /* Returns true if (deg(a) < deg(b)) or ((deg(a) = deg(b)) and (a < b in lex ordering)) except if flip is true when this is changed appropriately. */ { long da = deg (a); long db = deg (b); long i; if (da < db) return 1; if (da > db) return 0; if (flip) for (i = 0; i <= da; i++) { if (rep (coeff (a, i)) < rep (coeff (b, i))) return 1; if (rep (coeff (a, i)) > rep (coeff (b, i))) return 0; } else for (i = da; i >= 0; i--) { if (rep (coeff (a, i)) < rep (coeff (b, i))) return 1; if (rep (coeff (a, i)) > rep (coeff (b, i))) return 0; } return 0; /* Equal here, return false */ } void print_hex (char *s, GF2X a, int flip) /* prints a in hexadecimal (leading bits first unless flip true) */ { long d = deg (a); long i, j, c; char t[17] = "0123456789abcdef"; c = 0; for (i = d; i >= 0; i--) { j = (flip) ? (d-i) : i; c = (2 * c) + rep (coeff (a, j)); if (i % 4 == 0) { *s++ = t[c]; c = 0; } } *s = '\0'; } _ntl_ulong get_certificate (GF2X a) { return a.xrep.elts()[0]; } void fastmulmod (GF2X& c, const GF2X& a, const GF2X& b, const GF2XModulus& F, _ntl_ulong r, _ntl_ulong s) // Returns c = a*b mod (x^r + x^s + 1) { if ((s <= 0) || (r <= s)) { printf("Error in fastmulmod: r = %lu and s = %lu must satisfy r > s > 0\n", r, s); exit (1); } GF2X t; mul_gen(t, a, b); if ((r&s&1) && (s > BITS_PER_LONG2) && ((r-s) > BITS_PER_LONG2)) { fastrem(t, r, s); c = t; } else rem(c, t, F); // This is slow if s > r/2 } void fastmulbyxmod (GF2X& c, const GF2X& a, _ntl_ulong r, _ntl_ulong s) // Returns c = a*x mod (x^r + x^s + 1) { if ((s <= 0) || (r <= s)) { printf("Error in fastmulbyxmod: r = %lu and s = %lu must satisfy r > s > 0\n", r, s); exit (1); } MulByX(c, a); if (deg(c) >= (long) r) { SetCoeff(c, r, 0); SetCoeff(c, s, !(rep (coeff (c, s)))); SetCoeff(c, 0, !(rep (coeff (c, 0)))); c.normalize(); } } void copy_h (vec_GF2X& hold, vec_GF2X& h, long m) /* copy h[0..m-1] into hold[0..m-1] */ { for (long i = 0; i < m; i++) hold[i] = h[i]; } void init_h (vec_GF2X& h, long k, long m, const GF2XModulus& F, _ntl_ulong r, _ntl_ulong s, int usefs) /* initialize h[j] to sum ((x^(2^k))^s, 0 <= s < 2^m, hw(s)=j+1), for 0 <= j < m */ { long i, j; GF2X a, x, htemp; /* we use the following Pascal-triangle algorithm: if S(m,j) := { 0 <= s < 2^m, hw(s) = j } then an element s of S(m,j) is either in S(m-1,j) if s < 2^(m-1), or s = 2^(m-1) + t where t is in S(m-1,j-1): S(m,j) = S(m-1,j) union [S(m-1,j-1) + 2^(m-1)] Or equivalently: S(m,j) = {2s, s in S(m-1,j)} union {1+2s, s in S(m-1,j-1)}. With S(m,0) = { 0 } and S(m,m) = { 2^m-1 }. */ clear(htemp); SetX (x); for (j = 1; j <= m; j++) { h[j-1] = 0; for (i = j-1; i >= 0; i--) { if (i > 0) { if (usefs) { fastsqr (htemp, h[i-1], r, s); h[i-1] = htemp; } else SqrMod (h[i-1], h[i-1], F); // Avoid if possible as slow fastmulbyxmod (a, h[i-1], r, s); } else a = x; add (h[i], h[i], a); } } for (j = 0; j < m; j++) { if (usefs) { for (i = 0; i < k/2; i++) { fastsqr (htemp, h[j], r, s); fastsqr (h[j], htemp, r, s); } if (k&1) // last iteration if k odd { fastsqr (htemp, h[j], r, s); h[j] = htemp; // copy result } } else for (i = 0; i < k; i++) SqrMod (h[j], h[j], F); // Avoid if possible as slow } } void usage () { fprintf (stderr, "Usage: factor [options] r\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -b d - omit hex encoding of factor if degree < d\n"); fprintf (stderr, " -f f - use interval bounds of f^j (default is f=1);\n"); fprintf (stderr, " if f=1 then intervals increase linearly in size\n"); fprintf (stderr, " if f=0 then intervals do not increase\n"); fprintf (stderr, " -m m - use double-blocking size of m\n"); // default is as for s if r small, or try to // estimate if r large fprintf (stderr, " -p - assume 2^r-1 is a Mersenne prime so any irreducible\n"); fprintf (stderr, " trinomial is primitive\n"); fprintf (stderr, " -q q0 - start with q0 blocks of length m (default is q0=4)\n"); fprintf (stderr, " -k k0 - use double-blocking strategy only for degree > k0\n"); fprintf (stderr, " (default is <= largest k0 such that 2^k0 < r); assume k0 > 0\n"); fprintf (stderr, " -skip d - skip degrees <= d (input trinomials are known to have no\n"); fprintf (stderr, " factor of degree <= d)\n"); fprintf (stderr, " -maxd d - skip degrees > d\n"); fprintf (stderr, " -v - verbose\n"); fprintf (stderr, " -z q1 - output 'u' if number of blocks of length m would be > q1\n"); fprintf (stderr, " (default is 'infinity')\n"); fprintf (stderr, " -s0 s0 - start with x^r + x^s0 + 1, default 1\n"); fprintf (stderr, " -s1 s1 - ends with x^r + x^(s1-1) + 1, default floor(r/2)+1\n"); fprintf (stderr, " -mt n - use n threads (default 1)\n"); exit (1); } /* a <- C[0] * C[1] * ... * C[z-1] mod F := (x^r+x^s+1) */ static void accumulate (GF2X& a, GF2XVec& C, const GF2XModulus& F, long r, long s) { long z = C.length(); /* invariant: z is the number of cells C[0]...C[z-1] to accumulate in a */ while (z > 1) { /* uncomment this pragma when only one trinomial has to be checked */ #pragma omp parallel for schedule(static) for (long j = 0; j < z/2; j++) fastmulmod (C[j], C[j], C[z-1-j], F, r, s); z = (z + 1) / 2; } fastmulmod (a, a, C[0], F, r, s); } int main (int argc, char *argv[]) { long r; /* degree of trinomials */ long maxd = LONG_MAX; /* skip degrees > maxd */ long m = 0, k0 = 0, b0 = 2, q0 = 4, q1 = 0; long skipd = 0, fineDDFtol; double f = 1.0; /* scaling factor, default 1.0 */ long s0 = 1, s1 = 1; int verbose = 0, primitive = 0, choose_m = 0; int mt = 1; /* print whole command line */ for (int i = 0; i < argc; i++) fprintf (stderr, "%s ", argv[i]); fprintf (stderr, "\n"); fprintf (stderr, "This is factor version %1.2f\n", VERSION); fprintf (stderr, "based on NTL version %s\n", NTL_VERSION); while (argc > 1 && argv[1][0] == '-') { if (strcmp (argv[1], "-v") == 0) { verbose ++; argc --; argv ++; } else if (strcmp (argv[1], "-p") == 0) { primitive = 1; argc --; argv ++; } else if (argc > 2 && strcmp (argv[1], "-m") == 0) { m = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-f") == 0) { f = atof (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-k") == 0) { k0 = atoi (argv[2]); if (k0 > NTL_BITS_PER_LONG) { fprintf (stderr, "Error, k0 should be <= NTL_BITS_PER_LONG\n"); exit (1); } argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-b") == 0) { b0 = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-q") == 0) { q0 = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-z") == 0) { q1 = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-skip") == 0) { skipd = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-maxd") == 0) { maxd = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-s0") == 0) { s0 = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-s1") == 0) { s1 = atoi (argv[2]); argv += 2; argc -= 2; } else if (argc > 2 && strcmp (argv[1], "-mt") == 0) { mt = atoi (argv[2]); argv += 2; argc -= 2; } else { fprintf (stderr, "Error, invalid option: %s\n", argv[1]); exit (1); } } if (argc != 2) usage (); r = atoi (argv[1]); if (r < 2) { fprintf (stderr, "Error, r < 2\n"); exit (1); } /* check s0 and s1 */ assert (0 < s0 && s0 < r); assert (0 < s1 && s1 <= r); if ((primitive) && (!ProbPrime(r, 2))) { fprintf (stderr, "Error: -p option and r = %lu is not prime\n", r); exit (1); } if (k0 == 0) { for (; (2 << k0) < r; k0++) ; if (k0 > 20) k0 = (k0+20)/2; // Empirical optimum, could check at runtime } if (m == 0) { choose_m = (r > 1000); // Later try to find optimal m for ( ; (2 << m) < r; m++) // Reasonable though probably not optimal. ; } /* we cannot determine m at runtime if mt > 1 */ assert (choose_m == 0 || mt == 1); if (r < 17) // Tiny case, this avoids a problem m = 1; // with e.g. r = 11, s = 1. if (r < 1000) // Small case, this avoids a problem q0 = 1; // with e.g. r = 521, s = 62, failing // to enter fineDDF mode (it was OK with // V1.29, but not with V1.30 .. V1.32) if (m > r / 2) { fprintf (stderr, "Error, m = %ld greater than r/2\n", m); exit (1); } if (q0 < 1) { fprintf (stderr, "Error, q0 < 1\n"); exit (1); } if (q1 == 0) q1 = r; // Effectively infinity long r3; for (r3 = 0; r3*r3*r3 < r; r3++) ; // r3 = r^(1/3) fineDDFtol = 2*r3*r3; // 2*r^(2/3) if (verbose) { printf ("Test separately degrees up to k0=%ld\n", k0); if (skipd > 0) printf ("Skip degrees up to %ld\n", skipd); printf ("Using block size of m=%ld\n", m); printf ("Start with q0=%ld block(s)\n", q0); if (q1 < r) printf ("Stop when number of blocks is > q1=%ld\n", q1); printf ("Use fine DDF above %ld\n", fineDDFtol); fflush (stdout); } /* since all degree k factors divide x^(2^k)-x, if x^r+x^s+1 has a degree k factor, then so has x^r+x^(s+2^k-1)+1, thus if 2^k-1 <= floor(r/2)-1, i.e. 2^(k+1) <= r, then we can save some computations */ /* NTL is thread-safe up from version 7 */ if (mt > 1 && NTL_MAJOR_VERSION < 7) { fprintf (stderr, "Error, use NTL version >= 7 with multiple threads\n"); exit (1); } /* prepare inputs */ long *todo, ntodo = 0; todo = (long*) malloc (r * sizeof (long)); /* fill todo[] with entries in [s0, s1-1] */ for (long s = s0; s < s1; s++) todo[ntodo++] = s; /* read entries from stdin (only when s0 >= s1) */ if (ntodo == 0) while (1) { long s; int ret = scanf ("%ld", &s); if (ret != 1) break; assert (0 < s && s < r); todo[ntodo++] = s; assert (ntodo <= r); } omp_set_num_threads (mt); #pragma omp parallel #pragma omp master printf ("Using %d thread(s)\n", omp_get_num_threads ()); /* uncomment this pragma when several trinomials are checked in parallel */ // #pragma omp parallel for schedule(dynamic) for (long idx = 0; idx < ntodo; idx++) { long input_s = todo[idx]; int divisible, skip; long s = input_s, j, l; long ss, rhigh, k = 0, k1, k2, q, q2 = 0; int fineDDF, flip, swan; char *fact; double f0; int usefastsqr; _ntl_ulong certificate; fact = (char*) malloc ((2 + (r / 4)) * sizeof (char)); skip = 0; GF2X p; SetCoeff(p, r); SetCoeff(p, 0); if (s < 1) { fprintf (stderr, "Error, s < 1\n"); exit (1); } if (s >= r) { fprintf (stderr, "Error, s = %ld >= r\n", s); exit (1); } // We want to flip (i.e. consider reciprocal trinomial x^r + x^(r-s) + 1) // if s > r/2, because the NTL mod operation is slow in this case. // However, we also need to flip if s is even, so that we can use // the fast squaring algorithm (fastsqr). Thus sometimes we work with // s > r/2 (but then SqrMod is avoided where possible). ss = s; // Save s (in case flipped) flip = 0; if (2*s > r) { flip = 1; // Use reciprocal trinomial s = r - s; // Original s saved in ss } usefastsqr = 0; if ((r&1) && ((s&1) == 0) && (s > BITS_PER_LONG2) && ((r-s) > BITS_PER_LONG2)) { flip = !flip; // Flip (again if necessary) s = r - s; // so we can use fastsqr } usefastsqr = ((r&s&1) && (s > BITS_PER_LONG2) && ((r-s) > BITS_PER_LONG2)); if (verbose && flip) printf ("Using reciprocal trinomial\n"); if (verbose && usefastsqr) printf ("Using fastsqr\n"); // If r = +-1 mod 8, // and s even and s does not divide 2r, // or s odd and (r-s) does not divide 2r, // then x^r + x^s + 1 had an odd number of irreducible factors // by Swan's theorem. swan = (((r&7) == 1) || ((r&7) == 7)) && ((((s&1)==0) && (((2*r)%s) != 0)) || (((s&1)==1) && (((2*r)%(r-s)) != 0))); rhigh = (swan) ? (r/3) : (r/2); /* in case the -skip d option is used, and d >= rhigh, stop at d+1 */ if (skipd >= rhigh) { rhigh = skipd + 1; if (rhigh > r) rhigh = r; } else if (verbose && swan) printf ("By Swan's theorem search at most to degree %ld\n", rhigh); if (maxd < rhigh) { rhigh = maxd; if (verbose) printf ("Maximal degree checked reduced to %ld\n", rhigh); } SetCoeff(p, s, 1); GF2X a, c, htemp, htemp2; GF2XModulus F; int Finit = 0; // non zero if F is build clear(htemp); double st; if (choose_m) // Try to estimate optimal m { long jt, jtt, mopt; double times, timem; if ((Finit == 0) && (!usefastsqr)) { build (F, p); Finit = 1; } choose_m = 0; // Only try once SetCoeff (htemp, 0, 1); SetCoeff (htemp, 1, 1); if (usefastsqr) { for (jt = 0; jt < 50; jt++) // Warm up cache { // and make htemp dense fastsqr (htemp2, htemp, r, s); fastsqr (htemp, htemp2, r, s); } times = GetTime (); for (jt = 0; (GetTime() - times) < (double)1.0 ; jt += 100) for (jtt = 0; jtt < 50; jtt++) // Avoid many GetTime calls { fastsqr (htemp2, htemp, r, s); fastsqr (htemp, htemp2, r, s); } } else { for (jt = 0; jt < 100; jt++) SqrMod (htemp, htemp, F); // Warm up cache times = GetTime (); for (jt = 0; (GetTime() - times) < (double)1.0; jt += 100) for (jtt = 0; jtt < 100; jtt++) SqrMod (htemp, htemp, F); } times = (GetTime () - times)/(double)jt; fastmulmod (htemp, htemp, htemp, F, r, s); timem = GetTime (); for (jt = 0; (GetTime() - timem) < (double)1.0; jt++) fastmulmod (htemp, htemp, htemp2, F, r, s); timem = (GetTime () - timem)/(double)jt; // Prefer even m to avoid copying overhead mopt = 2*(long)((double)0.5*sqrt(timem/times) + (double)0.5); fprintf (stderr, "M %f msec, S %f msec, M/S %f, sqrt(M/S) %f\n", 1000.0* timem, 1000.0*times, timem/times, sqrt(timem/times)); fprintf (stderr, "Estimate of best m %ld\n", mopt); if ((mopt > 1) && (mopt <= 100)) { m = mopt; if (verbose) printf ("Using optimal block size of m=%ld\n", m); } } vec_GF2X h(INIT_SIZE, m); vec_GF2X hold(INIT_SIZE, m); /* copy of h for fine DDF */ f0 = (double) 1.0; q = 0; k2 = 1; /* invariant: k2 is last degree checked */ fineDDF = 0; /* 0 as long as GCDs are trivial */ for (a = 1; (deg (a) == 0 && k2 < rhigh) || fineDDF != 0;) { if (fineDDF == 0) k = k2 + 1; /* next degree to check */ else /* fineDDF mode */ { if (deg (a) > 0) /* smallest factor in current interval */ { a = 1; /* reset a to 1 */ q2 = q / 2; q = q - q2; copy_h (h, hold, m); /* revert to initial h */ } else /* smallest factor in next interval */ { k += q * m; q = q2; } k2 = k + q * m - 1; } if (k <= k0) /* sieve only one degree at a time */ { unsigned long K = (1 << k) - 1; if (verbose) printf ("Degree %ld: ", k); if (k <= skipd) { if (verbose) printf ("skip\n"); } else { a = 1; SetCoeff (a, K); c = 1; SetCoeff (c, r % K, coeff (c, r % K) == 0); SetCoeff (c, s % K, coeff (c, s % K) == 0); st = GetTime (); GCD (a, a, c); if (verbose) { printf ("gcd took %f sec\n", GetTime () - st); fflush (stdout); } } k2 = k; } else /* use double-blocking strategy */ { if ((Finit == 0) && (!usefastsqr)) { build (F, p); Finit = 1; } /* initialize h-table */ if (k == k0 + 1) { st = GetTime (); init_h (h, k, m, F, r, s, usefastsqr); if (verbose) printf ("Exponentiation took %f\n", GetTime () - st); } if (fineDDF == 0) { if (f == 0.0) q = q0; /* no increase */ else if (f > (double) 1.0) q = (long) (f0 * (double) q0 + (double) 0.5); // round else q = q + q0; // linear increase if f = 1 f0 = f * f0; k2 = k + q * m - 1; // q blocks of size m } if (verbose) { printf ("Current q %ld\n", q); fflush (stdout); } /* k2 should not exceed rhigh + m - 1 < r */ if (k2 > rhigh) /* should not happen in fine DDF mode */ { q = (rhigh - k + m) / m; // Round up k2 = k + q * m - 1; if (verbose) printf ("Reducing q to %ld\n", q); } /* we need to save h whenever q > 1 and the current gcd=1 */ if (q > 1 && deg (a) == 0) /* save h for fineDDF */ copy_h (hold, h, m); if (verbose) { printf ("Interval %ld..%ld:\n", k, k2); fflush (stdout); } if (q > q1) /* Output "u" and skip here */ { if (verbose) printf ("q > q1 so skipping further test\n"); skip = 1; divisible = 0; k2 = r; } else { st = GetTime (); double wct = WctTime (); long i; /* we can't easily parallelize this loop since the h[j] are updated at each loop on i */ GF2XVec C; C.SetSize ((k2 - k + m) / m, (r + NTL_BITS_PER_LONG - 1) / NTL_BITS_PER_LONG); long z = 0; for (i = k; i + m - 1 <= k2 ; i += m, z++) /* i .. i+m-1 */ { if (i + m - 1 <= skipd) { if (verbose >= 2) printf (" skip degree interval %ld..%ld\n", i, i + m - 1); } else { C[z] = 1; /* s_{0,m} = 1 */ /* first compute the polynomial p_m(X,x) from head of page 51 in "A multi-level blocking distinct-degree factorization algorithm" */ for (j = 0; j < m; j++) { fastmulbyxmod (C[z], C[z], r, s); add (C[z], C[z], h[j]); } } /* update the h[j] values */ for (j = 0; j < m; j++) { if (usefastsqr) { // Can use fastsqr here for (l = 0; l < m/2; l++) { fastsqr (htemp, h[j], r, s); fastsqr (h[j], htemp, r, s); } if (m&1) // Last square if m odd { fastsqr (htemp, h[j], r, s); h[j] = htemp; // Copy result to h[j] } } else // Have to use SqrMod here for (l = 0; l < m; l++) SqrMod (h[j], h[j], F); } } assert (z == (k2 - k + m) / m); if (k2 <= skipd) { if (verbose) { printf (" skip products\n"); fflush (stdout); } goto gcds; } /* accumulate the C[z] values */ accumulate (a, C, F, r, s); st = GetTime () - st; if (verbose) { double wt = WctTime () - wct; printf (" squares/products took %.1f (wct %.1f), per term %.3f (wct %.3f)\n", st, wt, st/(double)(q*m), wt/(double)(q*m)); fflush (stdout); } gcds: if (k2 <= skipd) { if (verbose) { printf (" skip gcd\n"); fflush (stdout); } } else { st = GetTime (); if (m == 1 && q == 1 && f == 0.0 && skipd == r-1) /* mimic irred */ certificate = get_certificate (a); FastGCD(a, a, p); if (verbose) { printf (" gcd took %f\n", GetTime () - st); fflush (stdout); } if (deg(a) > 0) { /* check for GCD error */ if (deg(a) < k) { printf ("Error: GCD degree %ld<%ld for s=%ld\n", deg(a), k, input_s); exit (1); } /* exit the loop if we isolated a single factor or q = 1 (we cannot refine any more) or deg(a) < 10*sqrt(r) so CanZass cheap */ if (deg (a) < 2 * k || q == 1 || deg (a) < fineDDFtol) break; fineDDF = 1; /* enter fineDDF mode */ if (verbose) printf ("Entering fine DDF mode\n"); } } } } } k1 = deg (a); /* if k1 = r, the trinomial is irreducible */ if (rhigh < r) divisible = k1 != 0; else /* case rhigh = r: either we found a factor of degree < r, or we went up to degree r */ divisible = k1 < r; if (divisible) { if (k1 >= 2 * k) { vec_pair_GF2X_long factors; st = GetTime (); CanZass (factors, a, 0); long i0 = 0; // find lexicographically least factor of smallest degree // (except if flipped) for (long i = 1; i < factors.length(); i++) if (lex_less(factors[i].a, factors[i0].a, flip)) i0 = i; a = factors[i0].a; // the lex least factor of smallest // degree (unless flipped) if (verbose) printf ("CanZass took %f, total degree %ld, small degree %ld\n", GetTime () - st, k1, deg(a)); k1 = deg(a); // the smallest degree if (k1 < k) { printf ("Error: GCD degree %ld < %ld for s=%ld\n", k1, k, input_s); exit (1); } } if (k1 != 0) /* k1=0 can happen with -skip option */ print_hex (fact, a, flip); } #pragma omp critical { if (!divisible || k1 == r) { if (skip) printf ("%ld u\n", ss); else if (primitive) printf ("%ld primitive\n", ss); else printf ("%ld irreducible\n", ss); } else { if (k1 != 0) printf ("%ld %ld", ss, k1); else printf ("%ld non-irreducible (LOG %lx)", ss, (certificate ^ 0x2) & 0xFFFFFFFF); if (k1 >= b0) printf (" p%s", fact); printf("\n"); } } fflush (stdout); free (fact); } free (todo); return 0; } gf2x-1.2/apps/halfgcd.cpp0000644000327606072450000002405612725540356012242 00000000000000/* This file is part of the gf2x library. Copyright 2007, 2008, 2009 Richard Brent, Pierrick Gaudry, Emmanuel Thome', Paul Zimmermann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307, USA. */ /* Subquadratic gcd over GF(2)[x]. */ // #define BOGONG // Selects routines that run well on bogong, // a 2.2 Ghz AMD Opteron 275 at ANU #undef STATS // If defined, statistics will be gathered // and printed on stdout #include #include "halfgcd.hpp" /* This threshold controls the internal calls to HalfGCD. */ #define NTL_GF2X_HalfGCD_CROSSOVER (4*NTL_BITS_PER_LONG) /* this threshold controls the calls in FastGCD, thus is less sensitive */ #define NTL_GF2X_GCD_CROSSOVER (5*NTL_GF2X_HalfGCD_CROSSOVER) #ifdef STATS long mulktm = 0x3fffff; // mask for mul1kt, mul2kt long addktm = 0xffff; // mask for Mul1kt, Add1kt long mul1kt = 0; // counts calls to mul1 or mul1rpb long mul2kt = 0; // counts calls to mul2 or mul2t long Mul1kt = 0; // counts calls to mul_1_n long Mul1kts = 0; // sum of sizes sb in calls to mul_1_n long Add1kt = 0; // counts calls to addmul_1_n long Add1kts = 0; // sum of sizes sb in calls to addmul_1_n #endif #include "gf2x.h" using namespace NTL; class GF2XMatrix { private: GF2XMatrix(const GF2XMatrix&); // disable GF2X elts[2][2]; public: GF2XMatrix() { } ~GF2XMatrix() { } void operator=(const GF2XMatrix&); GF2X& operator() (long i, long j) { return elts[i][j]; } const GF2X& operator() (long i, long j) const { return elts[i][j]; } }; void mul_gen(GF2X& c, const GF2X& a, const GF2X& b) { long sa = a.xrep.length(); long sb = b.xrep.length(); if (sa <= 0 || sb <= 0) { clear(c); return; } c.xrep.SetLength(sa+sb); /* gf2x_mul now properly handles possible aliasing a==c and b==c */ gf2x_mul(c.xrep.elts(), a.xrep.elts(), sa, b.xrep.elts(), sb); c.normalize(); } void mul (GF2X& U, GF2X& V, const GF2XMatrix& M) // (U, V)^T = M*(U, V)^T { GF2X RU, RV, R1, R2; // RU = U // RV = V // R1 = M(0,0) mul_gen(R1, M(0,0), U); // R2 = M(0,1) mul_gen(R2, M(0,1), V); add(R2, R1, R2); // R1 = M(1,0) mul_gen(R1, M(1,0), U); U = R2; // previous value // R2 = M(1,1) mul_gen(R2, M(1,1), V); add(V, R1, R2); } void mul (GF2XMatrix& A, GF2XMatrix& B, GF2XMatrix& C) // A = B*C, B and C are destroyed { GF2X B00, B01, B10, B11, C0, C1, T1, T2; mul_gen(T1, B(0,0), C(0,0)); mul_gen(T2, B(0,1), C(1,0)); add(A(0,0), T1, T2); mul_gen(T1, B(1,0), C(0,0)); mul_gen(T2, B(1,1), C(1,0)); add(A(1,0), T1, T2); C(0,0).kill(); C(1,0).kill(); mul_gen(T1, B(0,0), C(0,1)); mul_gen(T2, B(0,1), C(1,1)); add(A(0,1), T1, T2); mul_gen(T1, B(1,0), C(0,1)); mul_gen(T2, B(1,1), C(1,1)); add(A(1,1), T1, T2); C(0,1).kill(); C(1,1).kill(); B(0,0).kill(); B(1,0).kill(); B(0,1).kill(); B(1,1).kill(); } void strassen_mul (GF2XMatrix& C, GF2XMatrix& A, GF2XMatrix& B) // C = A*B, A and B are destroyed /* we follow the code from SAGE 1.6, file strassen.pyx */ { GF2X S0, T0, S1, T1, S2, T2, S3, T3, P0, P1, P2, P3, P4, P5, P6; add (S0, A(1,0), A(1,1)); add (T0, B(0,1), B(0,0)); add (S1, S0, A(0,0)); add (T1, B(1,1), T0); add (S2, A(0,0), A(1,0)); add (T2, B(1,1), B(0,1)); add (S3, A(0,1), S1); add (T3, B(1,0), T1); mul_gen (P0, A(0,0), B(0,0)); mul_gen (P1, A(0,1), B(1,0)); mul_gen (P2, S0, T0); mul_gen (P3, S1, T1); mul_gen (P4, S2, T2); mul_gen (P5, S3, B(1,1)); mul_gen (P6, A(1,1), T3); add (C(0,0), P0, P1); /* U0 */ add (C(0,1), P0, P3); /* U1 */ add (C(1,1), C(0,1), P4); /* U2 */ add (C(1,0), C(1,1), P6); /* U3 */ add (C(1,1), C(1,1), P2); /* U4 */ add (C(0,1), C(0,1), P2); /* U5 */ add (C(0,1), C(0,1), P5); /* U6 */ A(0,0).kill(); A(1,0).kill(); A(0,1).kill(); A(1,1).kill(); B(0,0).kill(); B(1,0).kill(); B(0,1).kill(); B(1,1).kill(); } void IterHalfGCD (GF2XMatrix& M_out, GF2X& U, GF2X& V, long d_red) { M_out(0,0).SetMaxLength(d_red); M_out(0,1).SetMaxLength(d_red); M_out(1,0).SetMaxLength(d_red); M_out(1,1).SetMaxLength(d_red); set(M_out(0,0)); clear(M_out(0,1)); clear(M_out(1,0)); set(M_out(1,1)); long goal = deg(U) - d_red; if (deg(V) <= goal) return; GF2X Q, t(INIT_SIZE, d_red); while (deg(V) > goal) { /* For the gcd of two polynomials of degree < 74207281, this PlainDivRem() call takes about 20% of the total gcd time. Here U and V have degree less than about 2*NTL_GF2X_HalfGCD_CROSSOVER, and usually deg(V) = deg(U) - . */ PlainDivRem(Q, U, U, V); swap(U, V); mul_gen(t, Q, M_out(1,0)); add(t, M_out(0,0), t); // add=sub over GF2 M_out(0,0) = M_out(1,0); M_out(1,0) = t; mul_gen(t, Q, M_out(1,1)); add(t, M_out(0,1), t); // add=sub over GF2 M_out(0,1) = M_out(1,1); M_out(1,1) = t; } } void GF2XMatrix::operator=(const GF2XMatrix& M) { elts[0][0] = M.elts[0][0]; elts[0][1] = M.elts[0][1]; elts[1][0] = M.elts[1][0]; elts[1][1] = M.elts[1][1]; } // c <- a mod x^n, with n >= 0 void RightShiftRem (GF2X& c, const GF2X& a, long n) { if (deg(a) < n) // covers a=0 too { c = a; return; } long sa = a.xrep.length(); // number of words of a long wn = n / NTL_BITS_PER_LONG; long bn = n - wn * NTL_BITS_PER_LONG; // #bits of ap[wn] if (wn >= sa) { wn = sa; bn = 0; } c.xrep.SetLength (wn + (bn != 0)); _ntl_ulong *cp = c.xrep.elts(); const _ntl_ulong *ap = a.xrep.elts(); long i; for (i = 0; i < wn; i++) cp[i] = ap[i]; if (bn) cp[wn] = ap[wn] & ((1UL << bn) - 1UL); c.normalize(); } // same as HalfGCD, except U and V are replaced by U' and V' // if extended is zero, the matrix M_out is not computed, and the inputs are // fully reduced. // We want to reduce deg(V) to <= deg(U) - d_red // Usually if deg(U) = m, then d_red = m/2 void HalfGCD2 (GF2XMatrix& M_out, GF2X& U, GF2X& V, long d_red, int extended) { long degU = deg(U); if (IsZero(V) || deg(V) <= degU - d_red) { if (extended != 0) { set(M_out(0,0)); clear(M_out(0,1)); clear(M_out(1,0)); set(M_out(1,1)); } return; } if (d_red <= NTL_GF2X_HalfGCD_CROSSOVER) { IterHalfGCD(M_out, U, V, d_red); return; } long d1 = (d_red + 1) / 2; /* d1 is about m/4 */ if (extended == 0) d1 = deg(U) / 4; if (d1 < 1) d1 = 1; if (d1 >= d_red) d1 = d_red - 1; long n = degU - 2 * d1 + 2; /* n is the ignored part, about m/2 */ if (n < 0) n = 0; GF2X U1, V1; if (n != 0) { RightShiftRem (U1, U, n); /* U1 = U mod x^n: m/2 bits */ RightShiftRem (V1, V, n); /* V1 = V mod x^n: m/2 bits */ RightShift (U, U, n); /* U = U div x^n has about m/2 bits */ RightShift (V, V, n); /* V = V div x^n has about m/2 bits */ } GF2XMatrix M1; HalfGCD2 (M1, U, V, d1, extended || (n != 0)); /* the entries of M1 have m/4 bits, and U,V have been reduced to m/4 bits */ if (n != 0) { LeftShift (U, U, n); LeftShift (V, V, n); mul (U1, V1, M1); /* U1,V1:m/2 M1:m/4 cost: 4 M(m/2,m/4) */ add (U, U, U1); add (V, V, V1); } /* now U, V have 3m/4 bits */ // FIXME (24 June 2007): shouldn't it be deg(U) instead of deg(V) below? long d2 = deg(V) - (degU - d_red); /* should be about m/2 */ if (IsZero(V) || d2 <= 0) { if (extended != 0) M_out = M1; return; } GF2X Q; GF2XMatrix M2; /* this PlainDivRem() call takes negligible time */ PlainDivRem (Q, U, U, V); swap (U, V); if (extended) { GF2X t; mul_gen (t, Q, M1(1,0)); add (t, M1(0,0), t); swap (M1(0,0), M1(1,0)); swap (M1(1,0), t); mul_gen (t, Q, M1(1,1)); add (t, M1(0,1), t); swap (M1(0,1), M1(1,1)); swap (M1(1,1), t); } else d2 = deg(U); // fully reduce V if (IsZero(V) || deg(V) <= degU - d_red) { if (extended) M_out = M1; return; } n = deg(U) - 2 * d2 + 2; /* should be about m/4 */ if (n < 0 || extended == 0) n = 0; if (n != 0) { RightShiftRem (U1, U, n); /* U1,V1 have m/4 bits */ RightShiftRem (V1, V, n); RightShift(U, U, n); /* U,V have m/2 bits */ RightShift(V, V, n); } HalfGCD2 (M2, U, V, d2, extended || (n != 0)); /* now U,V have m/4 bits, like the entries of M2 */ if (n != 0) { LeftShift (U, U, n); LeftShift (V, V, n); mul (U1, V1, M2); /* 4 M(m/4) */ add (U, U, U1); add (V, V, V1); } if (extended) strassen_mul (M_out, M2, M1); /* 8 M(m/4) */ } /* in the general case, we have deg(u) and deg(v) about the same here */ void FastGCD(GF2X& d, const GF2X& u, const GF2X& v) { GF2X u1, v1; GF2XMatrix M1; u1 = u; v1 = v; if (deg(u1) == deg(v1)) { if (IsZero(u1)) { clear(d); return; } rem(v1, v1, u1); } else if (deg(u1) < deg(v1)) { swap(u1, v1); } // deg(u1) > deg(v1) /* in practice this while loop will be performed only once, since HalfGCD fully reduces the inputs */ while (deg(u1) > NTL_GF2X_GCD_CROSSOVER && !IsZero(v1)) { HalfGCD2 (M1, u1, v1, deg (u1), 0); if (!IsZero(v1)) { rem(u1, u1, v1); swap(u1, v1); } } // base case. GCD(d, u1, v1); } gf2x-1.2/apps/check-factor-000.sh0000755000327606072450000000007112725540356013322 00000000000000[ "`echo 12 u | ./factor 1279`" = "12 41 p3f5c0802ded" ] gf2x-1.2/apps/check-factor-001.sh0000755000327606072450000000007012725540356013322 00000000000000[ "`echo 12345 u | ./factor 7654321`" = "12345 6 p5b" ] gf2x-1.2/apps/check-factor-002.sh0000755000327606072450000000006712725540356013331 00000000000000[ "`echo 12345 u | ./factor 654321`" = "12345 6 p49" ] gf2x-1.2/apps/check-factor-003.sh0000755000327606072450000000006612725540356013331 00000000000000[ "`echo 12345 u | ./factor 54321`" = "12345 5 p2f" ]