diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-26 13:20:05 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-26 13:20:05 -0700 |
commit | c70758e3b49beb016a3d9db7b609c499d55de48b (patch) | |
tree | 6a53bd8ae82ecc8a56d885c93f2097c779027492 | |
parent | d9e13a5a3ceeaa500e9c75e52547c8b67950c441 (diff) | |
parent | ac36f1a7237e1e804d7f07bed4226a3f5a3320d8 (diff) |
Merge branch 'incoming'
-rw-r--r-- | AUTHORS | 1 | ||||
-rwxr-xr-x | emcc | 46 | ||||
-rw-r--r-- | src/library.js | 2 | ||||
-rw-r--r-- | src/settings.js | 4 | ||||
-rw-r--r-- | system/include/dlfcn.h | 8 | ||||
-rw-r--r-- | system/include/execinfo.h | 44 | ||||
-rw-r--r-- | system/include/libc/pthread.h | 4 | ||||
-rw-r--r-- | system/include/libc/sys/resource.h | 1 | ||||
-rw-r--r-- | system/include/libc/sys/types.h | 8 | ||||
-rw-r--r-- | system/include/mntent.h | 23 | ||||
-rw-r--r-- | system/include/spawn.h | 105 | ||||
-rw-r--r-- | system/include/sys/ioctl.h | 3 | ||||
-rwxr-xr-x | tests/poppler/configure | 465 | ||||
-rw-r--r-- | tests/poppler/configure.ac | 40 | ||||
-rwxr-xr-x | tests/runner.py | 76 | ||||
-rw-r--r-- | tools/file_packager.py | 63 | ||||
-rw-r--r-- | tools/scons/site_scons/site_tools/emscripten/emscripten.py | 2 | ||||
-rw-r--r-- | tools/settings_template_readonly.py (renamed from settings.py) | 2 | ||||
-rw-r--r-- | tools/shared.py | 27 |
19 files changed, 568 insertions, 356 deletions
@@ -36,3 +36,4 @@ a license to everyone to use it as detailed in LICENSE.) * Mokhtar Naamani <mokhtar.naamani@gmail.com> * Benjamin Stover <benjamin.stover@gmail.com> * Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> +* Janus Troelsen <janus.troelsen@stud.tu-darmstadt.de> @@ -159,6 +159,18 @@ Options that are modified or new in %s include: -s OPTION=VALUE JavaScript code generation option passed into the emscripten compiler. For the available options, see src/settings.js + Note that for options that are lists, you + need quotation marks in most shells, for + example + + -s RUNTIME_LINKED_LIBS="['liblib.so']" + + or + + -s "RUNTIME_LINKED_LIBS=['liblib.so']" + + (without the external "s in either of those, + you would get an error) --typed-arrays <mode> 0: No typed arrays 1: Parallel typed arrays @@ -321,6 +333,14 @@ elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs print 'emcc (Emscripten GCC-like replacement) 2.0' exit(subprocess.call([shared.CLANG, '-v'])) +def is_minus_s_for_emcc(newargs,i): + assert newargs[i] == '-s' + if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option + return True + else: + print >> sys.stderr, 'emcc: warning: treating -s as linker option and not as -s OPT=VALUE for js compilation' + return False + # If this is a configure-type thing, do not compile to JavaScript, instead use clang # to compile to a native binary (using our headers, so things make sense later) CONFIGURE_CONFIG = os.environ.get('EMMAKEN_JUST_CONFIGURE') or 'conftest.c' in sys.argv @@ -329,7 +349,21 @@ if CONFIGURE_CONFIG or CMAKE_CONFIG: compiler = shared.CLANG if not ('CXXCompiler' in ' '.join(sys.argv) or os.environ.get('EMMAKEN_CXX')): compiler = shared.to_cc(compiler) - cmd = [compiler] + shared.EMSDK_OPTS + ['-DEMSCRIPTEN'] + sys.argv[1:] + def filter_emscripten_options(argv): + idx = 0 + skip_next = False + for el in argv: + if skip_next: + skip_next = False + idx += 1 + continue + if el == '-s' and is_minus_s_for_emcc(argv, idx): + skip_next = True + else: + yield el + idx += 1 + + cmd = [compiler] + shared.EMSDK_OPTS + ['-DEMSCRIPTEN'] + list(filter_emscripten_options(sys.argv[1:])) if DEBUG: print >> sys.stderr, 'emcc, just configuring: ', ' '.join(cmd) exit(subprocess.call(cmd)) @@ -448,6 +482,8 @@ try: def check_bad_eq(arg): assert '=' not in arg, 'Invalid parameter (do not use "=" with "--" options)' + absolute_warning_shown = False + for i in range(len(newargs)): if newargs[i].startswith('-O'): try: @@ -538,7 +574,9 @@ try: print >> sys.stderr, 'emcc: clearing cache' shared.Cache.erase() elif newargs[i].startswith(('-I/', '-L/')): - print >> sys.stderr, 'emcc: warning: -I or -L of an absolute path encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)' # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not + if not absolute_warning_shown: + print >> sys.stderr, 'emcc: warning: -I or -L of an absolute path encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)' # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not + absolute_warning_shown = True newargs = [ arg for arg in newargs if arg is not '' ] if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level] @@ -553,11 +591,9 @@ try: settings_changes = [] for i in range(len(newargs)): if newargs[i] == '-s': - if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option + if is_minus_s_for_emcc(newargs, i): settings_changes.append(newargs[i+1]) newargs[i] = newargs[i+1] = '' - else: - print >> sys.stderr, 'emcc: warning: treating -s as linker option and not as -s OPT=VALUE for js compilation' elif newargs[i].startswith('--typed-arrays'): assert '=' not in newargs[i], 'Invalid typed arrays parameter (do not use "=")' settings_changes.append('USE_TYPED_ARRAYS=' + newargs[i+1]) diff --git a/src/library.js b/src/library.js index 798a6f58..1c150bc9 100644 --- a/src/library.js +++ b/src/library.js @@ -359,7 +359,7 @@ LibraryManager.library = { var success = true; if (typeof XMLHttpRequest !== 'undefined') { // Browser. - assert('Cannot do synchronous binary XHRs in modern browsers. Use --embed-file or --preload-file in emcc'); + throw 'Cannot do synchronous binary XHRs in modern browsers. Use --embed-file or --preload-file in emcc'; } else if (Module['read']) { // Command-line. try { diff --git a/src/settings.js b/src/settings.js index fe532bda..76dc25a1 100644 --- a/src/settings.js +++ b/src/settings.js @@ -53,9 +53,11 @@ var FAST_MEMORY = 2*1024*1024; // The amount of memory to initialize to 0. This var MICRO_OPTS = 1; // Various micro-optimizations, like nativizing variables var RELOOP = 0; // Recreate js native loops from llvm data var USE_TYPED_ARRAYS = 2; // Use typed arrays for the heap. See https://github.com/kripken/emscripten/wiki/Code-Generation-Modes/ + // 0 means no typed arrays are used. // 1 has two heaps, IHEAP (int32) and FHEAP (double), // and addresses there are a match for normal addresses. - // 2 is a single heap, accessible through views as int8, int32, etc. + // 2 is a single heap, accessible through views as int8, int32, etc. This is + // the recommended mode both for performance and for compatibility. var USE_FHEAP = 1; // Relevant in USE_TYPED_ARRAYS == 1. If this is disabled, only IHEAP will be used, and FHEAP // not generated at all. This is useful if your code is 100% ints without floats or doubles var DOUBLE_MODE = 1; // How to load and store 64-bit doubles. Without typed arrays or in typed array mode 1, diff --git a/system/include/dlfcn.h b/system/include/dlfcn.h index 34a85289..6854dab0 100644 --- a/system/include/dlfcn.h +++ b/system/include/dlfcn.h @@ -8,10 +8,18 @@ extern "C" { #define RTLD_GLOBAL 4 #define RTLD_LOCAL 8 +typedef struct { + const char *dli_fname; + void *dli_fbase; + const char *dli_sname; + void *dli_saddr; +} Dl_info; + void *dlopen(const char *, int); void *dlsym(void *, const char *); int dlclose(void *); char *dlerror(void); +int dladdr(void *addr, Dl_info *info); #ifdef __cplusplus } diff --git a/system/include/execinfo.h b/system/include/execinfo.h new file mode 100644 index 00000000..17cda148 --- /dev/null +++ b/system/include/execinfo.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2003 Maxim Sobolev <sobomax@FreeBSD.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: execinfo.h,v 1.2 2004/07/19 05:20:29 sobomax Exp $ + */ + +#ifndef COMPAT_EXECINFO_H_INCLUDED +#define COMPAT_EXECINFO_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +int backtrace(void **, int); +char ** backtrace_symbols(void *const *, int); +void backtrace_symbols_fd(void *const *, int, int); + +#ifdef __cplusplus +} +#endif + +#endif /* COMPAT_EXECINFO_H_INCLUDED */ diff --git a/system/include/libc/pthread.h b/system/include/libc/pthread.h index 1185fcc1..ae9f2c88 100644 --- a/system/include/libc/pthread.h +++ b/system/include/libc/pthread.h @@ -27,7 +27,7 @@ extern "C" { #include <unistd.h> -#if defined(_POSIX_THREADS) || defined(EMSCRIPTEN) +#if defined(_POSIX_THREADS) #include <sys/types.h> #include <time.h> @@ -46,7 +46,7 @@ int _EXFUN(pthread_mutexattr_getpshared, int _EXFUN(pthread_mutexattr_setpshared, (pthread_mutexattr_t *__attr, int __pshared)); -#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) || defined(EMSCRIPTEN) +#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* Single UNIX Specification 2 Mutex Attributes types */ diff --git a/system/include/libc/sys/resource.h b/system/include/libc/sys/resource.h index a7fbe4dd..f39dcb33 100644 --- a/system/include/libc/sys/resource.h +++ b/system/include/libc/sys/resource.h @@ -43,6 +43,7 @@ struct rlimit { rlim_t rlim_cur; rlim_t rlim_max; }; +int getrlimit(int resource, struct rlimit *rlim); int setrlimit(int resource, const struct rlimit *rlim); #endif diff --git a/system/include/libc/sys/types.h b/system/include/libc/sys/types.h index 2f887537..4bf41a34 100644 --- a/system/include/libc/sys/types.h +++ b/system/include/libc/sys/types.h @@ -24,6 +24,12 @@ #include <machine/_types.h> +#if EMSCRIPTEN + #define _POSIX_THREADS + #define _UNIX98_THREAD_MUTEX_ATTRIBUTES + #define _POSIX_READER_WRITER_LOCKS +#endif + #if defined(__rtems__) || defined(__XMK__) || defined(EMSCRIPTEN) /* * The following section is RTEMS specific and is needed to more @@ -360,7 +366,7 @@ typedef struct { #endif /* !defined(__XMK__) */ -#if defined(_POSIX_THREAD_PROCESS_SHARED) +#if defined(_POSIX_THREAD_PROCESS_SHARED) || defined(EMSCRIPTEN) /* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */ #define PTHREAD_PROCESS_PRIVATE 0 /* visible within only the creating process */ diff --git a/system/include/mntent.h b/system/include/mntent.h new file mode 100644 index 00000000..462c6065 --- /dev/null +++ b/system/include/mntent.h @@ -0,0 +1,23 @@ + +#ifndef _MNTENT_H +#define _MNTENT_H + +#include <stdio.h> + +struct mntent { + char *mnt_fsname; + char *mnt_dir; + char *mnt_type; + char *mnt_opts; + int mnt_freq; + int mnt_passno; +}; + +struct mntent *getmntent(FILE *f); +FILE *setmntent(const char *filename, const char *type); +int addmntent(FILE *f, const struct mntent *m); +int endmntent(FILE *f); +char *hasmntopt(const struct mntent *m, const char *opt); + +#endif + diff --git a/system/include/spawn.h b/system/include/spawn.h new file mode 100644 index 00000000..e251b6f1 --- /dev/null +++ b/system/include/spawn.h @@ -0,0 +1,105 @@ +/* $OpenBSD: spawn.h,v 1.1 2012/03/21 23:20:35 matthew Exp $ */ +/*- + * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: src/include/spawn.h,v 1.3.2.1.6.1 2010/12/21 17:09:25 kensmith Exp $ + */ + +#ifndef _SPAWN_H_ +#define _SPAWN_H_ + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <sys/signal.h> + +struct sched_param; + +typedef struct __posix_spawnattr *posix_spawnattr_t; +typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t; + +#define POSIX_SPAWN_RESETIDS 0x01 +#define POSIX_SPAWN_SETPGROUP 0x02 +#define POSIX_SPAWN_SETSCHEDPARAM 0x04 +#define POSIX_SPAWN_SETSCHEDULER 0x08 +#define POSIX_SPAWN_SETSIGDEF 0x10 +#define POSIX_SPAWN_SETSIGMASK 0x20 + +__BEGIN_DECLS +/* + * Spawn routines + * + * XXX both arrays should be __restrict, but this does not work when GCC + * is invoked with -std=c99. + */ +int posix_spawn(pid_t *__restrict, const char *__restrict, + const posix_spawn_file_actions_t *, const posix_spawnattr_t *__restrict, + char *const [], char *const []); +int posix_spawnp(pid_t *__restrict, const char *__restrict, + const posix_spawn_file_actions_t *, const posix_spawnattr_t *__restrict, + char *const [], char *const []); + +/* + * File descriptor actions + */ +int posix_spawn_file_actions_init(posix_spawn_file_actions_t *); +int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *); + +int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *__restrict, + int, const char *__restrict, int, mode_t); +int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); +int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); + +/* + * Spawn attributes + */ +int posix_spawnattr_init(posix_spawnattr_t *); +int posix_spawnattr_destroy(posix_spawnattr_t *); + +int posix_spawnattr_getflags(const posix_spawnattr_t *__restrict, + short *__restrict); +int posix_spawnattr_getpgroup(const posix_spawnattr_t *__restrict, + pid_t *__restrict); +int posix_spawnattr_getschedparam(const posix_spawnattr_t *__restrict, + struct sched_param *__restrict); +int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *__restrict, + int *__restrict); +int posix_spawnattr_getsigdefault(const posix_spawnattr_t *__restrict, + sigset_t *__restrict); +int posix_spawnattr_getsigmask(const posix_spawnattr_t *__restrict, + sigset_t *__restrict sigmask); + +int posix_spawnattr_setflags(posix_spawnattr_t *, short); +int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t); +int posix_spawnattr_setschedparam(posix_spawnattr_t *__restrict, + const struct sched_param *__restrict); +int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); +int posix_spawnattr_setsigdefault(posix_spawnattr_t *__restrict, + const sigset_t *__restrict); +int posix_spawnattr_setsigmask(posix_spawnattr_t *__restrict, + const sigset_t *__restrict); +__END_DECLS + +#endif /* !_SPAWN_H_ */ + diff --git a/system/include/sys/ioctl.h b/system/include/sys/ioctl.h index b7ade699..edc9ea36 100644 --- a/system/include/sys/ioctl.h +++ b/system/include/sys/ioctl.h @@ -8,6 +8,9 @@ extern "C" { #define SIOCGIFCONF 1 // bogus value #define SIOCGIFNETMASK 2 // bogus value +#define TIOCGSIZE 80 // bogus +#define TIOCGWINSZ 80 // bogus + int ioctl(int d, int request, ...); #define SO_RCVTIMEO 1000 diff --git a/tests/poppler/configure b/tests/poppler/configure index 32fdd961..75813bc9 100755 --- a/tests/poppler/configure +++ b/tests/poppler/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for poppler 0.16.3. +# Generated by GNU Autoconf 2.69 for poppler 0.16.3. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=poppler>. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ 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 @@ -169,7 +192,8 @@ 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\$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'\" && @@ -222,21 +246,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # 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 - export CONFIG_SHELL - 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+"$@"} + 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 : @@ -340,6 +368,14 @@ $as_echo X"$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 @@ -461,6 +497,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits 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). @@ -495,16 +535,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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 -p'. + # 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 -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -516,28 +556,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +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'" @@ -705,7 +725,6 @@ BUILD_WITH_WIN32_FONTCONFIGURATION_FALSE BUILD_WITH_WIN32_FONTCONFIGURATION_TRUE FONTCONFIG_LIBS FONTCONFIG_CFLAGS -FREETYPE_CONFIG FREETYPE_LIBS FREETYPE_CFLAGS BUILD_LIBPNG_FALSE @@ -924,8 +943,6 @@ LIBCURL_CFLAGS LIBCURL_LIBS LIBPNG_CFLAGS LIBPNG_LIBS -FREETYPE_CFLAGS -FREETYPE_LIBS FONTCONFIG_CFLAGS FONTCONFIG_LIBS CAIRO_CFLAGS @@ -1401,8 +1418,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1650,10 +1665,6 @@ Some influential environment variables: LIBPNG_CFLAGS C compiler flags for LIBPNG, overriding pkg-config LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config - FREETYPE_CFLAGS - C compiler flags for FREETYPE, overriding pkg-config - FREETYPE_LIBS - linker flags for FREETYPE, overriding pkg-config FONTCONFIG_CFLAGS C compiler flags for FONTCONFIG, overriding pkg-config FONTCONFIG_LIBS @@ -1756,9 +1767,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF poppler configure 0.16.3 -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +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 @@ -1944,7 +1955,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2132,7 +2143,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2450,7 +2461,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by poppler $as_me 0.16.3, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2866,7 +2877,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + 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. @@ -3035,7 +3046,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3075,7 +3086,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3126,7 +3137,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + 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) '* | \ @@ -3179,7 +3190,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3405,7 +3416,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3445,7 +3456,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3498,7 +3509,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3539,7 +3550,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3597,7 +3608,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -3641,7 +3652,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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 @@ -4087,8 +4098,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +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); @@ -4455,7 +4465,7 @@ do for ac_prog in grep ggrep; do |