From 4435124b32255c1f32d1ef840a76a11c10e79aa8 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Mon, 8 Apr 2019 17:41:27 +0000 Subject: [PATCH] added --enable-full-liw to configure.ac --- moo/Makefile.in | 9 +++++---- moo/configure | 31 ++++++++++++++++++++++++++++++- moo/configure.ac | 10 ++++++++++ moo/lib/Makefile.in | 1 + moo/lib/moo-cfg.h.in | 3 +++ moo/lib/moo.h | 6 +++--- moo/mod/Makefile.in | 1 + 7 files changed, 53 insertions(+), 8 deletions(-) diff --git a/moo/Makefile.in b/moo/Makefile.in index 9e029b0..2105b34 100644 --- a/moo/Makefile.in +++ b/moo/Makefile.in @@ -355,6 +355,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -585,7 +586,7 @@ distdir: $(DISTFILES) ! -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 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -611,7 +612,7 @@ 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 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -629,7 +630,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -639,7 +640,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/moo/configure b/moo/configure index 830b9df..08c2985 100755 --- a/moo/configure +++ b/moo/configure @@ -791,6 +791,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -825,6 +826,7 @@ with_sysroot enable_libtool_lock enable_debug enable_unicode +enable_full_liw enable_cxx enable_dynamic_module enable_static_module @@ -887,6 +889,7 @@ 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}' @@ -1139,6 +1142,15 @@ do | -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=* \ @@ -1276,7 +1288,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1429,6 +1441,7 @@ Fine tuning of the installation directories: --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] @@ -1482,6 +1495,7 @@ Optional Features: --enable-unicode Use the unicode character type as the default character type. one of yes, no, yes:2, yes:4, no:2, no:4 (default. yes) + --enable-full-liw Use a full word as a large integer word --enable-cxx build the library for C++ if a C++ compiler is available (default. yes) --enable-dynamic-module enable dynamic module capability(default. yes) @@ -21506,6 +21520,21 @@ $as_echo "#define MOO_UNICODE_SIZE 1" >>confdefs.h fi +# Check whether --enable-full-liw was given. +if test "${enable_full_liw+set}" = set; then : + enableval=$enable_full_liw; enable_full_liw=$enableval +else + enable_full_liw=no + +fi + +if test "${enable_full_liw}" = "yes" +then + +$as_echo "#define MOO_ENABLE_FULL_LIW 1" >>confdefs.h + +fi + # Check whether --enable-cxx was given. if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; enable_cxx_is=$enableval diff --git a/moo/configure.ac b/moo/configure.ac index 8695616..7c1b8d9 100644 --- a/moo/configure.ac +++ b/moo/configure.ac @@ -702,6 +702,16 @@ else AC_DEFINE([MOO_UNICODE_SIZE],[1],[Unicode character type size]) fi +AC_ARG_ENABLE([full-liw], + [AS_HELP_STRING([--enable-full-liw],[Use a full word as a large integer word])], + enable_full_liw=$enableval, + enable_full_liw=no +) +if test "${enable_full_liw}" = "yes" +then + AC_DEFINE([MOO_ENABLE_FULL_LIW],[1],[Use a full word as a large integer word]) +fi + AC_ARG_ENABLE([cxx], [AS_HELP_STRING([--enable-cxx],[build the library for C++ if a C++ compiler is available (default. yes)])], enable_cxx_is=$enableval, diff --git a/moo/lib/Makefile.in b/moo/lib/Makefile.in index ba5dff2..b234a53 100644 --- a/moo/lib/Makefile.in +++ b/moo/lib/Makefile.in @@ -404,6 +404,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/moo/lib/moo-cfg.h.in b/moo/lib/moo-cfg.h.in index 801cfd3..b235eca 100644 --- a/moo/lib/moo-cfg.h.in +++ b/moo/lib/moo-cfg.h.in @@ -318,6 +318,9 @@ /* enable dynamic module capability */ #undef MOO_ENABLE_DYNAMIC_MODULE +/* Use a full word as a large integer word */ +#undef MOO_ENABLE_FULL_LIW + /* use libltdl when loading a dynamic module */ #undef MOO_ENABLE_LIBLTDL diff --git a/moo/lib/moo.h b/moo/lib/moo.h index d3493da..39f2507 100644 --- a/moo/lib/moo.h +++ b/moo/lib/moo.h @@ -162,11 +162,11 @@ typedef struct moo_obj_word_t* moo_oop_word_t; /* ========================================================================= * BIGINT TYPES AND MACROS * ========================================================================= */ -#if (MOO_SIZEOF_UINTMAX_T > MOO_SIZEOF_OOW_T) -/*# define MOO_USE_FULL_WORD*/ +#if defined(MOO_ENABLE_FULL_LIW) && (MOO_SIZEOF_UINTMAX_T > MOO_SIZEOF_OOW_T) +# define MOO_LIW_IS_OOW #endif -#if defined(MOO_USE_FULL_WORD) +#if defined(MOO_LIW_IS_OOW) typedef moo_oow_t moo_liw_t; /* large integer word */ typedef moo_ooi_t moo_lii_t; typedef moo_uintmax_t moo_lidw_t; /* large integer double word */ diff --git a/moo/mod/Makefile.in b/moo/mod/Makefile.in index 721f361..ded4eec 100644 --- a/moo/mod/Makefile.in +++ b/moo/mod/Makefile.in @@ -419,6 +419,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@