├── Makecache ├── Makefile.am ├── README.md ├── autogen.sh ├── config.h.in ├── configure.ac ├── data ├── Makefile.am ├── document-open.png ├── gpio.png ├── raspberry-pi.png ├── sdcard.png └── usbbootgui.ui ├── debian ├── .gitignore ├── 99-usbbootgui.rules ├── changelog ├── compat ├── control ├── copyright ├── install ├── postinst ├── postrm ├── rules ├── source │ └── format ├── usbbootgui.lintian-overrides └── usbbootgui.service ├── git.mk ├── gpioexpander ├── README.md └── output │ ├── LICENSE │ ├── bcm2708-rpi-0-w.dtb │ ├── bcm2708-rpi-b-plus.dtb │ ├── bootcode.bin │ ├── cmdline.txt │ ├── config.txt │ ├── fixup.dat │ ├── gpioexpand.img │ ├── kernel.img │ ├── overlays │ ├── dwc2.dtbo │ ├── pi3-disable-bt.dtbo │ └── pi3-disable-wifi.dtbo │ └── start.elf ├── m4 ├── Makefile.am ├── appstream-xml.m4 ├── ax_append_compile_flags.m4 ├── ax_append_flag.m4 ├── ax_check_compile_flag.m4 ├── ax_check_link_flag.m4 ├── ax_compiler_flags_cxxflags.m4 ├── ax_compiler_vendor.m4 ├── ax_cxx_compile_stdcxx_11.m4 ├── ax_require_defined.m4 ├── codeset.m4 ├── extern-inline.m4 ├── fcntl-o.m4 ├── gettext.m4 ├── glib-gettext.m4 ├── glibc2.m4 ├── glibc21.m4 ├── gsettings.m4 ├── iconv.m4 ├── intdiv0.m4 ├── intl.m4 ├── intldir.m4 ├── intlmacosx.m4 ├── intltool.m4 ├── intmax.m4 ├── introspection.m4 ├── inttypes-pri.m4 ├── inttypes_h.m4 ├── lcmessage.m4 ├── lib-ld.m4 ├── lib-link.m4 ├── lib-prefix.m4 ├── libtool.m4 ├── lock.m4 ├── longlong.m4 ├── ltoptions.m4 ├── ltsugar.m4 ├── ltversion.m4 ├── lt~obsolete.m4 ├── nls.m4 ├── pkg.m4 ├── po.m4 ├── printf-posix.m4 ├── progtest.m4 ├── size_max.m4 ├── stdint_h.m4 ├── threadlib.m4 ├── uintmax_t.m4 ├── vala.m4 ├── vapigen.m4 ├── visibility.m4 ├── wchar_t.m4 ├── wint_t.m4 └── xsize.m4 ├── po ├── .pot ├── LINGUAS ├── Makefile.in.in ├── Makevars ├── Makevars.template ├── POTFILES.in ├── Rules-quot ├── boldquot.sed ├── en@boldquot.header ├── en@quot.header ├── insert-header.sin ├── quot.sed ├── remove-potcdate.sin └── stamp-po └── src ├── Makefile.am ├── stealcookie.c ├── stealcookie.h └── usbbootgui.c /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = data src po 2 | 3 | EXTRA_DIST = AUTHORS 4 | 5 | AUTHORS: 6 | $(AM_V_GEN)if test -d "$(srcdir)/.git"; \ 7 | then \ 8 | echo Creating $@ && \ 9 | ( cd "$(top_srcdir)" && \ 10 | echo '# Generated by Makefile. Do not edit.'; echo; \ 11 | git log --no-merges --pretty=format:"%an" $(SUBDIRS) \ 12 | | sort | uniq ) > $@.tmp \ 13 | && mv -f $@.tmp $@ \ 14 | || ( rm -f $@.tmp ; \ 15 | echo Failed to generate $@ >&2 ); \ 16 | else touch $@; fi 17 | 18 | GITIGNOREFILES = \ 19 | **/*.swp \ 20 | *.o \ 21 | aclocal.m4 \ 22 | build-aux \ 23 | ChangeLog \ 24 | config \ 25 | config.h.in \ 26 | gtk-doc.m4 \ 27 | gtk-doc.make \ 28 | INSTALL \ 29 | $(NULL) 30 | 31 | -include $(top_srcdir)/git.mk 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # usbbootgui 2 | 3 | usbbootgui is a GUI application that allows the user to use a Pi Zero or Compute Module as USB accessory. 4 | 5 | ## Folders 6 | 7 | ``` 8 | src - GUI C source code 9 | data - GUI data files (e.g. .ui file and icons) 10 | debian - Debian packaging files 11 | gpioexpander - pre-built binary files from the gpioexpander project to let a Pi Zero act as GPIO expander 12 | ``` 13 | 14 | ## How to rebuild 15 | 16 | ### Rebuilding gpio expander payload (optional) 17 | 18 | Note: this step is *optional*, you can also skip it and use the pre-built binaries checked into git. 19 | 20 | The gpioexpand code should be cross-compiled on a x86 Linux computer using buildroot. 21 | First the buildroot build dependencies need to be installed. 22 | If the Linux distribution used is Debian or Ubuntu this can be done with the command: 23 | 24 | ``` 25 | sudo apt-get update 26 | sudo apt-get install git-core build-essential rsync libncurses-dev unzip python bc 27 | ``` 28 | 29 | Then run the following commands to remove the pre-built binaries, download the source code from the gpioexpander github repository, and build it: 30 | 31 | ``` 32 | rm -rf gpioexpander 33 | git clone --depth 1 https://github.com/raspberrypi/gpioexpander.git 34 | cd gpioexpander 35 | ./build.sh 36 | ``` 37 | 38 | After the build has finished, you can remove the gpioexpand/buildroot-2017.02 folder. 39 | 40 | ``` 41 | rm -rf buildroot-2017.02 42 | ``` 43 | 44 | (Otherwise `debuild` will also include all the build directories in the source code archive at the next step.) 45 | 46 | ### Rebuilding the main usbbootgui application and .deb package 47 | 48 | The usbbootgui application can be compiled on the target system. 49 | 50 | Install build dependencies for Raspbian: 51 | 52 | `sudo apt-get install devscripts debhelper dh-autoreconf libglib2.0-dev libgtk2.0-dev intltool autopoint libusb-1.0-0-dev` 53 | 54 | To build, go to the main directory, and type: 55 | 56 | `debuild` 57 | 58 | After build, the .deb Debian package will be located in the parent directory 59 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | test -n "$srcdir" || srcdir=$(dirname "$0") 4 | test -n "$srcdir" || srcdir=. 5 | 6 | olddir=$(pwd) 7 | 8 | cd $srcdir 9 | 10 | (test -f configure.ac) || { 11 | echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" 12 | exit 1 13 | } 14 | 15 | # shellcheck disable=SC2016 16 | PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) 17 | 18 | if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then 19 | echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 20 | echo "*** If you wish to pass any to it, please specify them on the" >&2 21 | echo "*** '$0' command line." >&2 22 | echo "" >&2 23 | fi 24 | 25 | mkdir -p m4 26 | 27 | autoreconf --verbose --force --install || exit 1 28 | 29 | cd "$olddir" 30 | if [ "$NOCONFIGURE" = "" ]; then 31 | $srcdir/configure "$@" || exit 1 32 | 33 | if [ "$1" = "--help" ]; then exit 0 else 34 | echo "Now type 'make' to compile $PKG_NAME" || exit 1 35 | fi 36 | else 37 | echo "Skipping configure process." 38 | fi 39 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if translation of program messages to the user's native 4 | language is requested. */ 5 | #undef ENABLE_NLS 6 | 7 | /* GETTEXT package name */ 8 | #undef GETTEXT_PACKAGE 9 | 10 | /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the 11 | CoreFoundation framework. */ 12 | #undef HAVE_CFLOCALECOPYCURRENT 13 | 14 | /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in 15 | the CoreFoundation framework. */ 16 | #undef HAVE_CFPREFERENCESCOPYAPPVALUE 17 | 18 | /* Define if the GNU dcgettext() function is already present or preinstalled. 19 | */ 20 | #undef HAVE_DCGETTEXT 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #undef HAVE_DLFCN_H 24 | 25 | /* Define if the GNU gettext() function is already present or preinstalled. */ 26 | #undef HAVE_GETTEXT 27 | 28 | /* Define if you have the iconv() function and it works. */ 29 | #undef HAVE_ICONV 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #undef HAVE_INTTYPES_H 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #undef HAVE_MEMORY_H 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #undef HAVE_STDINT_H 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #undef HAVE_STDLIB_H 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #undef HAVE_STRINGS_H 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #undef HAVE_STRING_H 48 | 49 | /* Define to 1 if you have the header file. */ 50 | #undef HAVE_SYS_STAT_H 51 | 52 | /* Define to 1 if you have the header file. */ 53 | #undef HAVE_SYS_TYPES_H 54 | 55 | /* Define to 1 if you have the header file. */ 56 | #undef HAVE_UNISTD_H 57 | 58 | /* Define to the sub-directory where libtool stores uninstalled libraries. */ 59 | #undef LT_OBJDIR 60 | 61 | /* Name of package */ 62 | #undef PACKAGE 63 | 64 | /* Define to the address where bug reports for this package should be sent. */ 65 | #undef PACKAGE_BUGREPORT 66 | 67 | /* Define to the full name of this package. */ 68 | #undef PACKAGE_NAME 69 | 70 | /* Define to the full name and version of this package. */ 71 | #undef PACKAGE_STRING 72 | 73 | /* Define to the one symbol short name of this package. */ 74 | #undef PACKAGE_TARNAME 75 | 76 | /* Define to the home page for this package. */ 77 | #undef PACKAGE_URL 78 | 79 | /* Define to the version of this package. */ 80 | #undef PACKAGE_VERSION 81 | 82 | /* Define to 1 if you have the ANSI C header files. */ 83 | #undef STDC_HEADERS 84 | 85 | /* Version number of package */ 86 | #undef VERSION 87 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ([2.69]) 2 | 3 | 4 | dnl *********************************************************************** 5 | dnl Define Versioning Information 6 | dnl *********************************************************************** 7 | m4_define([major_version],[0]) 8 | m4_define([minor_version],[1]) 9 | m4_define([micro_version],[0]) 10 | m4_define([package_version],[major_version.minor_version.micro_version]) 11 | m4_define([api_version],[major_version]) 12 | 13 | AX_IS_RELEASE([micro-version]) 14 | 15 | dnl *********************************************************************** 16 | dnl Initialize autoconf 17 | dnl *********************************************************************** 18 | AC_INIT([usbbootgui],[package_version]) 19 | AC_CONFIG_HEADERS([config.h]) 20 | AC_CONFIG_MACRO_DIR([m4]) 21 | AC_CONFIG_AUX_DIR([build-aux]) 22 | AC_SUBST([ACLOCAL_AMFLAGS], "-I m4") 23 | AC_CANONICAL_HOST 24 | 25 | 26 | dnl *********************************************************************** 27 | dnl Make version information available to autoconf files 28 | dnl *********************************************************************** 29 | AC_SUBST([MAJOR_VERSION],major_version) 30 | AC_SUBST([MINOR_VERSION],minor_version) 31 | AC_SUBST([MICRO_VERSION],micro_version) 32 | AC_SUBST([API_VERSION],api_version) 33 | 34 | 35 | dnl *********************************************************************** 36 | dnl Initialize automake 37 | dnl *********************************************************************** 38 | AM_SILENT_RULES([yes]) 39 | AM_INIT_AUTOMAKE([1.11 foreign subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability]) 40 | AM_MAINTAINER_MODE([enable]) 41 | 42 | dnl *********************************************************************** 43 | dnl Internationalization 44 | dnl *********************************************************************** 45 | GETTEXT_PACKAGE=AC_PACKAGE_TARNAME 46 | AC_SUBST([GETTEXT_PACKAGE]) 47 | AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name]) 48 | 49 | AM_GNU_GETTEXT_VERSION([0.19.3]) 50 | AM_GNU_GETTEXT([external]) 51 | 52 | 53 | dnl *********************************************************************** 54 | dnl Check for required programs 55 | dnl *********************************************************************** 56 | AC_PROG_CC 57 | AC_PROG_INSTALL 58 | AC_PROG_SED 59 | AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal]) 60 | AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) 61 | AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources]) 62 | PKG_PROG_PKG_CONFIG([0.22]) 63 | GLIB_GSETTINGS 64 | GOBJECT_INTROSPECTION_CHECK([1.42.0]) 65 | 66 | VAPIGEN_CHECK 67 | 68 | 69 | 70 | AX_COMPILER_FLAGS 71 | 72 | 73 | dnl *********************************************************************** 74 | dnl Ensure C11 is Supported 75 | dnl *********************************************************************** 76 | AX_CHECK_COMPILE_FLAG([-std=gnu11], 77 | [CFLAGS="$CFLAGS -std=gnu11"], 78 | [AC_MSG_ERROR([C compiler cannot compile GNU C11 code])]) 79 | 80 | 81 | 82 | dnl *********************************************************************** 83 | dnl Check for required packages 84 | dnl *********************************************************************** 85 | PKG_CHECK_MODULES(USBBOOTGUI, [gtk+-2.0 >= 2.0]) 86 | 87 | 88 | dnl *********************************************************************** 89 | dnl Initialize Libtool 90 | dnl *********************************************************************** 91 | LT_PREREQ([2.2]) 92 | LT_INIT 93 | 94 | 95 | dnl *********************************************************************** 96 | dnl Process .in Files 97 | dnl *********************************************************************** 98 | AC_CONFIG_FILES([ 99 | Makefile 100 | src/Makefile 101 | data/Makefile 102 | po/Makefile.in 103 | ],[], 104 | [API_VERSION='$API_VERSION']) 105 | AC_OUTPUT 106 | 107 | echo "" 108 | echo " ${PACKAGE} - ${VERSION}" 109 | echo "" 110 | echo " Options" 111 | echo "" 112 | echo " Prefix ............................... : ${prefix}" 113 | echo " Libdir ............................... : ${libdir}" 114 | echo "" 115 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | uidir = $(datadir)/usbbootgui 3 | 4 | ui_DATA = usbbootgui.ui \ 5 | raspberry-pi.png \ 6 | sdcard.png \ 7 | gpio.png \ 8 | document-open.png 9 | 10 | EXTRA_DIST = $(ui_DATA) 11 | 12 | -include $(top_srcdir)/git.mk 13 | -------------------------------------------------------------------------------- /data/document-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/data/document-open.png -------------------------------------------------------------------------------- /data/gpio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/data/gpio.png -------------------------------------------------------------------------------- /data/raspberry-pi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/data/raspberry-pi.png -------------------------------------------------------------------------------- /data/sdcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/data/sdcard.png -------------------------------------------------------------------------------- /data/usbbootgui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 100 7 | 1 8 | 10 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | gpio.png 22 | GPIO expansion board 23 | gpioexpand 24 | 25 | 26 | sdcard.png 27 | eMMC / SD card reader 28 | msd 29 | 30 | 31 | document-open.png 32 | Custom application 33 | 34 | 35 | 36 | 37 | 38 | False 39 | Raspberry Pi connected 40 | center-always 41 | dialog 42 | center 43 | 44 | 45 | False 46 | 2 47 | 48 | 49 | False 50 | end 51 | 52 | 53 | gtk-cancel 54 | True 55 | True 56 | True 57 | True 58 | 59 | 60 | False 61 | False 62 | 0 63 | 64 | 65 | 66 | 67 | gtk-ok 68 | True 69 | True 70 | True 71 | True 72 | 73 | 74 | False 75 | False 76 | 1 77 | 78 | 79 | 80 | 81 | True 82 | True 83 | 0 84 | 85 | 86 | 87 | 88 | True 89 | False 90 | 12 91 | 5 92 | 93 | 94 | True 95 | False 96 | 97 | 98 | True 99 | False 100 | raspberry-pi.png 101 | 102 | 103 | False 104 | True 105 | 0 106 | 107 | 108 | 109 | 110 | True 111 | False 112 | <b>A Raspberry Pi has been connected</b> 113 | Type: 114 | True 115 | 0.040000000000000001 116 | 117 | 118 | False 119 | False 120 | 1 121 | 122 | 123 | 124 | 125 | False 126 | True 127 | 0 128 | 129 | 130 | 131 | 132 | 300 133 | True 134 | False 135 | Please select the role you want it to have: 136 | middle 137 | 138 | 139 | False 140 | False 141 | 1 142 | 143 | 144 | 145 | 146 | 200 147 | True 148 | True 149 | liststore 150 | False 151 | 7 152 | 153 | 154 | 64 155 | 64 156 | icon 157 | 158 | 159 | 160 | 0 161 | 162 | 163 | 164 | 165 | 166 | 167 | description 168 | 169 | 170 | 171 | 1 172 | 173 | 174 | 175 | 176 | 177 | 178 | True 179 | True 180 | 2 181 | 182 | 183 | 184 | 185 | Remember selection 186 | True 187 | True 188 | False 189 | True 190 | 191 | 192 | True 193 | True 194 | 3 195 | 196 | 197 | 198 | 199 | True 200 | True 201 | 1 202 | 203 | 204 | 205 | 206 | 207 | cancelbutton 208 | okbutton 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | files 2 | -------------------------------------------------------------------------------- /debian/99-usbbootgui.rules: -------------------------------------------------------------------------------- 1 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0a5c", ATTR{idProduct}=="27[16][134]", TAG+="systemd", ENV{SYSTEMD_WANTS}="usbbootgui.service" 2 | ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="a5c/27[16][134]*", TAG+="systemd" 3 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | usbbootgui (0.5) buster; urgency=medium 2 | 3 | * Add CM4 support 4 | 5 | -- Serge Schneider Tue, 13 Oct 2020 16:06:54 +0100 6 | 7 | usbbootgui (0.4) buster; urgency=medium 8 | 9 | * Workaround for https://github.com/systemd/systemd/issues/7587 10 | - v240 of SystemD does not see the 'remove' event, which makes usbbootgui 11 | run only once. Adding the systemd tag to the remove event works around 12 | the problem. 13 | 14 | -- Serge Schneider Tue, 12 Feb 2019 16:40:47 +0000 15 | 16 | usbbootgui (0.3) stretch; urgency=medium 17 | 18 | * Set GPIOZERO_PIN_FACTORY=pigpio 19 | * Purge /etc/profile.d/pigpio_default_address.sh 20 | * Bump standards to 3.9.8 21 | 22 | -- Serge Schneider Tue, 04 Sep 2018 15:08:03 +0100 23 | 24 | usbbootgui (0.2) stretch; urgency=medium 25 | 26 | * Add delay between disconnecting and re-connecting USB 27 | * Fix having more than one unit at the same time 28 | * Fix setting default PIGPIO_ADDR 29 | 30 | -- Serge Schneider Thu, 05 Jul 2018 17:30:10 +0100 31 | 32 | usbbootgui (0.1) jessie; urgency=medium 33 | 34 | * Initial release 35 | 36 | -- Floris Bos Tue, 14 Mar 2017 21:10:11 +0100 37 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: usbbootgui 2 | Section: admin 3 | Priority: optional 4 | Maintainer: Floris Bos 5 | Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev, libgtk2.0-dev, 6 | intltool, autopoint, libusb-1.0-0-dev 7 | Standards-Version: 3.9.8 8 | 9 | Package: usbbootgui 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends}, rpiboot 12 | Description: usbboot GUI 13 | Allows USB booting a Raspberry Pi Zero or compute module 14 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: usbbootgui 3 | Source: 4 | 5 | Files: gpioexpander/* 6 | Copyright: Incorporates packages by various authors 7 | License: Mixed 8 | 9 | License: Mixed 10 | See: /usr/share/rpiboot/gpioexpand/LICENSE 11 | -------------------------------------------------------------------------------- /debian/install: -------------------------------------------------------------------------------- 1 | gpioexpander/output/fixup.dat /usr/share/rpiboot/gpioexpand 2 | gpioexpander/output/config.txt /usr/share/rpiboot/gpioexpand 3 | gpioexpander/output/cmdline.txt /usr/share/rpiboot/gpioexpand 4 | gpioexpander/output/gpioexpand.img /usr/share/rpiboot/gpioexpand 5 | gpioexpander/output/bootcode.bin /usr/share/rpiboot/gpioexpand 6 | gpioexpander/output/bcm2708-rpi-0-w.dtb /usr/share/rpiboot/gpioexpand 7 | gpioexpander/output/bcm2708-rpi-b-plus.dtb /usr/share/rpiboot/gpioexpand 8 | gpioexpander/output/start.elf /usr/share/rpiboot/gpioexpand 9 | gpioexpander/output/kernel.img /usr/share/rpiboot/gpioexpand 10 | gpioexpander/output/overlays/dwc2.dtbo /usr/share/rpiboot/gpioexpand/overlays 11 | gpioexpander/output/LICENSE /usr/share/rpiboot/gpioexpand 12 | 13 | debian/usbbootgui.service /lib/systemd/system 14 | debian/99-usbbootgui.rules /lib/udev/rules.d 15 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for usbbootgui 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see https://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | if [ `uname -m` = "i686" ] || [ `uname -m` = "x86_64" ]; then 24 | echo "export GPIOZERO_PIN_FACTORY=pigpio" > /etc/profile.d/pigpio_default_address.sh 25 | echo "export PIGPIO_ADDR=fe80::1%usb0" >> /etc/profile.d/pigpio_default_address.sh 26 | fi 27 | ;; 28 | 29 | abort-upgrade|abort-remove|abort-deconfigure) 30 | ;; 31 | 32 | *) 33 | echo "postinst called with unknown argument \`$1'" >&2 34 | exit 1 35 | ;; 36 | esac 37 | 38 | # dh_installdeb will replace this with shell code automatically 39 | # generated by other debhelper scripts. 40 | 41 | #DEBHELPER# 42 | 43 | exit 0 44 | -------------------------------------------------------------------------------- /debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | case "$1" in 6 | purge) 7 | rm -f /etc/profile.d/pigpio_default_address.sh 8 | ;; 9 | esac 10 | 11 | #DEBHELPER# 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #export DH_VERBOSE = 1 5 | 6 | %: 7 | dh $@ --with autoreconf 8 | 9 | .PHONY: override_dh_strip 10 | 11 | # Prevent debuild from trying to strip start.elf 12 | override_dh_strip: 13 | dh_strip --exclude=.elf 14 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/usbbootgui.lintian-overrides: -------------------------------------------------------------------------------- 1 | usbbootgui: arch-dependent-file-in-usr-share usr/share/rpiboot/gpioexpand/start.elf 2 | usbbootgui: binary-from-other-architecture usr/share/rpiboot/gpioexpand/start.elf 3 | usbbootgui: embedded-library usr/share/rpiboot/gpioexpand/start.elf: libpng 4 | usbbootgui: statically-linked-binary usr/share/rpiboot/gpioexpand/start.elf 5 | usbbootgui: extra-license-file usr/share/rpiboot/gpioexpand/LICENSE 6 | usbbootgui: init.d-script-not-marked-as-conffile etc/init.d/usbbootgui 7 | usbbootgui: init.d-script-not-included-in-package etc/init.d/usbbootgui 8 | -------------------------------------------------------------------------------- /debian/usbbootgui.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=oneshot 3 | ExecStart=/usr/bin/usbbootgui 4 | -------------------------------------------------------------------------------- /git.mk: -------------------------------------------------------------------------------- 1 | # git.mk, a small Makefile to autogenerate .gitignore files 2 | # for autotools-based projects. 3 | # 4 | # Copyright 2009, Red Hat, Inc. 5 | # Copyright 2010,2011,2012,2013 Behdad Esfahbod 6 | # Written by Behdad Esfahbod 7 | # 8 | # Copying and distribution of this file, with or without modification, 9 | # is permitted in any medium without royalty provided the copyright 10 | # notice and this notice are preserved. 11 | # 12 | # The latest version of this file can be downloaded from: 13 | GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk 14 | # 15 | # Bugs, etc, should be reported upstream at: 16 | # https://github.com/behdad/git.mk 17 | # 18 | # To use in your project, import this file in your git repo's toplevel, 19 | # then do "make -f git.mk". This modifies all Makefile.am files in 20 | # your project to -include git.mk. Remember to add that line to new 21 | # Makefile.am files you create in your project, or just rerun the 22 | # "make -f git.mk". 23 | # 24 | # This enables automatic .gitignore generation. If you need to ignore 25 | # more files, add them to the GITIGNOREFILES variable in your Makefile.am. 26 | # But think twice before doing that. If a file has to be in .gitignore, 27 | # chances are very high that it's a generated file and should be in one 28 | # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. 29 | # 30 | # The only case that you need to manually add a file to GITIGNOREFILES is 31 | # when remove files in one of mostlyclean-local, clean-local, distclean-local, 32 | # or maintainer-clean-local make targets. 33 | # 34 | # Note that for files like editor backup, etc, there are better places to 35 | # ignore them. See "man gitignore". 36 | # 37 | # If "make maintainer-clean" removes the files but they are not recognized 38 | # by this script (that is, if "git status" shows untracked files still), send 39 | # me the output of "git status" as well as your Makefile.am and Makefile for 40 | # the directories involved and I'll diagnose. 41 | # 42 | # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see 43 | # Makefile.am.sample in the git.mk git repo. 44 | # 45 | # Don't EXTRA_DIST this file. It is supposed to only live in git clones, 46 | # not tarballs. It serves no useful purpose in tarballs and clutters the 47 | # build dir. 48 | # 49 | # This file knows how to handle autoconf, automake, libtool, gtk-doc, 50 | # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, 51 | # appstream. 52 | # 53 | # This makefile provides the following targets: 54 | # 55 | # - all: "make all" will build all gitignore files. 56 | # - gitignore: makes all gitignore files in the current dir and subdirs. 57 | # - .gitignore: make gitignore file for the current dir. 58 | # - gitignore-recurse: makes all gitignore files in the subdirs. 59 | # 60 | # KNOWN ISSUES: 61 | # 62 | # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the 63 | # submodule doesn't find us. If you have configure.{in,ac} files in 64 | # subdirs, add a proxy git.mk file in those dirs that simply does: 65 | # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. 66 | # And add those files to git. See vte/gnome-pty-helper/git.mk for 67 | # example. 68 | # 69 | 70 | 71 | 72 | ############################################################################### 73 | # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: 74 | ############################################################################### 75 | 76 | # 77 | # Most autotools-using modules should be fine including this variable in their 78 | # toplevel MAINTAINERCLEANFILES: 79 | GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ 80 | $(srcdir)/aclocal.m4 \ 81 | $(srcdir)/autoscan.log \ 82 | $(srcdir)/configure.scan \ 83 | `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ 84 | test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ 85 | for x in \ 86 | ar-lib \ 87 | compile \ 88 | config.guess \ 89 | config.sub \ 90 | depcomp \ 91 | install-sh \ 92 | ltmain.sh \ 93 | missing \ 94 | mkinstalldirs \ 95 | test-driver \ 96 | ylwrap \ 97 | ; do echo "$$AUX_DIR/$$x"; done` \ 98 | `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ 99 | head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` 100 | # 101 | # All modules should also be fine including the following variable, which 102 | # removes automake-generated Makefile.in files: 103 | GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ 104 | `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ 105 | while read f; do \ 106 | case $$f in Makefile|*/Makefile) \ 107 | test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ 108 | done` 109 | # 110 | # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, 111 | # though it's harmless to include regardless. 112 | GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ 113 | `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ 114 | if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ 115 | for x in \ 116 | libtool.m4 \ 117 | ltoptions.m4 \ 118 | ltsugar.m4 \ 119 | ltversion.m4 \ 120 | lt~obsolete.m4 \ 121 | ; do echo "$$MACRO_DIR/$$x"; done; \ 122 | fi` 123 | 124 | 125 | 126 | ############################################################################### 127 | # Default rule is to install ourselves in all Makefile.am files: 128 | ############################################################################### 129 | 130 | git-all: git-mk-install 131 | 132 | git-mk-install: 133 | @echo "Installing git makefile" 134 | @any_failed=; \ 135 | find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ 136 | if grep 'include .*/git.mk' $$x >/dev/null; then \ 137 | echo "$$x already includes git.mk"; \ 138 | else \ 139 | failed=; \ 140 | echo "Updating $$x"; \ 141 | { cat $$x; \ 142 | echo ''; \ 143 | echo '-include $$(top_srcdir)/git.mk'; \ 144 | } > $$x.tmp || failed=1; \ 145 | if test x$$failed = x; then \ 146 | mv $$x.tmp $$x || failed=1; \ 147 | fi; \ 148 | if test x$$failed = x; then : else \ 149 | echo "Failed updating $$x"; >&2 \ 150 | any_failed=1; \ 151 | fi; \ 152 | fi; done; test -z "$$any_failed" 153 | 154 | git-mk-update: 155 | wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk 156 | 157 | .PHONY: git-all git-mk-install git-mk-update 158 | 159 | 160 | 161 | ############################################################################### 162 | # Actual .gitignore generation: 163 | ############################################################################### 164 | 165 | $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk 166 | @echo "git.mk: Generating $@" 167 | @{ \ 168 | if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ 169 | for x in \ 170 | $(DOC_MODULE)-decl-list.txt \ 171 | $(DOC_MODULE)-decl.txt \ 172 | tmpl/$(DOC_MODULE)-unused.sgml \ 173 | "tmpl/*.bak" \ 174 | xml html \ 175 | ; do echo "/$$x"; done; \ 176 | FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ 177 | case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ 178 | fi; \ 179 | if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ 180 | for lc in $(DOC_LINGUAS); do \ 181 | for x in \ 182 | $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ 183 | $(DOC_PAGES) \ 184 | $(DOC_INCLUDES) \ 185 | ; do echo "/$$lc/$$x"; done; \ 186 | done; \ 187 | for x in \ 188 | $(_DOC_OMF_ALL) \ 189 | $(_DOC_DSK_ALL) \ 190 | $(_DOC_HTML_ALL) \ 191 | $(_DOC_MOFILES) \ 192 | $(DOC_H_FILE) \ 193 | "*/.xml2po.mo" \ 194 | "*/*.omf.out" \ 195 | ; do echo /$$x; done; \ 196 | fi; \ 197 | if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ 198 | for lc in $(HELP_LINGUAS); do \ 199 | for x in \ 200 | $(HELP_FILES) \ 201 | "$$lc.stamp" \ 202 | "$$lc.mo" \ 203 | ; do echo "/$$lc/$$x"; done; \ 204 | done; \ 205 | fi; \ 206 | if test "x$(gsettings_SCHEMAS)" = x; then :; else \ 207 | for x in \ 208 | $(gsettings_SCHEMAS:.xml=.valid) \ 209 | $(gsettings__enum_file) \ 210 | ; do echo "/$$x"; done; \ 211 | fi; \ 212 | if test "x$(appdata_XML)" = x; then :; else \ 213 | for x in \ 214 | $(appdata_XML:.xml=.valid) \ 215 | ; do echo "/$$x"; done; \ 216 | fi; \ 217 | if test "x$(appstream_XML)" = x; then :; else \ 218 | for x in \ 219 | $(appstream_XML:.xml=.valid) \ 220 | ; do echo "/$$x"; done; \ 221 | fi; \ 222 | if test -f $(srcdir)/po/Makefile.in.in; then \ 223 | for x in \ 224 | po/Makefile.in.in \ 225 | po/Makefile.in.in~ \ 226 | po/Makefile.in \ 227 | po/Makefile \ 228 | po/Makevars.template \ 229 | po/POTFILES \ 230 | po/Rules-quot \ 231 | po/stamp-it \ 232 | po/.intltool-merge-cache \ 233 | "po/*.gmo" \ 234 | "po/*.header" \ 235 | "po/*.mo" \ 236 | "po/*.sed" \ 237 | "po/*.sin" \ 238 | po/$(GETTEXT_PACKAGE).pot \ 239 | intltool-extract.in \ 240 | intltool-merge.in \ 241 | intltool-update.in \ 242 | ; do echo "/$$x"; done; \ 243 | fi; \ 244 | if test -f $(srcdir)/configure; then \ 245 | for x in \ 246 | autom4te.cache \ 247 | configure \ 248 | config.h \ 249 | stamp-h1 \ 250 | libtool \ 251 | config.lt \ 252 | ; do echo "/$$x"; done; \ 253 | fi; \ 254 | if test "x$(DEJATOOL)" = x; then :; else \ 255 | for x in \ 256 | $(DEJATOOL) \ 257 | ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ 258 | echo /site.exp; \ 259 | fi; \ 260 | if test "x$(am__dirstamp)" = x; then :; else \ 261 | echo "$(am__dirstamp)"; \ 262 | fi; \ 263 | if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ 264 | for x in \ 265 | "*.lo" \ 266 | ".libs" "_libs" \ 267 | ; do echo "$$x"; done; \ 268 | fi; \ 269 | for x in \ 270 | .gitignore \ 271 | $(GITIGNOREFILES) \ 272 | $(CLEANFILES) \ 273 | $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ 274 | $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ 275 | $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ 276 | so_locations \ 277 | $(MOSTLYCLEANFILES) \ 278 | $(TEST_LOGS) \ 279 | $(TEST_LOGS:.log=.trs) \ 280 | $(TEST_SUITE_LOG) \ 281 | $(TESTS:=.test) \ 282 | "*.gcda" \ 283 | "*.gcno" \ 284 | $(DISTCLEANFILES) \ 285 | $(am__CONFIG_DISTCLEAN_FILES) \ 286 | $(CONFIG_CLEAN_FILES) \ 287 | TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ 288 | "*.tab.c" \ 289 | $(MAINTAINERCLEANFILES) \ 290 | $(BUILT_SOURCES) \ 291 | $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ 292 | $(filter %_vala.stamp,$(DIST_COMMON)) \ 293 | $(filter %.vapi,$(DIST_COMMON)) \ 294 | $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ 295 | Makefile \ 296 | Makefile.in \ 297 | "*.orig" \ 298 | "*.rej" \ 299 | "*.bak" \ 300 | "*~" \ 301 | ".*.sw[nop]" \ 302 | ".dirstamp" \ 303 | ; do echo "/$$x"; done; \ 304 | for x in \ 305 | "*.$(OBJEXT)" \ 306 | $(DEPDIR) \ 307 | ; do echo "$$x"; done; \ 308 | } | \ 309 | sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ 310 | sed 's@/[.]/@/@g' | \ 311 | LC_ALL=C sort | uniq > $@.tmp && \ 312 | mv $@.tmp $@; 313 | 314 | all: $(srcdir)/.gitignore gitignore-recurse-maybe 315 | gitignore: $(srcdir)/.gitignore gitignore-recurse 316 | 317 | gitignore-recurse-maybe: 318 | @for subdir in $(DIST_SUBDIRS); do \ 319 | case " $(SUBDIRS) " in \ 320 | *" $$subdir "*) :;; \ 321 | *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ 322 | esac; \ 323 | done 324 | gitignore-recurse: 325 | @for subdir in $(DIST_SUBDIRS); do \ 326 | test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ 327 | done 328 | 329 | maintainer-clean: gitignore-clean 330 | gitignore-clean: 331 | -rm -f $(srcdir)/.gitignore 332 | 333 | .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe 334 | -------------------------------------------------------------------------------- /gpioexpander/README.md: -------------------------------------------------------------------------------- 1 | Source code can be found in seperate repository: https://github.com/raspberrypi/gpioexpander 2 | -------------------------------------------------------------------------------- /gpioexpander/output/bcm2708-rpi-0-w.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/bcm2708-rpi-0-w.dtb -------------------------------------------------------------------------------- /gpioexpander/output/bcm2708-rpi-b-plus.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/bcm2708-rpi-b-plus.dtb -------------------------------------------------------------------------------- /gpioexpander/output/bootcode.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/bootcode.bin -------------------------------------------------------------------------------- /gpioexpander/output/cmdline.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/cmdline.txt -------------------------------------------------------------------------------- /gpioexpander/output/config.txt: -------------------------------------------------------------------------------- 1 | dtoverlay=dwc2,dr_mode=peripheral 2 | kernel=kernel.img 3 | initramfs gpioexpand.img 4 | -------------------------------------------------------------------------------- /gpioexpander/output/fixup.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/fixup.dat -------------------------------------------------------------------------------- /gpioexpander/output/gpioexpand.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/gpioexpand.img -------------------------------------------------------------------------------- /gpioexpander/output/kernel.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/kernel.img -------------------------------------------------------------------------------- /gpioexpander/output/overlays/dwc2.dtbo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/overlays/dwc2.dtbo -------------------------------------------------------------------------------- /gpioexpander/output/overlays/pi3-disable-bt.dtbo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/overlays/pi3-disable-bt.dtbo -------------------------------------------------------------------------------- /gpioexpander/output/overlays/pi3-disable-wifi.dtbo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/overlays/pi3-disable-wifi.dtbo -------------------------------------------------------------------------------- /gpioexpander/output/start.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/usbbootgui/1e9cc0f7539c7f94872a13187a97b5996c1487f4/gpioexpander/output/start.elf -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | -include $(top_srcdir)/git.mk 2 | -------------------------------------------------------------------------------- /m4/appstream-xml.m4: -------------------------------------------------------------------------------- 1 | # appstream-xml.m4 2 | # 3 | # serial 6 4 | 5 | dnl APPSTREAM_XML 6 | dnl Installs and validates AppData XML files. 7 | dnl 8 | dnl Call APPSTREAM_XML in configure.ac to check for the appstream-util tool. 9 | dnl Add @APPSTREAM_XML_RULES@ to a Makefile.am to substitute the make rules. Add 10 | dnl .appdata.xml files to appstream_XML in Makefile.am and they will be validated 11 | dnl at make check time, if appstream-util is installed, as well as installed 12 | dnl to the correct location automatically. Add --enable-appstream-util to 13 | dnl DISTCHECK_CONFIGURE_FLAGS in Makefile.am to require valid AppData XML when 14 | dnl doing a distcheck. 15 | dnl 16 | dnl Adding files to appstream_XML does not distribute them automatically. 17 | 18 | AC_DEFUN([APPSTREAM_XML], 19 | [ 20 | m4_pattern_allow([AM_V_GEN]) 21 | AC_ARG_ENABLE([appstream-util], 22 | [AS_HELP_STRING([--disable-appstream-util], 23 | [Disable validating AppData XML files during check phase])]) 24 | 25 | AS_IF([test "x$enable_appstream_validate" != "xno"], 26 | [AC_PATH_PROG([APPSTREAM_UTIL], [appstream-util]) 27 | AS_IF([test "x$APPSTREAM_UTIL" = "x"], 28 | [have_appstream_validate=no], 29 | [have_appstream_validate=yes 30 | AC_SUBST([APPSTREAM_UTIL])])], 31 | [have_appstream_validate=no]) 32 | 33 | AS_IF([test "x$have_appstream_validate" != "xno"], 34 | [appstream_validate=yes], 35 | [appstream_validate=no 36 | AS_IF([test "x$enable_appstream_validate" = "xyes"], 37 | [AC_MSG_ERROR([AppData validation was requested but appstream-util was not found])])]) 38 | 39 | AC_SUBST([appstreamxmldir], [${datadir}/appdata]) 40 | 41 | APPSTREAM_XML_RULES=' 42 | .PHONY : uninstall-appstream-xml install-appstream-xml clean-appstream-xml 43 | 44 | mostlyclean-am: clean-appstream-xml 45 | 46 | %.appdata.valid: %.appdata.xml 47 | $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; \ 48 | if test -n "$(APPSTREAM_UTIL)"; \ 49 | then $(APPSTREAM_UTIL) --nonet validate $${d}$<; fi \ 50 | && touch [$]@ 51 | 52 | check-am: $(appstream_XML:.appdata.xml=.appdata.valid) 53 | uninstall-am: uninstall-appstream-xml 54 | install-data-am: install-appstream-xml 55 | 56 | .SECONDARY: $(appstream_XML) 57 | 58 | install-appstream-xml: $(appstream_XML) 59 | @$(NORMAL_INSTALL) 60 | if test -n "$^"; then \ 61 | test -z "$(appstreamxmldir)" || $(MKDIR_P) "$(DESTDIR)$(appstreamxmldir)"; \ 62 | $(INSTALL_DATA) $^ "$(DESTDIR)$(appstreamxmldir)"; \ 63 | fi 64 | 65 | uninstall-appstream-xml: 66 | @$(NORMAL_UNINSTALL) 67 | @list='\''$(appstream_XML)'\''; test -n "$(appstreamxmldir)" || list=; \ 68 | files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ 69 | test -n "$$files" || exit 0; \ 70 | echo " ( cd '\''$(DESTDIR)$(appstreamxmldir)'\'' && rm -f" $$files ")"; \ 71 | cd "$(DESTDIR)$(appstreamxmldir)" && rm -f $$files 72 | 73 | clean-appstream-xml: 74 | rm -f $(appstream_XML:.appdata.xml=.appdata.valid) 75 | ' 76 | _APPSTREAM_XML_SUBST(APPSTREAM_XML_RULES) 77 | ]) 78 | 79 | dnl _APPSTREAM_XML_SUBST(VARIABLE) 80 | dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST 81 | AC_DEFUN([_APPSTREAM_XML_SUBST], 82 | [ 83 | AC_SUBST([$1]) 84 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) 85 | ] 86 | ) 87 | -------------------------------------------------------------------------------- /m4/ax_append_compile_flags.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # For every FLAG1, FLAG2 it is checked whether the compiler works with the 12 | # flag. If it does, the flag is added FLAGS-VARIABLE 13 | # 14 | # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. 15 | # CFLAGS) is used. During the check the flag is always added to the 16 | # current language's flags. 17 | # 18 | # If EXTRA-FLAGS is defined, it is added to the current language's default 19 | # flags (e.g. CFLAGS) when the check is done. The check is thus made with 20 | # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to 21 | # force the compiler to issue an error when a bad flag is given. 22 | # 23 | # NOTE: This macro depends on the AX_APPEND_FLAG and 24 | # AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with 25 | # AX_APPEND_LINK_FLAGS. 26 | # 27 | # LICENSE 28 | # 29 | # Copyright (c) 2011 Maarten Bosmans 30 | # 31 | # This program is free software: you can redistribute it and/or modify it 32 | # under the terms of the GNU General Public License as published by the 33 | # Free Software Foundation, either version 3 of the License, or (at your 34 | # option) any later version. 35 | # 36 | # This program is distributed in the hope that it will be useful, but 37 | # WITHOUT ANY WARRANTY; without even the implied warranty of 38 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 39 | # Public License for more details. 40 | # 41 | # You should have received a copy of the GNU General Public License along 42 | # with this program. If not, see . 43 | # 44 | # As a special exception, the respective Autoconf Macro's copyright owner 45 | # gives unlimited permission to copy, distribute and modify the configure 46 | # scripts that are the output of Autoconf when processing the Macro. You 47 | # need not follow the terms of the GNU General Public License when using 48 | # or distributing such scripts, even though portions of the text of the 49 | # Macro appear in them. The GNU General Public License (GPL) does govern 50 | # all other use of the material that constitutes the Autoconf Macro. 51 | # 52 | # This special exception to the GPL applies to versions of the Autoconf 53 | # Macro released by the Autoconf Archive. When you make and distribute a 54 | # modified version of the Autoconf Macro, you may extend this special 55 | # exception to the GPL to apply to your modified version as well. 56 | 57 | #serial 4 58 | 59 | AC_DEFUN([AX_APPEND_COMPILE_FLAGS], 60 | [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) 61 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) 62 | for flag in $1; do 63 | AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) 64 | done 65 | ])dnl AX_APPEND_COMPILE_FLAGS 66 | -------------------------------------------------------------------------------- /m4/ax_append_flag.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_append_flag.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # FLAG is appended to the FLAGS-VARIABLE shell variable, with a space 12 | # added in between. 13 | # 14 | # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. 15 | # CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains 16 | # FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly 17 | # FLAG. 18 | # 19 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. 20 | # 21 | # LICENSE 22 | # 23 | # Copyright (c) 2008 Guido U. Draheim 24 | # Copyright (c) 2011 Maarten Bosmans 25 | # 26 | # This program is free software: you can redistribute it and/or modify it 27 | # under the terms of the GNU General Public License as published by the 28 | # Free Software Foundation, either version 3 of the License, or (at your 29 | # option) any later version. 30 | # 31 | # This program is distributed in the hope that it will be useful, but 32 | # WITHOUT ANY WARRANTY; without even the implied warranty of 33 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 34 | # Public License for more details. 35 | # 36 | # You should have received a copy of the GNU General Public License along 37 | # with this program. If not, see . 38 | # 39 | # As a special exception, the respective Autoconf Macro's copyright owner 40 | # gives unlimited permission to copy, distribute and modify the configure 41 | # scripts that are the output of Autoconf when processing the Macro. You 42 | # need not follow the terms of the GNU General Public License when using 43 | # or distributing such scripts, even though portions of the text of the 44 | # Macro appear in them. The GNU General Public License (GPL) does govern 45 | # all other use of the material that constitutes the Autoconf Macro. 46 | # 47 | # This special exception to the GPL applies to versions of the Autoconf 48 | # Macro released by the Autoconf Archive. When you make and distribute a 49 | # modified version of the Autoconf Macro, you may extend this special 50 | # exception to the GPL to apply to your modified version as well. 51 | 52 | #serial 6 53 | 54 | AC_DEFUN([AX_APPEND_FLAG], 55 | [dnl 56 | AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF 57 | AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) 58 | AS_VAR_SET_IF(FLAGS,[ 59 | AS_CASE([" AS_VAR_GET(FLAGS) "], 60 | [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], 61 | [ 62 | AS_VAR_APPEND(FLAGS,[" $1"]) 63 | AC_RUN_LOG([: FLAGS="$FLAGS"]) 64 | ]) 65 | ], 66 | [ 67 | AS_VAR_SET(FLAGS,[$1]) 68 | AC_RUN_LOG([: FLAGS="$FLAGS"]) 69 | ]) 70 | AS_VAR_POPDEF([FLAGS])dnl 71 | ])dnl AX_APPEND_FLAG 72 | -------------------------------------------------------------------------------- /m4/ax_check_compile_flag.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether the given FLAG works with the current language's compiler 12 | # or gives an error. (Warnings, however, are ignored) 13 | # 14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 15 | # success/failure. 16 | # 17 | # If EXTRA-FLAGS is defined, it is added to the current language's default 18 | # flags (e.g. CFLAGS) when the check is done. The check is thus made with 19 | # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to 20 | # force the compiler to issue an error when a bad flag is given. 21 | # 22 | # INPUT gives an alternative input source to AC_COMPILE_IFELSE. 23 | # 24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this 25 | # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. 26 | # 27 | # LICENSE 28 | # 29 | # Copyright (c) 2008 Guido U. Draheim 30 | # Copyright (c) 2011 Maarten Bosmans 31 | # 32 | # This program is free software: you can redistribute it and/or modify it 33 | # under the terms of the GNU General Public License as published by the 34 | # Free Software Foundation, either version 3 of the License, or (at your 35 | # option) any later version. 36 | # 37 | # This program is distributed in the hope that it will be useful, but 38 | # WITHOUT ANY WARRANTY; without even the implied warranty of 39 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 40 | # Public License for more details. 41 | # 42 | # You should have received a copy of the GNU General Public License along 43 | # with this program. If not, see . 44 | # 45 | # As a special exception, the respective Autoconf Macro's copyright owner 46 | # gives unlimited permission to copy, distribute and modify the configure 47 | # scripts that are the output of Autoconf when processing the Macro. You 48 | # need not follow the terms of the GNU General Public License when using 49 | # or distributing such scripts, even though portions of the text of the 50 | # Macro appear in them. The GNU General Public License (GPL) does govern 51 | # all other use of the material that constitutes the Autoconf Macro. 52 | # 53 | # This special exception to the GPL applies to versions of the Autoconf 54 | # Macro released by the Autoconf Archive. When you make and distribute a 55 | # modified version of the Autoconf Macro, you may extend this special 56 | # exception to the GPL to apply to your modified version as well. 57 | 58 | #serial 4 59 | 60 | AC_DEFUN([AX_CHECK_COMPILE_FLAG], 61 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF 62 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl 63 | AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ 64 | ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS 65 | _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" 66 | AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], 67 | [AS_VAR_SET(CACHEVAR,[yes])], 68 | [AS_VAR_SET(CACHEVAR,[no])]) 69 | _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) 70 | AS_VAR_IF(CACHEVAR,yes, 71 | [m4_default([$2], :)], 72 | [m4_default([$3], :)]) 73 | AS_VAR_POPDEF([CACHEVAR])dnl 74 | ])dnl AX_CHECK_COMPILE_FLAGS 75 | -------------------------------------------------------------------------------- /m4/ax_check_link_flag.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether the given FLAG works with the linker or gives an error. 12 | # (Warnings, however, are ignored) 13 | # 14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 15 | # success/failure. 16 | # 17 | # If EXTRA-FLAGS is defined, it is added to the linker's default flags 18 | # when the check is done. The check is thus made with the flags: "LDFLAGS 19 | # EXTRA-FLAGS FLAG". This can for example be used to force the linker to 20 | # issue an error when a bad flag is given. 21 | # 22 | # INPUT gives an alternative input source to AC_LINK_IFELSE. 23 | # 24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this 25 | # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. 26 | # 27 | # LICENSE 28 | # 29 | # Copyright (c) 2008 Guido U. Draheim 30 | # Copyright (c) 2011 Maarten Bosmans 31 | # 32 | # This program is free software: you can redistribute it and/or modify it 33 | # under the terms of the GNU General Public License as published by the 34 | # Free Software Foundation, either version 3 of the License, or (at your 35 | # option) any later version. 36 | # 37 | # This program is distributed in the hope that it will be useful, but 38 | # WITHOUT ANY WARRANTY; without even the implied warranty of 39 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 40 | # Public License for more details. 41 | # 42 | # You should have received a copy of the GNU General Public License along 43 | # with this program. If not, see . 44 | # 45 | # As a special exception, the respective Autoconf Macro's copyright owner 46 | # gives unlimited permission to copy, distribute and modify the configure 47 | # scripts that are the output of Autoconf when processing the Macro. You 48 | # need not follow the terms of the GNU General Public License when using 49 | # or distributing such scripts, even though portions of the text of the 50 | # Macro appear in them. The GNU General Public License (GPL) does govern 51 | # all other use of the material that constitutes the Autoconf Macro. 52 | # 53 | # This special exception to the GPL applies to versions of the Autoconf 54 | # Macro released by the Autoconf Archive. When you make and distribute a 55 | # modified version of the Autoconf Macro, you may extend this special 56 | # exception to the GPL to apply to your modified version as well. 57 | 58 | #serial 4 59 | 60 | AC_DEFUN([AX_CHECK_LINK_FLAG], 61 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF 62 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl 63 | AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ 64 | ax_check_save_flags=$LDFLAGS 65 | LDFLAGS="$LDFLAGS $4 $1" 66 | AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], 67 | [AS_VAR_SET(CACHEVAR,[yes])], 68 | [AS_VAR_SET(CACHEVAR,[no])]) 69 | LDFLAGS=$ax_check_save_flags]) 70 | AS_VAR_IF(CACHEVAR,yes, 71 | [m4_default([$2], :)], 72 | [m4_default([$3], :)]) 73 | AS_VAR_POPDEF([CACHEVAR])dnl 74 | ])dnl AX_CHECK_LINK_FLAGS 75 | -------------------------------------------------------------------------------- /m4/ax_compiler_flags_cxxflags.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html 3 | # ============================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_COMPILER_FLAGS_CXXFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Add warning flags for the C++ compiler to VARIABLE, which defaults to 12 | # WARN_CXXFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be 13 | # manually added to the CXXFLAGS variable for each target in the code 14 | # base. 15 | # 16 | # This macro depends on the environment set up by AX_COMPILER_FLAGS. 17 | # Specifically, it uses the value of $ax_enable_compile_warnings to decide 18 | # which flags to enable. 19 | # 20 | # LICENSE 21 | # 22 | # Copyright (c) 2015 David King 23 | # 24 | # Copying and distribution of this file, with or without modification, are 25 | # permitted in any medium without royalty provided the copyright notice 26 | # and this notice are preserved. This file is offered as-is, without any 27 | # warranty. 28 | 29 | #serial 7 30 | 31 | AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ 32 | AC_REQUIRE([AC_PROG_SED]) 33 | AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) 34 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) 35 | AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) 36 | 37 | # Variable names 38 | m4_define(ax_warn_cxxflags_variable, 39 | [m4_normalize(ifelse([$1],,[WARN_CXXFLAGS],[$1]))]) 40 | 41 | AC_LANG_PUSH([C++]) 42 | 43 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad 44 | # flags, otherwise they are always appended to the warn_cxxflags variable, 45 | # and Clang warns on them for every compilation unit. 46 | # If this is passed to GCC, it will explode, so the flag must be enabled 47 | # conditionally. 48 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ 49 | ax_compiler_flags_test="-Werror=unknown-warning-option" 50 | ],[ 51 | ax_compiler_flags_test="" 52 | ]) 53 | 54 | # Base flags 55 | AX_APPEND_COMPILE_FLAGS([ dnl 56 | -fno-strict-aliasing dnl 57 | $3 dnl 58 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) 59 | 60 | AS_IF([test "$ax_enable_compile_warnings" != "no"],[ 61 | # "yes" flags 62 | AX_APPEND_COMPILE_FLAGS([ dnl 63 | -Wall dnl 64 | -Wextra dnl 65 | -Wundef dnl 66 | -Wwrite-strings dnl 67 | -Wpointer-arith dnl 68 | -Wmissing-declarations dnl 69 | -Wredundant-decls dnl 70 | -Wno-unused-parameter dnl 71 | -Wno-missing-field-initializers dnl 72 | -Wformat=2 dnl 73 | -Wcast-align dnl 74 | -Wformat-nonliteral dnl 75 | -Wformat-security dnl 76 | -Wsign-compare dnl 77 | -Wstrict-aliasing dnl 78 | -Wshadow dnl 79 | -Winline dnl 80 | -Wpacked dnl 81 | -Wmissing-format-attribute dnl 82 | -Wmissing-noreturn dnl 83 | -Winit-self dnl 84 | -Wredundant-decls dnl 85 | -Wmissing-include-dirs dnl 86 | -Wunused-but-set-variable dnl 87 | -Warray-bounds dnl 88 | -Wreturn-type dnl 89 | -Wno-overloaded-virtual dnl 90 | -Wswitch-enum dnl 91 | -Wswitch-default dnl 92 | $4 dnl 93 | $5 dnl 94 | $6 dnl 95 | $7 dnl 96 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) 97 | ]) 98 | AS_IF([test "$ax_enable_compile_warnings" = "error"],[ 99 | # "error" flags; -Werror has to be appended unconditionally because 100 | # it's not possible to test for 101 | # 102 | # suggest-attribute=format is disabled because it gives too many false 103 | # positives 104 | AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable) 105 | 106 | AX_APPEND_COMPILE_FLAGS([ dnl 107 | -Wno-suggest-attribute=format dnl 108 | ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) 109 | ]) 110 | 111 | # In the flags below, when disabling specific flags, always add *both* 112 | # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) 113 | # we enable -Werror, disable a flag, and a build bot passes CXXFLAGS=-Wall, 114 | # which effectively turns that flag back on again as an error. 115 | for flag in $ax_warn_cxxflags_variable; do 116 | AS_CASE([$flag], 117 | [-Wno-*=*],[], 118 | [-Wno-*],[ 119 | AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], 120 | ax_warn_cxxflags_variable, 121 | [$ax_compiler_flags_test]) 122 | ]) 123 | done 124 | 125 | AC_LANG_POP([C++]) 126 | 127 | # Substitute the variables 128 | AC_SUBST(ax_warn_cxxflags_variable) 129 | ])dnl AX_COMPILER_FLAGS_CXXFLAGS 130 | -------------------------------------------------------------------------------- /m4/ax_compiler_vendor.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_COMPILER_VENDOR 8 | # 9 | # DESCRIPTION 10 | # 11 | # Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun, 12 | # hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft, 13 | # watcom, etc. The vendor is returned in the cache variable 14 | # $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. 15 | # 16 | # LICENSE 17 | # 18 | # Copyright (c) 2008 Steven G. Johnson 19 | # Copyright (c) 2008 Matteo Frigo 20 | # 21 | # This program is free software: you can redistribute it and/or modify it 22 | # under the terms of the GNU General Public License as published by the 23 | # Free Software Foundation, either version 3 of the License, or (at your 24 | # option) any later version. 25 | # 26 | # This program is distributed in the hope that it will be useful, but 27 | # WITHOUT ANY WARRANTY; without even the implied warranty of 28 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 29 | # Public License for more details. 30 | # 31 | # You should have received a copy of the GNU General Public License along 32 | # with this program. If not, see . 33 | # 34 | # As a special exception, the respective Autoconf Macro's copyright owner 35 | # gives unlimited permission to copy, distribute and modify the configure 36 | # scripts that are the output of Autoconf when processing the Macro. You 37 | # need not follow the terms of the GNU General Public License when using 38 | # or distributing such scripts, even though portions of the text of the 39 | # Macro appear in them. The GNU General Public License (GPL) does govern 40 | # all other use of the material that constitutes the Autoconf Macro. 41 | # 42 | # This special exception to the GPL applies to versions of the Autoconf 43 | # Macro released by the Autoconf Archive. When you make and distribute a 44 | # modified version of the Autoconf Macro, you may extend this special 45 | # exception to the GPL to apply to your modified version as well. 46 | 47 | #serial 15 48 | 49 | AC_DEFUN([AX_COMPILER_VENDOR], 50 | [AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, 51 | dnl Please add if possible support to ax_compiler_version.m4 52 | [# note: don't check for gcc first since some other compilers define __GNUC__ 53 | vendors="intel: __ICC,__ECC,__INTEL_COMPILER 54 | ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ 55 | pathscale: __PATHCC__,__PATHSCALE__ 56 | clang: __clang__ 57 | cray: _CRAYC 58 | fujitsu: __FUJITSU 59 | gnu: __GNUC__ 60 | sun: __SUNPRO_C,__SUNPRO_CC 61 | hp: __HP_cc,__HP_aCC 62 | dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER 63 | borland: __BORLANDC__,__CODEGEARC__,__TURBOC__ 64 | comeau: __COMO__ 65 | kai: __KCC 66 | lcc: __LCC__ 67 | sgi: __sgi,sgi 68 | microsoft: _MSC_VER 69 | metrowerks: __MWERKS__ 70 | watcom: __WATCOMC__ 71 | portland: __PGI 72 | tcc: __TINYC__ 73 | unknown: UNKNOWN" 74 | for ventest in $vendors; do 75 | case $ventest in 76 | *:) vendor=$ventest; continue ;; 77 | *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; 78 | esac 79 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ 80 | #if !($vencpp) 81 | thisisanerror; 82 | #endif 83 | ])], [break]) 84 | done 85 | ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` 86 | ]) 87 | ]) 88 | -------------------------------------------------------------------------------- /m4/ax_cxx_compile_stdcxx_11.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================ 2 | # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html 3 | # ============================================================================ 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++11 12 | # standard; if necessary, add switches to CXXFLAGS to enable support. 13 | # 14 | # The first argument, if specified, indicates whether you insist on an 15 | # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. 16 | # -std=c++11). If neither is specified, you get whatever works, with 17 | # preference for an extended mode. 18 | # 19 | # The second argument, if specified 'mandatory' or if left unspecified, 20 | # indicates that baseline C++11 support is required and that the macro 21 | # should error out if no mode with that support is found. If specified 22 | # 'optional', then configuration proceeds regardless, after defining 23 | # HAVE_CXX11 if and only if a supporting mode is found. 24 | # 25 | # LICENSE 26 | # 27 | # Copyright (c) 2008 Benjamin Kosnik 28 | # Copyright (c) 2012 Zack Weinberg 29 | # Copyright (c) 2013 Roy Stogner 30 | # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov 31 | # Copyright (c) 2015 Paul Norman 32 | # 33 | # Copying and distribution of this file, with or without modification, are 34 | # permitted in any medium without royalty provided the copyright notice 35 | # and this notice are preserved. This file is offered as-is, without any 36 | # warranty. 37 | 38 | #serial 13 39 | 40 | m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ 41 | template 42 | struct check 43 | { 44 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); 45 | }; 46 | 47 | struct Base { 48 | virtual void f() {} 49 | }; 50 | struct Child : public Base { 51 | virtual void f() override {} 52 | }; 53 | 54 | typedef check> right_angle_brackets; 55 | 56 | int a; 57 | decltype(a) b; 58 | 59 | typedef check check_type; 60 | check_type c; 61 | check_type&& cr = static_cast(c); 62 | 63 | auto d = a; 64 | auto l = [](){}; 65 | // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] 66 | struct use_l { use_l() { l(); } }; 67 | 68 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae 69 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this 70 | namespace test_template_alias_sfinae { 71 | struct foo {}; 72 | 73 | template 74 | using member = typename T::member_type; 75 | 76 | template 77 | void func(...) {} 78 | 79 | template 80 | void func(member*) {} 81 | 82 | void test(); 83 | 84 | void test() { 85 | func(0); 86 | } 87 | } 88 | 89 | // Check for C++11 attribute support 90 | void noret [[noreturn]] () { throw 0; } 91 | ]]) 92 | 93 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl 94 | m4_if([$1], [], [], 95 | [$1], [ext], [], 96 | [$1], [noext], [], 97 | [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl 98 | m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], 99 | [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], 100 | [$2], [optional], [ax_cxx_compile_cxx11_required=false], 101 | [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) 102 | AC_LANG_PUSH([C++])dnl 103 | ac_success=no 104 | AC_CACHE_CHECK(whether $CXX supports C++11 features by default, 105 | ax_cv_cxx_compile_cxx11, 106 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 107 | [ax_cv_cxx_compile_cxx11=yes], 108 | [ax_cv_cxx_compile_cxx11=no])]) 109 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then 110 | ac_success=yes 111 | fi 112 | 113 | m4_if([$1], [noext], [], [dnl 114 | if test x$ac_success = xno; then 115 | for switch in -std=gnu++11 -std=gnu++0x; do 116 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) 117 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, 118 | $cachevar, 119 | [ac_save_CXXFLAGS="$CXXFLAGS" 120 | CXXFLAGS="$CXXFLAGS $switch" 121 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 122 | [eval $cachevar=yes], 123 | [eval $cachevar=no]) 124 | CXXFLAGS="$ac_save_CXXFLAGS"]) 125 | if eval test x\$$cachevar = xyes; then 126 | CXXFLAGS="$CXXFLAGS $switch" 127 | ac_success=yes 128 | break 129 | fi 130 | done 131 | fi]) 132 | 133 | m4_if([$1], [ext], [], [dnl 134 | if test x$ac_success = xno; then 135 | dnl HP's aCC needs +std=c++11 according to: 136 | dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf 137 | dnl Cray's crayCC needs "-h std=c++11" 138 | for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do 139 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) 140 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, 141 | $cachevar, 142 | [ac_save_CXXFLAGS="$CXXFLAGS" 143 | CXXFLAGS="$CXXFLAGS $switch" 144 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 145 | [eval $cachevar=yes], 146 | [eval $cachevar=no]) 147 | CXXFLAGS="$ac_save_CXXFLAGS"]) 148 | if eval test x\$$cachevar = xyes; then 149 | CXXFLAGS="$CXXFLAGS $switch" 150 | ac_success=yes 151 | break 152 | fi 153 | done 154 | fi]) 155 | AC_LANG_POP([C++]) 156 | if test x$ax_cxx_compile_cxx11_required = xtrue; then 157 | if test x$ac_success = xno; then 158 | AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) 159 | fi 160 | else 161 | if test x$ac_success = xno; then 162 | HAVE_CXX11=0 163 | AC_MSG_NOTICE([No compiler with C++11 support was found]) 164 | else 165 | HAVE_CXX11=1 166 | AC_DEFINE(HAVE_CXX11,1, 167 | [define if the compiler supports basic C++11 syntax]) 168 | fi 169 | 170 | AC_SUBST(HAVE_CXX11) 171 | fi 172 | ]) 173 | -------------------------------------------------------------------------------- /m4/ax_require_defined.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # http://www.gnu.org/software/autoconf-archive/ax_require_defined.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_REQUIRE_DEFINED(MACRO) 8 | # 9 | # DESCRIPTION 10 | # 11 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have 12 | # been defined and thus are available for use. This avoids random issues 13 | # where a macro isn't expanded. Instead the configure script emits a 14 | # non-fatal: 15 | # 16 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found 17 | # 18 | # It's like AC_REQUIRE except it doesn't expand the required macro. 19 | # 20 | # Here's an example: 21 | # 22 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) 23 | # 24 | # LICENSE 25 | # 26 | # Copyright (c) 2014 Mike Frysinger 27 | # 28 | # Copying and distribution of this file, with or without modification, are 29 | # permitted in any medium without royalty provided the copyright notice 30 | # and this notice are preserved. This file is offered as-is, without any 31 | # warranty. 32 | 33 | #serial 1 34 | 35 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl 36 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) 37 | ])dnl AX_REQUIRE_DEFINED 38 | -------------------------------------------------------------------------------- /m4/codeset.m4: -------------------------------------------------------------------------------- 1 | # codeset.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_DEFUN([AM_LANGINFO_CODESET], 10 | [ 11 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], 12 | [AC_LINK_IFELSE( 13 | [AC_LANG_PROGRAM( 14 | [[#include ]], 15 | [[char* cs = nl_langinfo(CODESET); return !cs;]])], 16 | [am_cv_langinfo_codeset=yes], 17 | [am_cv_langinfo_codeset=no]) 18 | ]) 19 | if test $am_cv_langinfo_codeset = yes; then 20 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], 21 | [Define if you have and nl_langinfo(CODESET).]) 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/extern-inline.m4: -------------------------------------------------------------------------------- 1 | dnl 'extern inline' a la ISO C99. 2 | 3 | dnl Copyright 2012-2014 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | AC_DEFUN([gl_EXTERN_INLINE], 9 | [ 10 | AH_VERBATIM([extern_inline], 11 | [/* Please see the Gnulib manual for how to use these macros. 12 | 13 | Suppress extern inline with HP-UX cc, as it appears to be broken; see 14 | . 15 | 16 | Suppress extern inline with Sun C in standards-conformance mode, as it 17 | mishandles inline functions that call each other. E.g., for 'inline void f 18 | (void) { } inline void g (void) { f (); }', c99 incorrectly complains 19 | 'reference to static identifier "f" in extern inline function'. 20 | This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. 21 | 22 | Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) 23 | on configurations that mistakenly use 'static inline' to implement 24 | functions or macros in standard C headers like . For example, 25 | if isdigit is mistakenly implemented via a static inline function, 26 | a program containing an extern inline function that calls isdigit 27 | may not work since the C standard prohibits extern inline functions 28 | from calling static functions. This bug is known to occur on: 29 | 30 | OS X 10.8 and earlier; see: 31 | http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html 32 | 33 | DragonFly; see 34 | http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log 35 | 36 | FreeBSD; see: 37 | http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html 38 | 39 | OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and 40 | for clang but remains for g++; see . 41 | Assume DragonFly and FreeBSD will be similar. */ 42 | #if (((defined __APPLE__ && defined __MACH__) \ 43 | || defined __DragonFly__ || defined __FreeBSD__) \ 44 | && (defined __header_inline \ 45 | ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ 46 | && ! defined __clang__) \ 47 | : ((! defined _DONT_USE_CTYPE_INLINE_ \ 48 | && (defined __GNUC__ || defined __cplusplus)) \ 49 | || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ 50 | && defined __GNUC__ && ! defined __cplusplus)))) 51 | # define _GL_EXTERN_INLINE_STDHEADER_BUG 52 | #endif 53 | #if ((__GNUC__ \ 54 | ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ 55 | : (199901L <= __STDC_VERSION__ \ 56 | && !defined __HP_cc \ 57 | && !(defined __SUNPRO_C && __STDC__))) \ 58 | && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) 59 | # define _GL_INLINE inline 60 | # define _GL_EXTERN_INLINE extern inline 61 | # define _GL_EXTERN_INLINE_IN_USE 62 | #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ 63 | && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) 64 | # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ 65 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ 66 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) 67 | # else 68 | # define _GL_INLINE extern inline 69 | # endif 70 | # define _GL_EXTERN_INLINE extern 71 | # define _GL_EXTERN_INLINE_IN_USE 72 | #else 73 | # define _GL_INLINE static _GL_UNUSED 74 | # define _GL_EXTERN_INLINE static _GL_UNUSED 75 | #endif 76 | 77 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) 78 | # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ 79 | # define _GL_INLINE_HEADER_CONST_PRAGMA 80 | # else 81 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ 82 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") 83 | # endif 84 | /* Suppress GCC's bogus "no previous prototype for 'FOO'" 85 | and "no previous declaration for 'FOO'" diagnostics, 86 | when FOO is an inline function in the header; see 87 | . */ 88 | # define _GL_INLINE_HEADER_BEGIN \ 89 | _Pragma ("GCC diagnostic push") \ 90 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ 91 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ 92 | _GL_INLINE_HEADER_CONST_PRAGMA 93 | # define _GL_INLINE_HEADER_END \ 94 | _Pragma ("GCC diagnostic pop") 95 | #else 96 | # define _GL_INLINE_HEADER_BEGIN 97 | # define _GL_INLINE_HEADER_END 98 | #endif]) 99 | ]) 100 | -------------------------------------------------------------------------------- /m4/fcntl-o.m4: -------------------------------------------------------------------------------- 1 | # fcntl-o.m4 serial 4 2 | dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Written by Paul Eggert. 8 | 9 | # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. 10 | # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. 11 | # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. 12 | AC_DEFUN([gl_FCNTL_O_FLAGS], 13 | [ 14 | dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. 15 | dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes 16 | dnl AC_GNU_SOURCE. 17 | m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], 18 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], 19 | [AC_REQUIRE([AC_GNU_SOURCE])]) 20 | 21 | AC_CHECK_HEADERS_ONCE([unistd.h]) 22 | AC_CHECK_FUNCS_ONCE([symlink]) 23 | AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], 24 | [AC_RUN_IFELSE( 25 | [AC_LANG_PROGRAM( 26 | [[#include 27 | #include 28 | #if HAVE_UNISTD_H 29 | # include 30 | #else /* on Windows with MSVC */ 31 | # include 32 | # include 33 | # defined sleep(n) _sleep ((n) * 1000) 34 | #endif 35 | #include 36 | #ifndef O_NOATIME 37 | #define O_NOATIME 0 38 | #endif 39 | #ifndef O_NOFOLLOW 40 | #define O_NOFOLLOW 0 41 | #endif 42 | static int const constants[] = 43 | { 44 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, 45 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY 46 | }; 47 | ]], 48 | [[ 49 | int result = !constants; 50 | #if HAVE_SYMLINK 51 | { 52 | static char const sym[] = "conftest.sym"; 53 | if (symlink ("/dev/null", sym) != 0) 54 | result |= 2; 55 | else 56 | { 57 | int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); 58 | if (fd >= 0) 59 | { 60 | close (fd); 61 | result |= 4; 62 | } 63 | } 64 | if (unlink (sym) != 0 || symlink (".", sym) != 0) 65 | result |= 2; 66 | else 67 | { 68 | int fd = open (sym, O_RDONLY | O_NOFOLLOW); 69 | if (fd >= 0) 70 | { 71 | close (fd); 72 | result |= 4; 73 | } 74 | } 75 | unlink (sym); 76 | } 77 | #endif 78 | { 79 | static char const file[] = "confdefs.h"; 80 | int fd = open (file, O_RDONLY | O_NOATIME); 81 | if (fd < 0) 82 | result |= 8; 83 | else 84 | { 85 | struct stat st0; 86 | if (fstat (fd, &st0) != 0) 87 | result |= 16; 88 | else 89 | { 90 | char c; 91 | sleep (1); 92 | if (read (fd, &c, 1) != 1) 93 | result |= 24; 94 | else 95 | { 96 | if (close (fd) != 0) 97 | result |= 32; 98 | else 99 | { 100 | struct stat st1; 101 | if (stat (file, &st1) != 0) 102 | result |= 40; 103 | else 104 | if (st0.st_atime != st1.st_atime) 105 | result |= 64; 106 | } 107 | } 108 | } 109 | } 110 | } 111 | return result;]])], 112 | [gl_cv_header_working_fcntl_h=yes], 113 | [case $? in #( 114 | 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 115 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 116 | 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( 117 | *) gl_cv_header_working_fcntl_h='no';; 118 | esac], 119 | [gl_cv_header_working_fcntl_h=cross-compiling])]) 120 | 121 | case $gl_cv_header_working_fcntl_h in #( 122 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( 123 | *) ac_val=1;; 124 | esac 125 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], 126 | [Define to 1 if O_NOATIME works.]) 127 | 128 | case $gl_cv_header_working_fcntl_h in #( 129 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( 130 | *) ac_val=1;; 131 | esac 132 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], 133 | [Define to 1 if O_NOFOLLOW works.]) 134 | ]) 135 | -------------------------------------------------------------------------------- /m4/glibc2.m4: -------------------------------------------------------------------------------- 1 | # glibc2.m4 serial 3 2 | dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | # Test for the GNU C Library, version 2.0 or newer. 9 | # From Bruno Haible. 10 | 11 | AC_DEFUN([gt_GLIBC2], 12 | [ 13 | AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], 14 | [ac_cv_gnu_library_2], 15 | [AC_EGREP_CPP([Lucky GNU user], 16 | [ 17 | #include 18 | #ifdef __GNU_LIBRARY__ 19 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ 20 | Lucky GNU user 21 | #endif 22 | #endif 23 | ], 24 | [ac_cv_gnu_library_2=yes], 25 | [ac_cv_gnu_library_2=no]) 26 | ] 27 | ) 28 | AC_SUBST([GLIBC2]) 29 | GLIBC2="$ac_cv_gnu_library_2" 30 | ] 31 | ) 32 | -------------------------------------------------------------------------------- /m4/glibc21.m4: -------------------------------------------------------------------------------- 1 | # glibc21.m4 serial 5 2 | dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | # Test for the GNU C Library, version 2.1 or newer, or uClibc. 9 | # From Bruno Haible. 10 | 11 | AC_DEFUN([gl_GLIBC21], 12 | [ 13 | AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], 14 | [ac_cv_gnu_library_2_1], 15 | [AC_EGREP_CPP([Lucky], 16 | [ 17 | #include 18 | #ifdef __GNU_LIBRARY__ 19 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 20 | Lucky GNU user 21 | #endif 22 | #endif 23 | #ifdef __UCLIBC__ 24 | Lucky user 25 | #endif 26 | ], 27 | [ac_cv_gnu_library_2_1=yes], 28 | [ac_cv_gnu_library_2_1=no]) 29 | ] 30 | ) 31 | AC_SUBST([GLIBC21]) 32 | GLIBC21="$ac_cv_gnu_library_2_1" 33 | ] 34 | ) 35 | -------------------------------------------------------------------------------- /m4/gsettings.m4: -------------------------------------------------------------------------------- 1 | dnl GLIB_GSETTINGS 2 | dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether 3 | dnl the schema should be compiled 4 | dnl 5 | 6 | AC_DEFUN([GLIB_GSETTINGS], 7 | [ 8 | m4_pattern_allow([AM_V_GEN]) 9 | AC_ARG_ENABLE(schemas-compile, 10 | AS_HELP_STRING([--disable-schemas-compile], 11 | [Disable regeneration of gschemas.compiled on install]), 12 | [case ${enableval} in 13 | yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; 14 | no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; 15 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; 16 | esac]) 17 | AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) 18 | PKG_PROG_PKG_CONFIG([0.16]) 19 | AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) 20 | if test x$cross_compiling != xyes; then 21 | GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0` 22 | else 23 | AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas) 24 | fi 25 | AC_SUBST(GLIB_COMPILE_SCHEMAS) 26 | if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then 27 | ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) 28 | else 29 | ifelse([$1],,[:],[$1]) 30 | fi 31 | 32 | GSETTINGS_RULES=' 33 | .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas 34 | 35 | mostlyclean-am: clean-gsettings-schemas 36 | 37 | gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) 38 | 39 | %.gschema.valid: %.gschema.xml $(gsettings__enum_file) 40 | $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@ 41 | 42 | all-am: $(gsettings_SCHEMAS:.xml=.valid) 43 | uninstall-am: uninstall-gsettings-schemas 44 | install-data-am: install-gsettings-schemas 45 | 46 | .SECONDARY: $(gsettings_SCHEMAS) 47 | 48 | install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) 49 | @$(NORMAL_INSTALL) 50 | if test -n "$^"; then \ 51 | test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ 52 | $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ 53 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ 54 | fi 55 | 56 | uninstall-gsettings-schemas: 57 | @$(NORMAL_UNINSTALL) 58 | @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ 59 | files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ 60 | test -n "$$files" || exit 0; \ 61 | echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ 62 | cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files 63 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) 64 | 65 | clean-gsettings-schemas: 66 | rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) 67 | 68 | ifdef gsettings_ENUM_NAMESPACE 69 | $(gsettings__enum_file): $(gsettings_ENUM_FILES) 70 | $(AM_V_GEN) glib-mkenums --comments '\'''\'' --fhead "" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " " --vtail " " --ftail "" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@ 71 | endif 72 | ' 73 | _GSETTINGS_SUBST(GSETTINGS_RULES) 74 | ]) 75 | 76 | dnl _GSETTINGS_SUBST(VARIABLE) 77 | dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST 78 | AC_DEFUN([_GSETTINGS_SUBST], 79 | [ 80 | AC_SUBST([$1]) 81 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) 82 | ] 83 | ) 84 | -------------------------------------------------------------------------------- /m4/iconv.m4: -------------------------------------------------------------------------------- 1 | # iconv.m4 serial 19 (gettext-0.18.2) 2 | dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 10 | [ 11 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 12 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 13 | AC_REQUIRE([AC_LIB_RPATH]) 14 | 15 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 16 | dnl accordingly. 17 | AC_LIB_LINKFLAGS_BODY([iconv]) 18 | ]) 19 | 20 | AC_DEFUN([AM_ICONV_LINK], 21 | [ 22 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 23 | dnl those with the standalone portable GNU libiconv installed). 24 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 25 | 26 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 27 | dnl accordingly. 28 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 29 | 30 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, 31 | dnl because if the user has installed libiconv and not disabled its use 32 | dnl via --without-libiconv-prefix, he wants to use it. The first 33 | dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. 34 | am_save_CPPFLAGS="$CPPFLAGS" 35 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 36 | 37 | AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ 38 | am_cv_func_iconv="no, consider installing GNU libiconv" 39 | am_cv_lib_iconv=no 40 | AC_LINK_IFELSE( 41 | [AC_LANG_PROGRAM( 42 | [[ 43 | #include 44 | #include 45 | ]], 46 | [[iconv_t cd = iconv_open("",""); 47 | iconv(cd,NULL,NULL,NULL,NULL); 48 | iconv_close(cd);]])], 49 | [am_cv_func_iconv=yes]) 50 | if test "$am_cv_func_iconv" != yes; then 51 | am_save_LIBS="$LIBS" 52 | LIBS="$LIBS $LIBICONV" 53 | AC_LINK_IFELSE( 54 | [AC_LANG_PROGRAM( 55 | [[ 56 | #include 57 | #include 58 | ]], 59 | [[iconv_t cd = iconv_open("",""); 60 | iconv(cd,NULL,NULL,NULL,NULL); 61 | iconv_close(cd);]])], 62 | [am_cv_lib_iconv=yes] 63 | [am_cv_func_iconv=yes]) 64 | LIBS="$am_save_LIBS" 65 | fi 66 | ]) 67 | if test "$am_cv_func_iconv" = yes; then 68 | AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ 69 | dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, 70 | dnl Solaris 10. 71 | am_save_LIBS="$LIBS" 72 | if test $am_cv_lib_iconv = yes; then 73 | LIBS="$LIBS $LIBICONV" 74 | fi 75 | am_cv_func_iconv_works=no 76 | for ac_iconv_const in '' 'const'; do 77 | AC_RUN_IFELSE( 78 | [AC_LANG_PROGRAM( 79 | [[ 80 | #include 81 | #include 82 | 83 | #ifndef ICONV_CONST 84 | # define ICONV_CONST $ac_iconv_const 85 | #endif 86 | ]], 87 | [[int result = 0; 88 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 89 | returns. */ 90 | { 91 | iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 92 | if (cd_utf8_to_88591 != (iconv_t)(-1)) 93 | { 94 | static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ 95 | char buf[10]; 96 | ICONV_CONST char *inptr = input; 97 | size_t inbytesleft = strlen (input); 98 | char *outptr = buf; 99 | size_t outbytesleft = sizeof (buf); 100 | size_t res = iconv (cd_utf8_to_88591, 101 | &inptr, &inbytesleft, 102 | &outptr, &outbytesleft); 103 | if (res == 0) 104 | result |= 1; 105 | iconv_close (cd_utf8_to_88591); 106 | } 107 | } 108 | /* Test against Solaris 10 bug: Failures are not distinguishable from 109 | successful returns. */ 110 | { 111 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 112 | if (cd_ascii_to_88591 != (iconv_t)(-1)) 113 | { 114 | static ICONV_CONST char input[] = "\263"; 115 | char buf[10]; 116 | ICONV_CONST char *inptr = input; 117 | size_t inbytesleft = strlen (input); 118 | char *outptr = buf; 119 | size_t outbytesleft = sizeof (buf); 120 | size_t res = iconv (cd_ascii_to_88591, 121 | &inptr, &inbytesleft, 122 | &outptr, &outbytesleft); 123 | if (res == 0) 124 | result |= 2; 125 | iconv_close (cd_ascii_to_88591); 126 | } 127 | } 128 | /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ 129 | { 130 | iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); 131 | if (cd_88591_to_utf8 != (iconv_t)(-1)) 132 | { 133 | static ICONV_CONST char input[] = "\304"; 134 | static char buf[2] = { (char)0xDE, (char)0xAD }; 135 | ICONV_CONST char *inptr = input; 136 | size_t inbytesleft = 1; 137 | char *outptr = buf; 138 | size_t outbytesleft = 1; 139 | size_t res = iconv (cd_88591_to_utf8, 140 | &inptr, &inbytesleft, 141 | &outptr, &outbytesleft); 142 | if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) 143 | result |= 4; 144 | iconv_close (cd_88591_to_utf8); 145 | } 146 | } 147 | #if 0 /* This bug could be worked around by the caller. */ 148 | /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ 149 | { 150 | iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 151 | if (cd_88591_to_utf8 != (iconv_t)(-1)) 152 | { 153 | static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 154 | char buf[50]; 155 | ICONV_CONST char *inptr = input; 156 | size_t inbytesleft = strlen (input); 157 | char *outptr = buf; 158 | size_t outbytesleft = sizeof (buf); 159 | size_t res = iconv (cd_88591_to_utf8, 160 | &inptr, &inbytesleft, 161 | &outptr, &outbytesleft); 162 | if ((int)res > 0) 163 | result |= 8; 164 | iconv_close (cd_88591_to_utf8); 165 | } 166 | } 167 | #endif 168 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 169 | provided. */ 170 | if (/* Try standardized names. */ 171 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 172 | /* Try IRIX, OSF/1 names. */ 173 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 174 | /* Try AIX names. */ 175 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 176 | /* Try HP-UX names. */ 177 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 178 | result |= 16; 179 | return result; 180 | ]])], 181 | [am_cv_func_iconv_works=yes], , 182 | [case "$host_os" in 183 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 184 | *) am_cv_func_iconv_works="guessing yes" ;; 185 | esac]) 186 | test "$am_cv_func_iconv_works" = no || break 187 | done 188 | LIBS="$am_save_LIBS" 189 | ]) 190 | case "$am_cv_func_iconv_works" in 191 | *no) am_func_iconv=no am_cv_lib_iconv=no ;; 192 | *) am_func_iconv=yes ;; 193 | esac 194 | else 195 | am_func_iconv=no am_cv_lib_iconv=no 196 | fi 197 | if test "$am_func_iconv" = yes; then 198 | AC_DEFINE([HAVE_ICONV], [1], 199 | [Define if you have the iconv() function and it works.]) 200 | fi 201 | if test "$am_cv_lib_iconv" = yes; then 202 | AC_MSG_CHECKING([how to link with libiconv]) 203 | AC_MSG_RESULT([$LIBICONV]) 204 | else 205 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 206 | dnl either. 207 | CPPFLAGS="$am_save_CPPFLAGS" 208 | LIBICONV= 209 | LTLIBICONV= 210 | fi 211 | AC_SUBST([LIBICONV]) 212 | AC_SUBST([LTLIBICONV]) 213 | ]) 214 | 215 | dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to 216 | dnl avoid warnings like 217 | dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". 218 | dnl This is tricky because of the way 'aclocal' is implemented: 219 | dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. 220 | dnl Otherwise aclocal's initial scan pass would miss the macro definition. 221 | dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. 222 | dnl Otherwise aclocal would emit many "Use of uninitialized value $1" 223 | dnl warnings. 224 | m4_define([gl_iconv_AC_DEFUN], 225 | m4_version_prereq([2.64], 226 | [[AC_DEFUN_ONCE( 227 | [$1], [$2])]], 228 | [m4_ifdef([gl_00GNULIB], 229 | [[AC_DEFUN_ONCE( 230 | [$1], [$2])]], 231 | [[AC_DEFUN( 232 | [$1], [$2])]])])) 233 | gl_iconv_AC_DEFUN([AM_ICONV], 234 | [ 235 | AM_ICONV_LINK 236 | if test "$am_cv_func_iconv" = yes; then 237 | AC_MSG_CHECKING([for iconv declaration]) 238 | AC_CACHE_VAL([am_cv_proto_iconv], [ 239 | AC_COMPILE_IFELSE( 240 | [AC_LANG_PROGRAM( 241 | [[ 242 | #include 243 | #include 244 | extern 245 | #ifdef __cplusplus 246 | "C" 247 | #endif 248 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) 249 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 250 | #else 251 | size_t iconv(); 252 | #endif 253 | ]], 254 | [[]])], 255 | [am_cv_proto_iconv_arg1=""], 256 | [am_cv_proto_iconv_arg1="const"]) 257 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 259 | AC_MSG_RESULT([ 260 | $am_cv_proto_iconv]) 261 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 262 | [Define as const if the declaration of iconv() needs const.]) 263 | dnl Also substitute ICONV_CONST in the gnulib generated . 264 | m4_ifdef([gl_ICONV_H_DEFAULTS], 265 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) 266 | if test -n "$am_cv_proto_iconv_arg1"; then 267 | ICONV_CONST="const" 268 | fi 269 | ]) 270 | fi 271 | ]) 272 | -------------------------------------------------------------------------------- /m4/intdiv0.m4: -------------------------------------------------------------------------------- 1 | # intdiv0.m4 serial 6 (gettext-0.18.2) 2 | dnl Copyright (C) 2002, 2007-2008, 2010-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_DEFUN([gt_INTDIV0], 10 | [ 11 | AC_REQUIRE([AC_PROG_CC])dnl 12 | AC_REQUIRE([AC_CANONICAL_HOST])dnl 13 | 14 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 15 | gt_cv_int_divbyzero_sigfpe, 16 | [ 17 | gt_cv_int_divbyzero_sigfpe= 18 | changequote(,)dnl 19 | case "$host_os" in 20 | macos* | darwin[6-9]* | darwin[1-9][0-9]*) 21 | # On Mac OS X 10.2 or newer, just assume the same as when cross- 22 | # compiling. If we were to perform the real test, 1 Crash Report 23 | # dialog window would pop up. 24 | case "$host_cpu" in 25 | i[34567]86 | x86_64) 26 | gt_cv_int_divbyzero_sigfpe="guessing yes" ;; 27 | esac 28 | ;; 29 | esac 30 | changequote([,])dnl 31 | if test -z "$gt_cv_int_divbyzero_sigfpe"; then 32 | AC_RUN_IFELSE( 33 | [AC_LANG_SOURCE([[ 34 | #include 35 | #include 36 | 37 | static void 38 | sigfpe_handler (int sig) 39 | { 40 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 41 | exit (sig != SIGFPE); 42 | } 43 | 44 | int x = 1; 45 | int y = 0; 46 | int z; 47 | int nan; 48 | 49 | int main () 50 | { 51 | signal (SIGFPE, sigfpe_handler); 52 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ 53 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) 54 | signal (SIGTRAP, sigfpe_handler); 55 | #endif 56 | /* Linux/SPARC yields signal SIGILL. */ 57 | #if defined (__sparc__) && defined (__linux__) 58 | signal (SIGILL, sigfpe_handler); 59 | #endif 60 | 61 | z = x / y; 62 | nan = y / y; 63 | exit (2); 64 | } 65 | ]])], 66 | [gt_cv_int_divbyzero_sigfpe=yes], 67 | [gt_cv_int_divbyzero_sigfpe=no], 68 | [ 69 | # Guess based on the CPU. 70 | changequote(,)dnl 71 | case "$host_cpu" in 72 | alpha* | i[34567]86 | x86_64 | m68k | s390*) 73 | gt_cv_int_divbyzero_sigfpe="guessing yes";; 74 | *) 75 | gt_cv_int_divbyzero_sigfpe="guessing no";; 76 | esac 77 | changequote([,])dnl 78 | ]) 79 | fi 80 | ]) 81 | case "$gt_cv_int_divbyzero_sigfpe" in 82 | *yes) value=1;; 83 | *) value=0;; 84 | esac 85 | AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], 86 | [Define if integer division by zero raises signal SIGFPE.]) 87 | ]) 88 | -------------------------------------------------------------------------------- /m4/intldir.m4: -------------------------------------------------------------------------------- 1 | # intldir.m4 serial 2 (gettext-0.18) 2 | dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | AC_PREREQ([2.52]) 17 | 18 | dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. 19 | AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) 20 | -------------------------------------------------------------------------------- /m4/intlmacosx.m4: -------------------------------------------------------------------------------- 1 | # intlmacosx.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2004-2014 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Checks for special options needed on Mac OS X. 17 | dnl Defines INTL_MACOSX_LIBS. 18 | AC_DEFUN([gt_INTL_MACOSX], 19 | [ 20 | dnl Check for API introduced in Mac OS X 10.2. 21 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], 22 | [gt_cv_func_CFPreferencesCopyAppValue], 23 | [gt_save_LIBS="$LIBS" 24 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 25 | AC_LINK_IFELSE( 26 | [AC_LANG_PROGRAM( 27 | [[#include ]], 28 | [[CFPreferencesCopyAppValue(NULL, NULL)]])], 29 | [gt_cv_func_CFPreferencesCopyAppValue=yes], 30 | [gt_cv_func_CFPreferencesCopyAppValue=no]) 31 | LIBS="$gt_save_LIBS"]) 32 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 33 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], 34 | [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) 35 | fi 36 | dnl Check for API introduced in Mac OS X 10.3. 37 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], 38 | [gt_save_LIBS="$LIBS" 39 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 40 | AC_LINK_IFELSE( 41 | [AC_LANG_PROGRAM( 42 | [[#include ]], 43 | [[CFLocaleCopyCurrent();]])], 44 | [gt_cv_func_CFLocaleCopyCurrent=yes], 45 | [gt_cv_func_CFLocaleCopyCurrent=no]) 46 | LIBS="$gt_save_LIBS"]) 47 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 48 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], 49 | [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) 50 | fi 51 | INTL_MACOSX_LIBS= 52 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 53 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 54 | fi 55 | AC_SUBST([INTL_MACOSX_LIBS]) 56 | ]) 57 | -------------------------------------------------------------------------------- /m4/intltool.m4: -------------------------------------------------------------------------------- 1 | ## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- 2 | ## Copyright (C) 2001 Eazel, Inc. 3 | ## Author: Maciej Stachowiak 4 | ## Kenneth Christiansen 5 | ## 6 | ## This program is free software; you can redistribute it and/or modify 7 | ## it under the terms of the GNU General Public License as published by 8 | ## the Free Software Foundation; either version 2 of the License, or 9 | ## (at your option) any later version. 10 | ## 11 | ## This program is distributed in the hope that it will be useful, but 12 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU General Public License 17 | ## along with this program; if not, write to the Free Software 18 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | ## 20 | ## As a special exception to the GNU General Public License, if you 21 | ## distribute this file as part of a program that contains a 22 | ## configuration script generated by Autoconf, you may include it under 23 | ## the same distribution terms that you use for the rest of that program. 24 | 25 | dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) 26 | # serial 42 IT_PROG_INTLTOOL 27 | AC_DEFUN([IT_PROG_INTLTOOL], [ 28 | AC_PREREQ([2.50])dnl 29 | AC_REQUIRE([AM_NLS])dnl 30 | 31 | case "$am__api_version" in 32 | 1.[01234]) 33 | AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) 34 | ;; 35 | *) 36 | ;; 37 | esac 38 | 39 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` 40 | INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` 41 | INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` 42 | if test -n "$1"; then 43 | AC_MSG_CHECKING([for intltool >= $1]) 44 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) 45 | test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || 46 | AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) 47 | fi 48 | 49 | AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) 50 | AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) 51 | AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) 52 | if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then 53 | AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) 54 | fi 55 | 56 | if test -z "$AM_DEFAULT_VERBOSITY"; then 57 | AM_DEFAULT_VERBOSITY=1 58 | fi 59 | AC_SUBST([AM_DEFAULT_VERBOSITY]) 60 | 61 | INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' 62 | INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' 63 | INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' 64 | AC_SUBST(INTLTOOL_V_MERGE) 65 | AC_SUBST(INTLTOOL__v_MERGE_) 66 | AC_SUBST(INTLTOOL__v_MERGE_0) 67 | 68 | INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' 69 | intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' 70 | intltool__v_merge_options_0='-q' 71 | AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) 72 | AC_SUBST(intltool__v_merge_options_) 73 | AC_SUBST(intltool__v_merge_options_0) 74 | 75 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 76 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 77 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 78 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 79 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' 80 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 81 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 82 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 83 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 84 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 85 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 86 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then 87 | INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' 88 | else 89 | INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' 90 | fi 91 | INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 92 | INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 93 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 94 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 95 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 96 | INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 97 | INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 98 | 99 | _IT_SUBST(INTLTOOL_DESKTOP_RULE) 100 | _IT_SUBST(INTLTOOL_DIRECTORY_RULE) 101 | _IT_SUBST(INTLTOOL_KEYS_RULE) 102 | _IT_SUBST(INTLTOOL_PROP_RULE) 103 | _IT_SUBST(INTLTOOL_OAF_RULE) 104 | _IT_SUBST(INTLTOOL_PONG_RULE) 105 | _IT_SUBST(INTLTOOL_SERVER_RULE) 106 | _IT_SUBST(INTLTOOL_SHEET_RULE) 107 | _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) 108 | _IT_SUBST(INTLTOOL_UI_RULE) 109 | _IT_SUBST(INTLTOOL_XAM_RULE) 110 | _IT_SUBST(INTLTOOL_KBD_RULE) 111 | _IT_SUBST(INTLTOOL_XML_RULE) 112 | _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) 113 | _IT_SUBST(INTLTOOL_CAVES_RULE) 114 | _IT_SUBST(INTLTOOL_SCHEMAS_RULE) 115 | _IT_SUBST(INTLTOOL_THEME_RULE) 116 | _IT_SUBST(INTLTOOL_SERVICE_RULE) 117 | _IT_SUBST(INTLTOOL_POLICY_RULE) 118 | 119 | # Check the gettext tools to make sure they are GNU 120 | AC_PATH_PROG(XGETTEXT, xgettext) 121 | AC_PATH_PROG(MSGMERGE, msgmerge) 122 | AC_PATH_PROG(MSGFMT, msgfmt) 123 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 124 | if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then 125 | AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) 126 | fi 127 | xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" 128 | mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" 129 | mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" 130 | if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then 131 | AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) 132 | fi 133 | 134 | AC_PATH_PROG(INTLTOOL_PERL, perl) 135 | if test -z "$INTLTOOL_PERL"; then 136 | AC_MSG_ERROR([perl not found]) 137 | fi 138 | AC_MSG_CHECKING([for perl >= 5.8.1]) 139 | $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 140 | if test $? -ne 0; then 141 | AC_MSG_ERROR([perl 5.8.1 is required for intltool]) 142 | else 143 | IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` 144 | AC_MSG_RESULT([$IT_PERL_VERSION]) 145 | fi 146 | if test "x$2" != "xno-xml"; then 147 | AC_MSG_CHECKING([for XML::Parser]) 148 | if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then 149 | AC_MSG_RESULT([ok]) 150 | else 151 | AC_MSG_ERROR([XML::Parser perl module is required for intltool]) 152 | fi 153 | fi 154 | 155 | # Substitute ALL_LINGUAS so we can use it in po/Makefile 156 | AC_SUBST(ALL_LINGUAS) 157 | 158 | IT_PO_SUBDIR([po]) 159 | 160 | ]) 161 | 162 | 163 | # IT_PO_SUBDIR(DIRNAME) 164 | # --------------------- 165 | # All po subdirs have to be declared with this macro; the subdir "po" is 166 | # declared by IT_PROG_INTLTOOL. 167 | # 168 | AC_DEFUN([IT_PO_SUBDIR], 169 | [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. 170 | dnl 171 | dnl The following CONFIG_COMMANDS should be executed at the very end 172 | dnl of config.status. 173 | AC_CONFIG_COMMANDS_PRE([ 174 | AC_CONFIG_COMMANDS([$1/stamp-it], [ 175 | if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then 176 | AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) 177 | fi 178 | rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" 179 | >"$1/stamp-it.tmp" 180 | [sed '/^#/d 181 | s/^[[].*] *// 182 | /^[ ]*$/d 183 | '"s|^| $ac_top_srcdir/|" \ 184 | "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" 185 | ] 186 | [sed '/^POTFILES =/,/[^\\]$/ { 187 | /^POTFILES =/!d 188 | r $1/POTFILES 189 | } 190 | ' "$1/Makefile.in" >"$1/Makefile"] 191 | rm -f "$1/Makefile.tmp" 192 | mv "$1/stamp-it.tmp" "$1/stamp-it" 193 | ]) 194 | ])dnl 195 | ]) 196 | 197 | # _IT_SUBST(VARIABLE) 198 | # ------------------- 199 | # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST 200 | # 201 | AC_DEFUN([_IT_SUBST], 202 | [ 203 | AC_SUBST([$1]) 204 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) 205 | ] 206 | ) 207 | 208 | # deprecated macros 209 | AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) 210 | # A hint is needed for aclocal from Automake <= 1.9.4: 211 | # AC_DEFUN([AC_PROG_INTLTOOL], ...) 212 | 213 | -------------------------------------------------------------------------------- /m4/intmax.m4: -------------------------------------------------------------------------------- 1 | # intmax.m4 serial 6 (gettext-0.18.2) 2 | dnl Copyright (C) 2002-2005, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether the system has the 'intmax_t' type, but don't attempt to 9 | dnl find a replacement if it is lacking. 10 | 11 | AC_DEFUN([gt_TYPE_INTMAX_T], 12 | [ 13 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 14 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 15 | AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], 16 | [AC_COMPILE_IFELSE( 17 | [AC_LANG_PROGRAM( 18 | [[ 19 | #include 20 | #include 21 | #if HAVE_STDINT_H_WITH_UINTMAX 22 | #include 23 | #endif 24 | #if HAVE_INTTYPES_H_WITH_UINTMAX 25 | #include 26 | #endif 27 | ]], 28 | [[intmax_t x = -1; 29 | return !x;]])], 30 | [gt_cv_c_intmax_t=yes], 31 | [gt_cv_c_intmax_t=no])]) 32 | if test $gt_cv_c_intmax_t = yes; then 33 | AC_DEFINE([HAVE_INTMAX_T], [1], 34 | [Define if you have the 'intmax_t' type in or .]) 35 | fi 36 | ]) 37 | -------------------------------------------------------------------------------- /m4/introspection.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: autoconf -*- 2 | dnl Copyright 2009 Johan Dahlin 3 | dnl 4 | dnl This file is free software; the author(s) gives unlimited 5 | dnl permission to copy and/or distribute it, with or without 6 | dnl modifications, as long as this notice is preserved. 7 | dnl 8 | 9 | # serial 1 10 | 11 | m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], 12 | [ 13 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first 14 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first 15 | AC_BEFORE([LT_INIT],[$0])dnl setup libtool first 16 | 17 | dnl enable/disable introspection 18 | m4_if([$2], [require], 19 | [dnl 20 | enable_introspection=yes 21 | ],[dnl 22 | AC_ARG_ENABLE(introspection, 23 | AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], 24 | [Enable introspection for this build]),, 25 | [enable_introspection=auto]) 26 | ])dnl 27 | 28 | AC_MSG_CHECKING([for gobject-introspection]) 29 | 30 | dnl presence/version checking 31 | AS_CASE([$enable_introspection], 32 | [no], [dnl 33 | found_introspection="no (disabled, use --enable-introspection to enable)" 34 | ],dnl 35 | [yes],[dnl 36 | PKG_CHECK_EXISTS([gobject-introspection-1.0],, 37 | AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) 38 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], 39 | found_introspection=yes, 40 | AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) 41 | ],dnl 42 | [auto],[dnl 43 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) 44 | dnl Canonicalize enable_introspection 45 | enable_introspection=$found_introspection 46 | ],dnl 47 | [dnl 48 | AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) 49 | ])dnl 50 | 51 | AC_MSG_RESULT([$found_introspection]) 52 | 53 | INTROSPECTION_SCANNER= 54 | INTROSPECTION_COMPILER= 55 | INTROSPECTION_GENERATE= 56 | INTROSPECTION_GIRDIR= 57 | INTROSPECTION_TYPELIBDIR= 58 | if test "x$found_introspection" = "xyes"; then 59 | INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` 60 | INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` 61 | INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` 62 | INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` 63 | INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" 64 | INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` 65 | INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` 66 | INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection 67 | fi 68 | AC_SUBST(INTROSPECTION_SCANNER) 69 | AC_SUBST(INTROSPECTION_COMPILER) 70 | AC_SUBST(INTROSPECTION_GENERATE) 71 | AC_SUBST(INTROSPECTION_GIRDIR) 72 | AC_SUBST(INTROSPECTION_TYPELIBDIR) 73 | AC_SUBST(INTROSPECTION_CFLAGS) 74 | AC_SUBST(INTROSPECTION_LIBS) 75 | AC_SUBST(INTROSPECTION_MAKEFILE) 76 | 77 | AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") 78 | ]) 79 | 80 | 81 | dnl Usage: 82 | dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) 83 | 84 | AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], 85 | [ 86 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) 87 | ]) 88 | 89 | dnl Usage: 90 | dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) 91 | 92 | 93 | AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], 94 | [ 95 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) 96 | ]) 97 | -------------------------------------------------------------------------------- /m4/inttypes-pri.m4: -------------------------------------------------------------------------------- 1 | # inttypes-pri.m4 serial 7 (gettext-0.18.2) 2 | dnl Copyright (C) 1997-2002, 2006, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_PREREQ([2.53]) 10 | 11 | # Define PRI_MACROS_BROKEN if exists and defines the PRI* 12 | # macros to non-string values. This is the case on AIX 4.3.3. 13 | 14 | AC_DEFUN([gt_INTTYPES_PRI], 15 | [ 16 | AC_CHECK_HEADERS([inttypes.h]) 17 | if test $ac_cv_header_inttypes_h = yes; then 18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 19 | [gt_cv_inttypes_pri_broken], 20 | [ 21 | AC_COMPILE_IFELSE( 22 | [AC_LANG_PROGRAM( 23 | [[ 24 | #include 25 | #ifdef PRId32 26 | char *p = PRId32; 27 | #endif 28 | ]], 29 | [[]])], 30 | [gt_cv_inttypes_pri_broken=no], 31 | [gt_cv_inttypes_pri_broken=yes]) 32 | ]) 33 | fi 34 | if test "$gt_cv_inttypes_pri_broken" = yes; then 35 | AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], 36 | [Define if exists and defines unusable PRI* macros.]) 37 | PRI_MACROS_BROKEN=1 38 | else 39 | PRI_MACROS_BROKEN=0 40 | fi 41 | AC_SUBST([PRI_MACROS_BROKEN]) 42 | ]) 43 | -------------------------------------------------------------------------------- /m4/inttypes_h.m4: -------------------------------------------------------------------------------- 1 | # inttypes_h.m4 serial 10 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, 10 | # doesn't clash with , and declares uintmax_t. 11 | 12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 13 | [ 14 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[ 18 | #include 19 | #include 20 | ]], 21 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 22 | [gl_cv_header_inttypes_h=yes], 23 | [gl_cv_header_inttypes_h=no])]) 24 | if test $gl_cv_header_inttypes_h = yes; then 25 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], 26 | [Define if exists, doesn't clash with , 27 | and declares uintmax_t. ]) 28 | fi 29 | ]) 30 | -------------------------------------------------------------------------------- /m4/lcmessage.m4: -------------------------------------------------------------------------------- 1 | # lcmessage.m4 serial 7 (gettext-0.18.2) 2 | dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl 8 | dnl This file can can be used in projects which are not available under 9 | dnl the GNU General Public License or the GNU Library General Public 10 | dnl License but which still want to provide support for the GNU gettext 11 | dnl functionality. 12 | dnl Please note that the actual code of the GNU gettext library is covered 13 | dnl by the GNU Library General Public License, and the rest of the GNU 14 | dnl gettext package package is covered by the GNU General Public License. 15 | dnl They are *not* in the public domain. 16 | 17 | dnl Authors: 18 | dnl Ulrich Drepper , 1995. 19 | 20 | # Check whether LC_MESSAGES is available in . 21 | 22 | AC_DEFUN([gt_LC_MESSAGES], 23 | [ 24 | AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], 25 | [AC_LINK_IFELSE( 26 | [AC_LANG_PROGRAM( 27 | [[#include ]], 28 | [[return LC_MESSAGES]])], 29 | [gt_cv_val_LC_MESSAGES=yes], 30 | [gt_cv_val_LC_MESSAGES=no])]) 31 | if test $gt_cv_val_LC_MESSAGES = yes; then 32 | AC_DEFINE([HAVE_LC_MESSAGES], [1], 33 | [Define if your file defines LC_MESSAGES.]) 34 | fi 35 | ]) 36 | -------------------------------------------------------------------------------- /m4/lib-ld.m4: -------------------------------------------------------------------------------- 1 | # lib-ld.m4 serial 6 2 | dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Subroutines of libtool.m4, 8 | dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid 9 | dnl collision with libtool.m4. 10 | 11 | dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. 12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], 13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], 14 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. 15 | case `$LD -v 2>&1 /dev/null 2>&1 \ 45 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 46 | || PATH_SEPARATOR=';' 47 | } 48 | fi 49 | 50 | ac_prog=ld 51 | if test "$GCC" = yes; then 52 | # Check if gcc -print-prog-name=ld gives a path. 53 | AC_MSG_CHECKING([for ld used by $CC]) 54 | case $host in 55 | *-*-mingw*) 56 | # gcc leaves a trailing carriage return which upsets mingw 57 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 58 | *) 59 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 60 | esac 61 | case $ac_prog in 62 | # Accept absolute paths. 63 | [[\\/]]* | ?:[[\\/]]*) 64 | re_direlt='/[[^/]][[^/]]*/\.\./' 65 | # Canonicalize the pathname of ld 66 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` 67 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do 68 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 69 | done 70 | test -z "$LD" && LD="$ac_prog" 71 | ;; 72 | "") 73 | # If it fails, then pretend we aren't using GCC. 74 | ac_prog=ld 75 | ;; 76 | *) 77 | # If it is relative, then search for the first ld in PATH. 78 | with_gnu_ld=unknown 79 | ;; 80 | esac 81 | elif test "$with_gnu_ld" = yes; then 82 | AC_MSG_CHECKING([for GNU ld]) 83 | else 84 | AC_MSG_CHECKING([for non-GNU ld]) 85 | fi 86 | AC_CACHE_VAL([acl_cv_path_LD], 87 | [if test -z "$LD"; then 88 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 89 | for ac_dir in $PATH; do 90 | IFS="$acl_save_ifs" 91 | test -z "$ac_dir" && ac_dir=. 92 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 93 | acl_cv_path_LD="$ac_dir/$ac_prog" 94 | # Check to see if the program is GNU ld. I'd rather use --version, 95 | # but apparently some variants of GNU ld only accept -v. 96 | # Break only if it was the GNU/non-GNU ld that we prefer. 97 | case `"$acl_cv_path_LD" -v 2>&1 Solaris 64-bit Developer's Guide > The Development Environment 182 | dnl . 183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." 184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the 185 | dnl symlink is missing, so we set acl_libdirstem2 too. 186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], 187 | [AC_EGREP_CPP([sixtyfour bits], [ 188 | #ifdef _LP64 189 | sixtyfour bits 190 | #endif 191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) 192 | ]) 193 | if test $gl_cv_solaris_64bit = yes; then 194 | acl_libdirstem=lib/64 195 | case "$host_cpu" in 196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; 197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; 198 | esac 199 | fi 200 | ;; 201 | *) 202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 203 | if test -n "$searchpath"; then 204 | acl_save_IFS="${IFS= }"; IFS=":" 205 | for searchdir in $searchpath; do 206 | if test -d "$searchdir"; then 207 | case "$searchdir" in 208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 209 | */../ | */.. ) 210 | # Better ignore directories of this form. They are misleading. 211 | ;; 212 | *) searchdir=`cd "$searchdir" && pwd` 213 | case "$searchdir" in 214 | */lib64 ) acl_libdirstem=lib64 ;; 215 | esac ;; 216 | esac 217 | fi 218 | done 219 | IFS="$acl_save_IFS" 220 | fi 221 | ;; 222 | esac 223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" 224 | ]) 225 | -------------------------------------------------------------------------------- /m4/lock.m4: -------------------------------------------------------------------------------- 1 | # lock.m4 serial 13 (gettext-0.18.2) 2 | dnl Copyright (C) 2005-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_DEFUN([gl_LOCK], 10 | [ 11 | AC_REQUIRE([gl_THREADLIB]) 12 | if test "$gl_threads_api" = posix; then 13 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the 14 | # pthread_rwlock_* functions. 15 | AC_CHECK_TYPE([pthread_rwlock_t], 16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], 17 | [Define if the POSIX multithreading library has read/write locks.])], 18 | [], 19 | [#include ]) 20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. 21 | AC_COMPILE_IFELSE([ 22 | AC_LANG_PROGRAM( 23 | [[#include ]], 24 | [[ 25 | #if __FreeBSD__ == 4 26 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." 27 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ 28 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) 29 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." 30 | #else 31 | int x = (int)PTHREAD_MUTEX_RECURSIVE; 32 | return !x; 33 | #endif 34 | ]])], 35 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], 36 | [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) 37 | fi 38 | gl_PREREQ_LOCK 39 | ]) 40 | 41 | # Prerequisites of lib/glthread/lock.c. 42 | AC_DEFUN([gl_PREREQ_LOCK], [:]) 43 | -------------------------------------------------------------------------------- /m4/longlong.m4: -------------------------------------------------------------------------------- 1 | # longlong.m4 serial 17 2 | dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | # Define HAVE_LONG_LONG_INT if 'long long int' works. 10 | # This fixes a bug in Autoconf 2.61, and can be faster 11 | # than what's in Autoconf 2.62 through 2.68. 12 | 13 | # Note: If the type 'long long int' exists but is only 32 bits large 14 | # (as on some very old compilers), HAVE_LONG_LONG_INT will not be 15 | # defined. In this case you can treat 'long long int' like 'long int'. 16 | 17 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], 18 | [ 19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) 20 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], 21 | [ac_cv_type_long_long_int=yes 22 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then 23 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int 24 | if test $ac_cv_type_long_long_int = yes; then 25 | dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. 26 | dnl If cross compiling, assume the bug is not important, since 27 | dnl nobody cross compiles for this platform as far as we know. 28 | AC_RUN_IFELSE( 29 | [AC_LANG_PROGRAM( 30 | [[@%:@include 31 | @%:@ifndef LLONG_MAX 32 | @%:@ define HALF \ 33 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) 34 | @%:@ define LLONG_MAX (HALF - 1 + HALF) 35 | @%:@endif]], 36 | [[long long int n = 1; 37 | int i; 38 | for (i = 0; ; i++) 39 | { 40 | long long int m = n << i; 41 | if (m >> i != n) 42 | return 1; 43 | if (LLONG_MAX / 2 < m) 44 | break; 45 | } 46 | return 0;]])], 47 | [], 48 | [ac_cv_type_long_long_int=no], 49 | [:]) 50 | fi 51 | fi]) 52 | if test $ac_cv_type_long_long_int = yes; then 53 | AC_DEFINE([HAVE_LONG_LONG_INT], [1], 54 | [Define to 1 if the system has the type 'long long int'.]) 55 | fi 56 | ]) 57 | 58 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. 59 | # This fixes a bug in Autoconf 2.61, and can be faster 60 | # than what's in Autoconf 2.62 through 2.68. 61 | 62 | # Note: If the type 'unsigned long long int' exists but is only 32 bits 63 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT 64 | # will not be defined. In this case you can treat 'unsigned long long int' 65 | # like 'unsigned long int'. 66 | 67 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], 68 | [ 69 | AC_CACHE_CHECK([for unsigned long long int], 70 | [ac_cv_type_unsigned_long_long_int], 71 | [ac_cv_type_unsigned_long_long_int=yes 72 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then 73 | AC_LINK_IFELSE( 74 | [_AC_TYPE_LONG_LONG_SNIPPET], 75 | [], 76 | [ac_cv_type_unsigned_long_long_int=no]) 77 | fi]) 78 | if test $ac_cv_type_unsigned_long_long_int = yes; then 79 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], 80 | [Define to 1 if the system has the type 'unsigned long long int'.]) 81 | fi 82 | ]) 83 | 84 | # Expands to a C program that can be used to test for simultaneous support 85 | # of 'long long' and 'unsigned long long'. We don't want to say that 86 | # 'long long' is available if 'unsigned long long' is not, or vice versa, 87 | # because too many programs rely on the symmetry between signed and unsigned 88 | # integer types (excluding 'bool'). 89 | AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], 90 | [ 91 | AC_LANG_PROGRAM( 92 | [[/* For now, do not test the preprocessor; as of 2007 there are too many 93 | implementations with broken preprocessors. Perhaps this can 94 | be revisited in 2012. In the meantime, code should not expect 95 | #if to work with literals wider than 32 bits. */ 96 | /* Test literals. */ 97 | long long int ll = 9223372036854775807ll; 98 | long long int nll = -9223372036854775807LL; 99 | unsigned long long int ull = 18446744073709551615ULL; 100 | /* Test constant expressions. */ 101 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) 102 | ? 1 : -1)]; 103 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 104 | ? 1 : -1)]; 105 | int i = 63;]], 106 | [[/* Test availability of runtime routines for shift and division. */ 107 | long long int llmax = 9223372036854775807ll; 108 | unsigned long long int ullmax = 18446744073709551615ull; 109 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) 110 | | (llmax / ll) | (llmax % ll) 111 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) 112 | | (ullmax / ull) | (ullmax % ull));]]) 113 | ]) 114 | -------------------------------------------------------------------------------- /m4/ltsugar.m4: -------------------------------------------------------------------------------- 1 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 2 | # 3 | # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 4 | # Foundation, Inc. 5 | # Written by Gary V. Vaughan, 2004 6 | # 7 | # This file is free software; the Free Software Foundation gives 8 | # unlimited permission to copy and/or distribute it, with or without 9 | # modifications, as long as this notice is preserved. 10 | 11 | # serial 6 ltsugar.m4 12 | 13 | # This is to help aclocal find these macros, as it can't see m4_define. 14 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 15 | 16 | 17 | # lt_join(SEP, ARG1, [ARG2...]) 18 | # ----------------------------- 19 | # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 20 | # associated separator. 21 | # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 22 | # versions in m4sugar had bugs. 23 | m4_define([lt_join], 24 | [m4_if([$#], [1], [], 25 | [$#], [2], [[$2]], 26 | [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 27 | m4_define([_lt_join], 28 | [m4_if([$#$2], [2], [], 29 | [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 30 | 31 | 32 | # lt_car(LIST) 33 | # lt_cdr(LIST) 34 | # ------------ 35 | # Manipulate m4 lists. 36 | # These macros are necessary as long as will still need to support 37 | # Autoconf-2.59, which quotes differently. 38 | m4_define([lt_car], [[$1]]) 39 | m4_define([lt_cdr], 40 | [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 41 | [$#], 1, [], 42 | [m4_dquote(m4_shift($@))])]) 43 | m4_define([lt_unquote], $1) 44 | 45 | 46 | # lt_append(MACRO-NAME, STRING, [SEPARATOR]) 47 | # ------------------------------------------ 48 | # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 49 | # Note that neither SEPARATOR nor STRING are expanded; they are appended 50 | # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 51 | # No SEPARATOR is output if MACRO-NAME was previously undefined (different 52 | # than defined and empty). 53 | # 54 | # This macro is needed until we can rely on Autoconf 2.62, since earlier 55 | # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 56 | m4_define([lt_append], 57 | [m4_define([$1], 58 | m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 59 | 60 | 61 | 62 | # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 63 | # ---------------------------------------------------------- 64 | # Produce a SEP delimited list of all paired combinations of elements of 65 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 66 | # has the form PREFIXmINFIXSUFFIXn. 67 | # Needed until we can rely on m4_combine added in Autoconf 2.62. 68 | m4_define([lt_combine], 69 | [m4_if(m4_eval([$# > 3]), [1], 70 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 71 | [[m4_foreach([_Lt_prefix], [$2], 72 | [m4_foreach([_Lt_suffix], 73 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 74 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 75 | 76 | 77 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 78 | # ----------------------------------------------------------------------- 79 | # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 80 | # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 81 | m4_define([lt_if_append_uniq], 82 | [m4_ifdef([$1], 83 | [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84 | [lt_append([$1], [$2], [$3])$4], 85 | [$5])], 86 | [lt_append([$1], [$2], [$3])$4])]) 87 | 88 | 89 | # lt_dict_add(DICT, KEY, VALUE) 90 | # ----------------------------- 91 | m4_define([lt_dict_add], 92 | [m4_define([$1($2)], [$3])]) 93 | 94 | 95 | # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 96 | # -------------------------------------------- 97 | m4_define([lt_dict_add_subkey], 98 | [m4_define([$1($2:$3)], [$4])]) 99 | 100 | 101 | # lt_dict_fetch(DICT, KEY, [SUBKEY]) 102 | # ---------------------------------- 103 | m4_define([lt_dict_fetch], 104 | [m4_ifval([$3], 105 | m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 106 | m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 107 | 108 | 109 | # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 110 | # ----------------------------------------------------------------- 111 | m4_define([lt_if_dict_fetch], 112 | [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 113 | [$5], 114 | [$6])]) 115 | 116 | 117 | # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 118 | # -------------------------------------------------------------- 119 | m4_define([lt_dict_filter], 120 | [m4_if([$5], [], [], 121 | [lt_join(m4_quote(m4_default([$4], [[, ]])), 122 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 123 | [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 124 | ]) 125 | -------------------------------------------------------------------------------- /m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/lt~obsolete.m4: -------------------------------------------------------------------------------- 1 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 2 | # 3 | # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 4 | # Foundation, Inc. 5 | # Written by Scott James Remnant, 2004. 6 | # 7 | # This file is free software; the Free Software Foundation gives 8 | # unlimited permission to copy and/or distribute it, with or without 9 | # modifications, as long as this notice is preserved. 10 | 11 | # serial 5 lt~obsolete.m4 12 | 13 | # These exist entirely to fool aclocal when bootstrapping libtool. 14 | # 15 | # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 16 | # which have later been changed to m4_define as they aren't part of the 17 | # exported API, or moved to Autoconf or Automake where they belong. 18 | # 19 | # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 20 | # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 21 | # using a macro with the same name in our local m4/libtool.m4 it'll 22 | # pull the old libtool.m4 in (it doesn't see our shiny new m4_define 23 | # and doesn't know about Autoconf macros at all.) 24 | # 25 | # So we provide this file, which has a silly filename so it's always 26 | # included after everything else. This provides aclocal with the 27 | # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 28 | # because those macros already exist, or will be overwritten later. 29 | # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 30 | # 31 | # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 32 | # Yes, that means every name once taken will need to remain here until 33 | # we give up compatibility with versions before 1.7, at which point 34 | # we need to keep only those names which we still refer to. 35 | 36 | # This is to help aclocal find these macros, as it can't see m4_define. 37 | AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 38 | 39 | m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 40 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 41 | m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 42 | m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 43 | m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 44 | m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 45 | m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 46 | m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 47 | m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 48 | m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 49 | m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 50 | m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 51 | m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 52 | m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 53 | m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 54 | m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 55 | m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 56 | m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 57 | m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 58 | m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 59 | m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 60 | m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 61 | m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 62 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 63 | m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 64 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 65 | m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 66 | m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 67 | m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 68 | m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 69 | m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 70 | m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 71 | m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 72 | m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 73 | m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 74 | m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 75 | m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 76 | m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 77 | m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 78 | m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 79 | m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 80 | m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 81 | m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 82 | m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 83 | m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 84 | m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 85 | m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 86 | m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 87 | m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 88 | m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 89 | m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90 | m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 91 | m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 92 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 93 | m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 94 | m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 95 | m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 96 | m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97 | m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 98 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 99 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 100 | -------------------------------------------------------------------------------- /m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 5 (gettext-0.18) 2 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl 8 | dnl This file can can be used in projects which are not available under 9 | dnl the GNU General Public License or the GNU Library General Public 10 | dnl License but which still want to provide support for the GNU gettext 11 | dnl functionality. 12 | dnl Please note that the actual code of the GNU gettext library is covered 13 | dnl by the GNU Library General Public License, and the rest of the GNU 14 | dnl gettext package package is covered by the GNU General Public License. 15 | dnl They are *not* in the public domain. 16 | 17 | dnl Authors: 18 | dnl Ulrich Drepper , 1995-2000. 19 | dnl Bruno Haible , 2000-2003. 20 | 21 | AC_PREREQ([2.50]) 22 | 23 | AC_DEFUN([AM_NLS], 24 | [ 25 | AC_MSG_CHECKING([whether NLS is requested]) 26 | dnl Default is enabled NLS 27 | AC_ARG_ENABLE([nls], 28 | [ --disable-nls do not use Native Language Support], 29 | USE_NLS=$enableval, USE_NLS=yes) 30 | AC_MSG_RESULT([$USE_NLS]) 31 | AC_SUBST([USE_NLS]) 32 | ]) 33 | -------------------------------------------------------------------------------- /m4/pkg.m4: -------------------------------------------------------------------------------- 1 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2 | # serial 1 (pkg-config-0.24) 3 | # 4 | # Copyright © 2004 Scott James Remnant . 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | # 20 | # As a special exception to the GNU General Public License, if you 21 | # distribute this file as part of a program that contains a 22 | # configuration script generated by Autoconf, you may include it under 23 | # the same distribution terms that you use for the rest of that program. 24 | 25 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 26 | # ---------------------------------- 27 | AC_DEFUN([PKG_PROG_PKG_CONFIG], 28 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 29 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 30 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 31 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 32 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 33 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 34 | 35 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 36 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 37 | fi 38 | if test -n "$PKG_CONFIG"; then 39 | _pkg_min_version=m4_default([$1], [0.9.0]) 40 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 41 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 42 | AC_MSG_RESULT([yes]) 43 | else 44 | AC_MSG_RESULT([no]) 45 | PKG_CONFIG="" 46 | fi 47 | fi[]dnl 48 | ])# PKG_PROG_PKG_CONFIG 49 | 50 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 51 | # 52 | # Check to see whether a particular set of modules exists. Similar 53 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. 54 | # 55 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 56 | # only at the first occurence in configure.ac, so if the first place 57 | # it's called might be skipped (such as if it is within an "if", you 58 | # have to call PKG_CHECK_EXISTS manually 59 | # -------------------------------------------------------------- 60 | AC_DEFUN([PKG_CHECK_EXISTS], 61 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 62 | if test -n "$PKG_CONFIG" && \ 63 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 64 | m4_default([$2], [:]) 65 | m4_ifvaln([$3], [else 66 | $3])dnl 67 | fi]) 68 | 69 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 70 | # --------------------------------------------- 71 | m4_define([_PKG_CONFIG], 72 | [if test -n "$$1"; then 73 | pkg_cv_[]$1="$$1" 74 | elif test -n "$PKG_CONFIG"; then 75 | PKG_CHECK_EXISTS([$3], 76 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 77 | test "x$?" != "x0" && pkg_failed=yes ], 78 | [pkg_failed=yes]) 79 | else 80 | pkg_failed=untried 81 | fi[]dnl 82 | ])# _PKG_CONFIG 83 | 84 | # _PKG_SHORT_ERRORS_SUPPORTED 85 | # ----------------------------- 86 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 87 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 88 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 89 | _pkg_short_errors_supported=yes 90 | else 91 | _pkg_short_errors_supported=no 92 | fi[]dnl 93 | ])# _PKG_SHORT_ERRORS_SUPPORTED 94 | 95 | 96 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 97 | # [ACTION-IF-NOT-FOUND]) 98 | # 99 | # 100 | # Note that if there is a possibility the first call to 101 | # PKG_CHECK_MODULES might not happen, you should be sure to include an 102 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 103 | # 104 | # 105 | # -------------------------------------------------------------- 106 | AC_DEFUN([PKG_CHECK_MODULES], 107 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 108 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 109 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 110 | 111 | pkg_failed=no 112 | AC_MSG_CHECKING([for $1]) 113 | 114 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 115 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) 116 | 117 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 118 | and $1[]_LIBS to avoid the need to call pkg-config. 119 | See the pkg-config man page for more details.]) 120 | 121 | if test $pkg_failed = yes; then 122 | AC_MSG_RESULT([no]) 123 | _PKG_SHORT_ERRORS_SUPPORTED 124 | if test $_pkg_short_errors_supported = yes; then 125 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 126 | else 127 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 128 | fi 129 | # Put the nasty error message in config.log where it belongs 130 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 131 | 132 | m4_default([$4], [AC_MSG_ERROR( 133 | [Package requirements ($2) were not met: 134 | 135 | $$1_PKG_ERRORS 136 | 137 | Consider adjusting the PKG_CONFIG_PATH environment variable if you 138 | installed software in a non-standard prefix. 139 | 140 | _PKG_TEXT])[]dnl 141 | ]) 142 | elif test $pkg_failed = untried; then 143 | AC_MSG_RESULT([no]) 144 | m4_default([$4], [AC_MSG_FAILURE( 145 | [The pkg-config script could not be found or is too old. Make sure it 146 | is in your PATH or set the PKG_CONFIG environment variable to the full 147 | path to pkg-config. 148 | 149 | _PKG_TEXT 150 | 151 | To get pkg-config, see .])[]dnl 152 | ]) 153 | else 154 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 155 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 156 | AC_MSG_RESULT([yes]) 157 | $3 158 | fi[]dnl 159 | ])# PKG_CHECK_MODULES 160 | 161 | 162 | # PKG_INSTALLDIR(DIRECTORY) 163 | # ------------------------- 164 | # Substitutes the variable pkgconfigdir as the location where a module 165 | # should install pkg-config .pc files. By default the directory is 166 | # $libdir/pkgconfig, but the default can be changed by passing 167 | # DIRECTORY. The user can override through the --with-pkgconfigdir 168 | # parameter. 169 | AC_DEFUN([PKG_INSTALLDIR], 170 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 171 | m4_pushdef([pkg_description], 172 | [pkg-config installation directory @<:@]pkg_default[@:>@]) 173 | AC_ARG_WITH([pkgconfigdir], 174 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 175 | [with_pkgconfigdir=]pkg_default) 176 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 177 | m4_popdef([pkg_default]) 178 | m4_popdef([pkg_description]) 179 | ]) dnl PKG_INSTALLDIR 180 | 181 | 182 | # PKG_NOARCH_INSTALLDIR(DIRECTORY) 183 | # ------------------------- 184 | # Substitutes the variable noarch_pkgconfigdir as the location where a 185 | # module should install arch-independent pkg-config .pc files. By 186 | # default the directory is $datadir/pkgconfig, but the default can be 187 | # changed by passing DIRECTORY. The user can override through the 188 | # --with-noarch-pkgconfigdir parameter. 189 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], 190 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 191 | m4_pushdef([pkg_description], 192 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 193 | AC_ARG_WITH([noarch-pkgconfigdir], 194 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 195 | [with_noarch_pkgconfigdir=]pkg_default) 196 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 197 | m4_popdef([pkg_default]) 198 | m4_popdef([pkg_description]) 199 | ]) dnl PKG_NOARCH_INSTALLDIR 200 | 201 | 202 | # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 203 | # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 204 | # ------------------------------------------- 205 | # Retrieves the value of the pkg-config variable for the given module. 206 | AC_DEFUN([PKG_CHECK_VAR], 207 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 208 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 209 | 210 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) 211 | AS_VAR_COPY([$1], [pkg_cv_][$1]) 212 | 213 | AS_VAR_IF([$1], [""], [$5], [$4])dnl 214 | ])# PKG_CHECK_VAR 215 | -------------------------------------------------------------------------------- /m4/printf-posix.m4: -------------------------------------------------------------------------------- 1 | # printf-posix.m4 serial 6 (gettext-0.18.2) 2 | dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether the printf() function supports POSIX/XSI format strings with 9 | dnl positions. 10 | 11 | AC_DEFUN([gt_PRINTF_POSIX], 12 | [ 13 | AC_REQUIRE([AC_PROG_CC]) 14 | AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], 15 | gt_cv_func_printf_posix, 16 | [ 17 | AC_RUN_IFELSE( 18 | [AC_LANG_SOURCE([[ 19 | #include 20 | #include 21 | /* The string "%2$d %1$d", with dollar characters protected from the shell's 22 | dollar expansion (possibly an autoconf bug). */ 23 | static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 24 | static char buf[100]; 25 | int main () 26 | { 27 | sprintf (buf, format, 33, 55); 28 | return (strcmp (buf, "55 33") != 0); 29 | }]])], 30 | [gt_cv_func_printf_posix=yes], 31 | [gt_cv_func_printf_posix=no], 32 | [ 33 | AC_EGREP_CPP([notposix], [ 34 | #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 35 | notposix 36 | #endif 37 | ], 38 | [gt_cv_func_printf_posix="guessing no"], 39 | [gt_cv_func_printf_posix="guessing yes"]) 40 | ]) 41 | ]) 42 | case $gt_cv_func_printf_posix in 43 | *yes) 44 | AC_DEFINE([HAVE_POSIX_PRINTF], [1], 45 | [Define if your printf() function supports format strings with positions.]) 46 | ;; 47 | esac 48 | ]) 49 | -------------------------------------------------------------------------------- /m4/progtest.m4: -------------------------------------------------------------------------------- 1 | # progtest.m4 serial 7 (gettext-0.18.2) 2 | dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Authors: 17 | dnl Ulrich Drepper , 1996. 18 | 19 | AC_PREREQ([2.50]) 20 | 21 | # Search path for a program which passes the given test. 22 | 23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], 26 | [ 27 | # Prepare PATH_SEPARATOR. 28 | # The user is always right. 29 | if test "${PATH_SEPARATOR+set}" != set; then 30 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 31 | # contains only /bin. Note that ksh looks also at the FPATH variable, 32 | # so we have to set that as well for the test. 33 | PATH_SEPARATOR=: 34 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 35 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 36 | || PATH_SEPARATOR=';' 37 | } 38 | fi 39 | 40 | # Find out how to test for executable files. Don't use a zero-byte file, 41 | # as systems may use methods other than mode bits to determine executability. 42 | cat >conf$$.file <<_ASEOF 43 | #! /bin/sh 44 | exit 0 45 | _ASEOF 46 | chmod +x conf$$.file 47 | if test -x conf$$.file >/dev/null 2>&1; then 48 | ac_executable_p="test -x" 49 | else 50 | ac_executable_p="test -f" 51 | fi 52 | rm -f conf$$.file 53 | 54 | # Extract the first word of "$2", so it can be a program name with args. 55 | set dummy $2; ac_word=[$]2 56 | AC_MSG_CHECKING([for $ac_word]) 57 | AC_CACHE_VAL([ac_cv_path_$1], 58 | [case "[$]$1" in 59 | [[\\/]]* | ?:[[\\/]]*) 60 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 61 | ;; 62 | *) 63 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 64 | for ac_dir in ifelse([$5], , $PATH, [$5]); do 65 | IFS="$ac_save_IFS" 66 | test -z "$ac_dir" && ac_dir=. 67 | for ac_exec_ext in '' $ac_executable_extensions; do 68 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 69 | echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD 70 | if [$3]; then 71 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 72 | break 2 73 | fi 74 | fi 75 | done 76 | done 77 | IFS="$ac_save_IFS" 78 | dnl If no 4th arg is given, leave the cache variable unset, 79 | dnl so AC_PATH_PROGS will keep looking. 80 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 81 | ])dnl 82 | ;; 83 | esac])dnl 84 | $1="$ac_cv_path_$1" 85 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 86 | AC_MSG_RESULT([$][$1]) 87 | else 88 | AC_MSG_RESULT([no]) 89 | fi 90 | AC_SUBST([$1])dnl 91 | ]) 92 | -------------------------------------------------------------------------------- /m4/size_max.m4: -------------------------------------------------------------------------------- 1 | # size_max.m4 serial 10 2 | dnl Copyright (C) 2003, 2005-2006, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | AC_DEFUN([gl_SIZE_MAX], 10 | [ 11 | AC_CHECK_HEADERS([stdint.h]) 12 | dnl First test whether the system already has SIZE_MAX. 13 | AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ 14 | gl_cv_size_max= 15 | AC_EGREP_CPP([Found it], [ 16 | #include 17 | #if HAVE_STDINT_H 18 | #include 19 | #endif 20 | #ifdef SIZE_MAX 21 | Found it 22 | #endif 23 | ], [gl_cv_size_max=yes]) 24 | if test -z "$gl_cv_size_max"; then 25 | dnl Define it ourselves. Here we assume that the type 'size_t' is not wider 26 | dnl than the type 'unsigned long'. Try hard to find a definition that can 27 | dnl be used in a preprocessor #if, i.e. doesn't contain a cast. 28 | AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], 29 | [#include 30 | #include ], [size_t_bits_minus_1=]) 31 | AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], 32 | [#include ], [fits_in_uint=]) 33 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then 34 | if test $fits_in_uint = 1; then 35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type 36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. 37 | AC_COMPILE_IFELSE( 38 | [AC_LANG_PROGRAM( 39 | [[#include 40 | extern size_t foo; 41 | extern unsigned long foo; 42 | ]], 43 | [[]])], 44 | [fits_in_uint=0]) 45 | fi 46 | dnl We cannot use 'expr' to simplify this expression, because 'expr' 47 | dnl works only with 'long' integers in the host environment, while we 48 | dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. 49 | if test $fits_in_uint = 1; then 50 | gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" 51 | else 52 | gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" 53 | fi 54 | else 55 | dnl Shouldn't happen, but who knows... 56 | gl_cv_size_max='((size_t)~(size_t)0)' 57 | fi 58 | fi 59 | ]) 60 | if test "$gl_cv_size_max" != yes; then 61 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], 62 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) 63 | fi 64 | dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after 65 | dnl . Remember that the #undef in AH_VERBATIM gets replaced with 66 | dnl #define by AC_DEFINE_UNQUOTED. 67 | AH_VERBATIM([SIZE_MAX], 68 | [/* Define as the maximum value of type 'size_t', if the system doesn't define 69 | it. */ 70 | #ifndef SIZE_MAX 71 | # undef SIZE_MAX 72 | #endif]) 73 | ]) 74 | 75 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. 76 | dnl Remove this when we can assume autoconf >= 2.61. 77 | m4_ifdef([AC_COMPUTE_INT], [], [ 78 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) 79 | ]) 80 | -------------------------------------------------------------------------------- /m4/stdint_h.m4: -------------------------------------------------------------------------------- 1 | # stdint_h.m4 serial 9 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | # Define HAVE_STDINT_H_WITH_UINTMAX if exists, 10 | # doesn't clash with , and declares uintmax_t. 11 | 12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], 13 | [ 14 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[#include 18 | #include ]], 19 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 20 | [gl_cv_header_stdint_h=yes], 21 | [gl_cv_header_stdint_h=no])]) 22 | if test $gl_cv_header_stdint_h = yes; then 23 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], 24 | [Define if exists, doesn't clash with , 25 | and declares uintmax_t. ]) 26 | fi 27 | ]) 28 | -------------------------------------------------------------------------------- /m4/uintmax_t.m4: -------------------------------------------------------------------------------- 1 | # uintmax_t.m4 serial 12 2 | dnl Copyright (C) 1997-2004, 2007-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | AC_PREREQ([2.13]) 10 | 11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' 12 | # if it is not already defined in or . 13 | 14 | AC_DEFUN([gl_AC_TYPE_UINTMAX_T], 15 | [ 16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then 19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) 20 | test $ac_cv_type_unsigned_long_long_int = yes \ 21 | && ac_type='unsigned long long' \ 22 | || ac_type='unsigned long' 23 | AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], 24 | [Define to unsigned long or unsigned long long 25 | if and don't define.]) 26 | else 27 | AC_DEFINE([HAVE_UINTMAX_T], [1], 28 | [Define if you have the 'uintmax_t' type in or .]) 29 | fi 30 | ]) 31 | -------------------------------------------------------------------------------- /m4/vala.m4: -------------------------------------------------------------------------------- 1 | dnl vala.m4 2 | dnl 3 | dnl Copyright 2010 Marc-Andre Lureau 4 | dnl Copyright 2011 Rodney Dawes 5 | dnl 6 | dnl This library is free software; you can redistribute it and/or 7 | dnl modify it under the terms of the GNU Lesser General Public 8 | dnl License as published by the Free Software Foundation; either 9 | dnl version 2.1 of the License, or (at your option) any later version. 10 | dnl 11 | dnl This library is distributed in the hope that it will be useful, 12 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | dnl Lesser General Public License for more details. 15 | dnl 16 | dnl You should have received a copy of the GNU Lesser General Public 17 | dnl License along with this library; if not, write to the Free Software 18 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | # _VALA_CHECK_COMPILE_WITH_ARGS(ARGS, [ACTION-IF-TRUE], 21 | # [ACTION-IF-FALSE]) 22 | # -------------------------------------- 23 | # Check that Vala compile with ARGS. 24 | # 25 | AC_DEFUN([_VALA_CHECK_COMPILE_WITH_ARGS], 26 | [AC_REQUIRE([AM_PROG_VALAC])[]dnl 27 | 28 | cat <<_ACEOF >conftest.vala 29 | void main(){} 30 | _ACEOF 31 | 32 | AS_IF([vala_error=`$VALAC $1 -q --cc="${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" -o conftest$ac_exeext conftest.vala 2>&1`], 33 | [$2], [$3]) 34 | ]) 35 | 36 | ])# _VALA_CHECK_COMPILE_WITH_ARGS 37 | 38 | # VALA_CHECK_PACKAGES(PKGS, [ACTION-IF-FOUND], 39 | # [ACTION-IF-NOT-FOUND]) 40 | # -------------------------------------- 41 | # Check that PKGS Vala bindings are installed and usable. 42 | # 43 | AC_DEFUN([VALA_CHECK_PACKAGES], 44 | [ 45 | unset vala_pkgs 46 | unset vala_bindings 47 | ac_save_ifs="$IFS"; unset IFS 48 | for vala_pkg in $(echo "$1"); do 49 | vala_pkgs="${vala_pkgs:+$vala_pkgs }--pkg $vala_pkg" 50 | vala_bindings="${vala_bindings:+$vala_bindings }$vala_pkg" 51 | done 52 | IFS="$ac_save_ifs" 53 | AC_MSG_CHECKING([for $vala_bindings vala bindings]) 54 | _VALA_CHECK_COMPILE_WITH_ARGS([$vala_pkgs], 55 | [vala_pkg_exists=yes], 56 | [vala_pkg_exists=no]) 57 | 58 | AS_IF([test x${vala_pkg_exists} = xno],[ 59 | ifelse([$3], , [AC_MSG_ERROR([]dnl 60 | [Package requirements were not met: $1 61 | 62 | $vala_error 63 | 64 | Consider adjusting the XDG_DATA_DIRS environment variable if you 65 | installed bindings in a non-standard prefix. 66 | ])], 67 | [AC_MSG_RESULT([no]) 68 | $3])],[ 69 | AC_MSG_RESULT([yes]) 70 | ifelse([$2], , :, [$2])[]dnl 71 | ]) 72 | 73 | ])# VALA_CHECK_PACKAGES 74 | 75 | 76 | # Check for Vala bindings for a package, as well as the pkg-config 77 | # CFLAGS and LIBS for the package. The arguments here work the 78 | # same as those for PKG_CHECK_MODULES, which is called internally. 79 | # As a result, the _CFLAGS, _LIBS, and _VALAFLAGS variables will 80 | # all be declared, rather than only _VALAFLAGS. 81 | # 82 | # VALA_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 83 | # [ACTION-IF-NOT-FOUND]) 84 | # -------------------------------------------------------------- 85 | AC_DEFUN([VALA_CHECK_MODULES], 86 | [ 87 | AC_REQUIRE([AM_PROG_VALAC])dnl 88 | AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 89 | AC_REQUIRE([_VALA_CHECK_COMPILE_WITH_ARGS])dnl 90 | AC_ARG_VAR([$1][_VALAFLAGS], [Vala compiler flags for $1])dnl 91 | 92 | VALA_MODULES="`echo $2 | sed -e 's/ [[=<>]]\+ [[0-9.]]\+//g'`" 93 | for MODULE in $VALA_MODULES; do 94 | $1[]_VALAFLAGS="$[]$1[]_VALAFLAGS --pkg $MODULE" 95 | done 96 | 97 | PKG_CHECK_MODULES([$1], [$2], [$3], [$4]) 98 | 99 | pkg_failed=no 100 | AC_MSG_CHECKING([for $1 vala modules]) 101 | 102 | _VALA_CHECK_COMPILE_WITH_ARGS([$1][_VALAFLAGS], 103 | [pkg_failed=yes], 104 | [pkg_failed=no]) 105 | 106 | if test $pkg_failed = yes; then 107 | AC_MSG_RESULT([no]) 108 | m4_default([$4], [AC_MSG_ERROR( 109 | [Package requirements ($2) were not met.])dnl 110 | ]) 111 | else 112 | AC_MSG_RESULT([yes]) 113 | m4_default([$3], [:]) 114 | fi[]dnl 115 | ]) 116 | 117 | # Check whether the Vala API Generator exists in `PATH'. If it is found, 118 | # the variable VAPIGEN is set. Optionally a minimum release number of the 119 | # generator can be requested. 120 | # 121 | # VALA_PROG_VAPIGEN([MINIMUM-VERSION]) 122 | # ------------------------------------ 123 | AC_DEFUN([VALA_PROG_VAPIGEN], 124 | [AC_PATH_PROG([VAPIGEN], [vapigen], []) 125 | AS_IF([test -z "$VAPIGEN"], 126 | [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])], 127 | [AS_IF([test -n "$1"], 128 | [AC_MSG_CHECKING([$VAPIGEN is at least version $1]) 129 | am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator *//'` 130 | AS_VERSION_COMPARE([$1], ["$am__vapigen_version"], 131 | [AC_MSG_RESULT([yes])], 132 | [AC_MSG_RESULT([yes])], 133 | [AC_MSG_RESULT([no]) 134 | AC_MSG_ERROR([Vala API Generator $1 not found.])])])]) 135 | ]) 136 | -------------------------------------------------------------------------------- /m4/vapigen.m4: -------------------------------------------------------------------------------- 1 | dnl vapigen.m4 2 | dnl 3 | dnl Copyright 2012 Evan Nemerson 4 | dnl 5 | dnl This library is free software; you can redistribute it and/or 6 | dnl modify it under the terms of the GNU Lesser General Public 7 | dnl License as published by the Free Software Foundation; either 8 | dnl version 2.1 of the License, or (at your option) any later version. 9 | dnl 10 | dnl This library is distributed in the hope that it will be useful, 11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | dnl Lesser General Public License for more details. 14 | dnl 15 | dnl You should have received a copy of the GNU Lesser General Public 16 | dnl License along with this library; if not, write to the Free Software 17 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | # VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT]) 20 | # -------------------------------------- 21 | # Check vapigen existence and version 22 | # 23 | # See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation 24 | AC_DEFUN([VAPIGEN_CHECK], 25 | [ 26 | AS_IF([test "x$3" != "xyes"], [ 27 | m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [ 28 | m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [ 29 | AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]]) 30 | ]) 31 | ]) 32 | ]) 33 | 34 | AC_ARG_ENABLE([vala], 35 | [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[ 36 | AS_IF([test "x$4" = "x"], [ 37 | enable_vala=auto 38 | ], [ 39 | enable_vala=$4 40 | ]) 41 | ]) 42 | 43 | AS_CASE([$enable_vala], [no], [enable_vala=no], 44 | [yes], [ 45 | AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ 46 | AC_MSG_ERROR([Vala bindings require GObject Introspection]) 47 | ]) 48 | ], [auto], [ 49 | AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ 50 | enable_vala=no 51 | ]) 52 | ], [ 53 | AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@]) 54 | ]) 55 | 56 | AS_IF([test "x$2" = "x"], [ 57 | vapigen_pkg_name=vapigen 58 | ], [ 59 | vapigen_pkg_name=vapigen-$2 60 | ]) 61 | AS_IF([test "x$1" = "x"], [ 62 | vapigen_pkg="$vapigen_pkg_name" 63 | ], [ 64 | vapigen_pkg="$vapigen_pkg_name >= $1" 65 | ]) 66 | 67 | PKG_PROG_PKG_CONFIG 68 | 69 | PKG_CHECK_EXISTS([$vapigen_pkg], [ 70 | AS_IF([test "$enable_vala" = "auto"], [ 71 | enable_vala=yes 72 | ]) 73 | ], [ 74 | AS_CASE([$enable_vala], [yes], [ 75 | AC_MSG_ERROR([$vapigen_pkg not found]) 76 | ], [auto], [ 77 | enable_vala=no 78 | ]) 79 | ]) 80 | 81 | AC_MSG_CHECKING([for vapigen]) 82 | 83 | AS_CASE([$enable_vala], 84 | [yes], [ 85 | VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name` 86 | VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen 87 | AS_IF([test "x$2" = "x"], [ 88 | VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name` 89 | ], [ 90 | VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name` 91 | ]) 92 | ]) 93 | 94 | AC_MSG_RESULT([$enable_vala]) 95 | 96 | AC_SUBST([VAPIGEN]) 97 | AC_SUBST([VAPIGEN_VAPIDIR]) 98 | AC_SUBST([VAPIGEN_MAKEFILE]) 99 | 100 | AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes") 101 | ]) 102 | -------------------------------------------------------------------------------- /m4/visibility.m4: -------------------------------------------------------------------------------- 1 | # visibility.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2005, 2008, 2010-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | dnl Tests whether the compiler supports the command-line option 10 | dnl -fvisibility=hidden and the function and variable attributes 11 | dnl __attribute__((__visibility__("hidden"))) and 12 | dnl __attribute__((__visibility__("default"))). 13 | dnl Does *not* test for __visibility__("protected") - which has tricky 14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on 15 | dnl Mac OS X. 16 | dnl Does *not* test for __visibility__("internal") - which has processor 17 | dnl dependent semantics. 18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is 19 | dnl "really only recommended for legacy code". 20 | dnl Set the variable CFLAG_VISIBILITY. 21 | dnl Defines and sets the variable HAVE_VISIBILITY. 22 | 23 | AC_DEFUN([gl_VISIBILITY], 24 | [ 25 | AC_REQUIRE([AC_PROG_CC]) 26 | CFLAG_VISIBILITY= 27 | HAVE_VISIBILITY=0 28 | if test -n "$GCC"; then 29 | dnl First, check whether -Werror can be added to the command line, or 30 | dnl whether it leads to an error because of some other option that the 31 | dnl user has put into $CC $CFLAGS $CPPFLAGS. 32 | AC_MSG_CHECKING([whether the -Werror option is usable]) 33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ 34 | gl_save_CFLAGS="$CFLAGS" 35 | CFLAGS="$CFLAGS -Werror" 36 | AC_COMPILE_IFELSE( 37 | [AC_LANG_PROGRAM([[]], [[]])], 38 | [gl_cv_cc_vis_werror=yes], 39 | [gl_cv_cc_vis_werror=no]) 40 | CFLAGS="$gl_save_CFLAGS"]) 41 | AC_MSG_RESULT([$gl_cv_cc_vis_werror]) 42 | dnl Now check whether visibility declarations are supported. 43 | AC_MSG_CHECKING([for simple visibility declarations]) 44 | AC_CACHE_VAL([gl_cv_cc_visibility], [ 45 | gl_save_CFLAGS="$CFLAGS" 46 | CFLAGS="$CFLAGS -fvisibility=hidden" 47 | dnl We use the option -Werror and a function dummyfunc, because on some 48 | dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning 49 | dnl "visibility attribute not supported in this configuration; ignored" 50 | dnl at the first function definition in every compilation unit, and we 51 | dnl don't want to use the option in this case. 52 | if test $gl_cv_cc_vis_werror = yes; then 53 | CFLAGS="$CFLAGS -Werror" 54 | fi 55 | AC_COMPILE_IFELSE( 56 | [AC_LANG_PROGRAM( 57 | [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; 58 | extern __attribute__((__visibility__("default"))) int exportedvar; 59 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 60 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); 61 | void dummyfunc (void) {} 62 | ]], 63 | [[]])], 64 | [gl_cv_cc_visibility=yes], 65 | [gl_cv_cc_visibility=no]) 66 | CFLAGS="$gl_save_CFLAGS"]) 67 | AC_MSG_RESULT([$gl_cv_cc_visibility]) 68 | if test $gl_cv_cc_visibility = yes; then 69 | CFLAG_VISIBILITY="-fvisibility=hidden" 70 | HAVE_VISIBILITY=1 71 | fi 72 | fi 73 | AC_SUBST([CFLAG_VISIBILITY]) 74 | AC_SUBST([HAVE_VISIBILITY]) 75 | AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], 76 | [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) 77 | ]) 78 | -------------------------------------------------------------------------------- /m4/wchar_t.m4: -------------------------------------------------------------------------------- 1 | # wchar_t.m4 serial 4 (gettext-0.18.2) 2 | dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether has the 'wchar_t' type. 9 | dnl Prerequisite: AC_PROG_CC 10 | 11 | AC_DEFUN([gt_TYPE_WCHAR_T], 12 | [ 13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM( 16 | [[#include 17 | wchar_t foo = (wchar_t)'\0';]], 18 | [[]])], 19 | [gt_cv_c_wchar_t=yes], 20 | [gt_cv_c_wchar_t=no])]) 21 | if test $gt_cv_c_wchar_t = yes; then 22 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) 23 | fi 24 | ]) 25 | -------------------------------------------------------------------------------- /m4/wint_t.m4: -------------------------------------------------------------------------------- 1 | # wint_t.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether has the 'wint_t' type. 9 | dnl Prerequisite: AC_PROG_CC 10 | 11 | AC_DEFUN([gt_TYPE_WINT_T], 12 | [ 13 | AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM( 16 | [[ 17 | /* Tru64 with Desktop Toolkit C has a bug: must be included before 18 | . 19 | BSD/OS 4.0.1 has a bug: , and must be included 20 | before . */ 21 | #include 22 | #include 23 | #include 24 | #include 25 | wint_t foo = (wchar_t)'\0';]], 26 | [[]])], 27 | [gt_cv_c_wint_t=yes], 28 | [gt_cv_c_wint_t=no])]) 29 | if test $gt_cv_c_wint_t = yes; then 30 | AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) 31 | fi 32 | ]) 33 | -------------------------------------------------------------------------------- /m4/xsize.m4: -------------------------------------------------------------------------------- 1 | # xsize.m4 serial 5 2 | dnl Copyright (C) 2003-2004, 2008-2015 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_XSIZE], 8 | [ 9 | dnl Prerequisites of lib/xsize.h. 10 | AC_REQUIRE([gl_SIZE_MAX]) 11 | AC_CHECK_HEADERS([stdint.h]) 12 | ]) 13 | -------------------------------------------------------------------------------- /po/.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Translation copyright holder 3 | # This file is distributed under the same license as the GNU usbbootgui package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GNU usbbootgui 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-03-14 13:05+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/main.c:33 21 | msgid "Select folder" 22 | msgstr "" 23 | 24 | #: src/main.c:33 25 | msgid "_Cancel" 26 | msgstr "" 27 | 28 | #: src/main.c:34 29 | msgid "_Open" 30 | msgstr "" 31 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically. 2 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(GETTEXT_DOMAIN) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \ 12 | --keyword=C_:1c,2 --keyword=NC_:1c,2 \ 13 | --keyword=g_dngettext:2,3 \ 14 | --flag=g_dngettext:2:pass-c-format \ 15 | --flag=g_strdup_printf:1:c-format \ 16 | --flag=g_string_printf:2:c-format \ 17 | --flag=g_string_append_printf:2:c-format \ 18 | --flag=g_error_new:3:c-format \ 19 | --flag=g_set_error:4:c-format \ 20 | --flag=g_markup_printf_escaped:1:c-format \ 21 | --flag=g_log:3:c-format \ 22 | --flag=g_print:1:c-format \ 23 | --flag=g_printerr:1:c-format \ 24 | --flag=g_printf:1:c-format \ 25 | --flag=g_fprintf:2:c-format \ 26 | --flag=g_sprintf:2:c-format \ 27 | --flag=g_snprintf:3:c-format 28 | 29 | 30 | # This is the copyright holder that gets inserted into the header of the 31 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 32 | # package. (Note that the msgstr strings, extracted from the package's 33 | # sources, belong to the copyright holder of the package.) Translators are 34 | # expected to transfer the copyright for their translations to this person 35 | # or entity, or to disclaim their copyright. The empty string stands for 36 | # the public domain; in this case the translators are expected to disclaim 37 | # their copyright. 38 | COPYRIGHT_HOLDER = Translation copyright holder 39 | 40 | # This is the email address or URL to which the translators shall report 41 | # bugs in the untranslated strings: 42 | # - Strings which are not entire sentences, see the maintainer guidelines 43 | # in the GNU gettext documentation, section 'Preparing Strings'. 44 | # - Strings which use unclear terms or require additional context to be 45 | # understood. 46 | # - Strings which make invalid assumptions about notation of date, time or 47 | # money. 48 | # - Pluralisation problems. 49 | # - Incorrect English spelling. 50 | # - Incorrect formatting. 51 | # It can be your email address, or a mailing list address where translators 52 | # can write to without being subscribed, or the URL of a web page through 53 | # which the translators can contact you. 54 | MSGID_BUGS_ADDRESS = 55 | 56 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 57 | # message catalogs shall be used. It is usually empty. 58 | EXTRA_LOCALE_CATEGORIES = 59 | 60 | # Ignore the timestamp of the .pot file, as git clones do not have 61 | # deterministic timestamps, and .po files are updated by translators 62 | # (only) in GNOME projects. 63 | PO_DEPENDS_ON_POT = no 64 | 65 | # This tells whether or not to forcibly update $(DOMAIN).pot and 66 | # regenerate PO files on "make dist". Possible values are "yes" and 67 | # "no". Set this to no if the POT file and PO files are maintained 68 | # externally. 69 | DIST_DEPENDS_ON_UPDATE_PO = no 70 | -------------------------------------------------------------------------------- /po/Makevars.template: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. 22 | 23 | # This tells whether or not to prepend "GNU " prefix to the package 24 | # name that gets inserted into the header of the $(DOMAIN).pot file. 25 | # Possible values are "yes", "no", or empty. If it is empty, try to 26 | # detect it automatically by scanning the files in $(top_srcdir) for 27 | # "GNU packagename" string. 28 | PACKAGE_GNU = 29 | 30 | # This is the email address or URL to which the translators shall report 31 | # bugs in the untranslated strings: 32 | # - Strings which are not entire sentences, see the maintainer guidelines 33 | # in the GNU gettext documentation, section 'Preparing Strings'. 34 | # - Strings which use unclear terms or require additional context to be 35 | # understood. 36 | # - Strings which make invalid assumptions about notation of date, time or 37 | # money. 38 | # - Pluralisation problems. 39 | # - Incorrect English spelling. 40 | # - Incorrect formatting. 41 | # It can be your email address, or a mailing list address where translators 42 | # can write to without being subscribed, or the URL of a web page through 43 | # which the translators can contact you. 44 | MSGID_BUGS_ADDRESS = 45 | 46 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 47 | # message catalogs shall be used. It is usually empty. 48 | EXTRA_LOCALE_CATEGORIES = 49 | 50 | # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' 51 | # context. Possible values are "yes" and "no". Set this to yes if the 52 | # package uses functions taking also a message context, like pgettext(), or 53 | # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. 54 | USE_MSGCTXT = no 55 | 56 | # These options get passed to msgmerge. 57 | # Useful options are in particular: 58 | # --previous to keep previous msgids of translated messages, 59 | # --quiet to reduce the verbosity. 60 | MSGMERGE_OPTIONS = 61 | 62 | # These options get passed to msginit. 63 | # If you want to disable line wrapping when writing PO files, add 64 | # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and 65 | # MSGINIT_OPTIONS. 66 | MSGINIT_OPTIONS = 67 | 68 | # This tells whether or not to regenerate a PO file when $(DOMAIN).pot 69 | # has changed. Possible values are "yes" and "no". Set this to no if 70 | # the POT file is checked in the repository and the version control 71 | # program ignores timestamps. 72 | PO_DEPENDS_ON_POT = yes 73 | 74 | # This tells whether or not to forcibly update $(DOMAIN).pot and 75 | # regenerate PO files on "make dist". Possible values are "yes" and 76 | # "no". Set this to no if the POT file and PO files are maintained 77 | # externally. 78 | DIST_DEPENDS_ON_UPDATE_PO = yes 79 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/main.c 2 | -------------------------------------------------------------------------------- /po/Rules-quot: -------------------------------------------------------------------------------- 1 | # This file, Rules-quot, can be copied and used freely without restrictions. 2 | # Special Makefile rules for English message catalogs with quotation marks. 3 | 4 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 5 | 6 | .SUFFIXES: .insert-header .po-update-en 7 | 8 | en@quot.po-create: 9 | $(MAKE) en@quot.po-update 10 | en@boldquot.po-create: 11 | $(MAKE) en@boldquot.po-update 12 | 13 | en@quot.po-update: en@quot.po-update-en 14 | en@boldquot.po-update: en@boldquot.po-update-en 15 | 16 | .insert-header.po-update-en: 17 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 18 | if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 19 | tmpdir=`pwd`; \ 20 | echo "$$lang:"; \ 21 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 22 | LC_ALL=C; export LC_ALL; \ 23 | cd $(srcdir); \ 24 | if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ 25 | | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ 26 | { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 27 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ 28 | $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ 29 | ;; \ 30 | *) \ 31 | $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ 32 | ;; \ 33 | esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ 34 | ; then \ 35 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 36 | rm -f $$tmpdir/$$lang.new.po; \ 37 | else \ 38 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 39 | :; \ 40 | else \ 41 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 42 | exit 1; \ 43 | fi; \ 44 | fi; \ 45 | else \ 46 | echo "creation of $$lang.po failed!" 1>&2; \ 47 | rm -f $$tmpdir/$$lang.new.po; \ 48 | fi 49 | 50 | en@quot.insert-header: insert-header.sin 51 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 52 | 53 | en@boldquot.insert-header: insert-header.sin 54 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 55 | 56 | mostlyclean: mostlyclean-quot 57 | mostlyclean-quot: 58 | rm -f *.insert-header 59 | -------------------------------------------------------------------------------- /po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /po/stamp-po: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = usbbootgui 2 | 3 | usbbootgui_SOURCES = usbbootgui.c stealcookie.c stealcookie.h 4 | usbbootgui_CFLAGS = $(USBBOOTGUI_CFLAGS) 5 | 6 | usbbootgui_LDADD = $(USBBOOTGUI_LIBS) -lusb-1.0 7 | 8 | #resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir)/../data --generate-dependencies $(srcdir)/../data/usbbootgui.gresource.xml) 9 | #usbbootgui-resources.c: ../data/usbbootgui.gresource.xml $(resource_files) 10 | # $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir)/../data --generate-source --c-name usbbootgui $< 11 | #usbbootgui-resources.h: ../data/usbbootgui.gresource.xml $(resource_files) 12 | # $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir)/../data --generate-header --c-name usbbootgui $< 13 | 14 | AM_CPPFLAGS = -DLOCALE_DIR='"$(localedir)"' -DPACKAGE_DATA_DIR='"$(datadir)/usbbootgui"' 15 | 16 | -include $(top_srcdir)/git.mk 17 | -------------------------------------------------------------------------------- /src/stealcookie.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Code to borrow X authorization session cookie of currently logged in user 3 | * so we can display the GUI on screen despite it being started by udev 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | /* Parse /var/run/utmp looking for the user logged into X */ 16 | static char *getLoggedInUser() 17 | { 18 | char *username = NULL; 19 | struct utmp entry; 20 | FILE *file = fopen("/var/run/utmp", "rb"); 21 | 22 | if (file) 23 | { 24 | while ( fread(&entry, sizeof(entry), 1, file) == 1 ) 25 | { 26 | /* We are interested in the owner of a user process started on :0 */ 27 | if (entry.ut_type == USER_PROCESS && strcmp(entry.ut_host, ":0") == 0) 28 | { 29 | /* Using strndup as entries are not null-terminated if they are maximum size */ 30 | username = strndup(entry.ut_user, sizeof(entry.ut_user)); 31 | break; 32 | } 33 | } 34 | 35 | fclose(file); 36 | } 37 | 38 | return username; 39 | } 40 | 41 | /* Borrow X authorization cookie of logged-in user 42 | * Sets XAUTHORITY and DISPLAY environement variables */ 43 | void stealcookie() 44 | { 45 | char xauthority[PATH_MAX]; 46 | struct passwd *pwdentry; 47 | char *username = getLoggedInUser(); 48 | 49 | while (!username) 50 | { 51 | /* No user is logged in yet. Try again in a second */ 52 | sleep(1); 53 | username = getLoggedInUser(); 54 | if (username) 55 | { 56 | /* User has just logged in. Delay a bit more to let window manager start first */ 57 | sleep(4); 58 | } 59 | } 60 | 61 | pwdentry = getpwnam(username); 62 | if (pwdentry && pwdentry->pw_dir && strlen(pwdentry->pw_dir)) 63 | { 64 | /* Test if a system wide authority dir is in use first */ 65 | snprintf(xauthority, sizeof(xauthority), "/var/run/lightdm/%s/xauthority", username); 66 | 67 | if (access(xauthority, F_OK) != 0) 68 | { 69 | /* Borrow .Xauthority file in user's home directory instead */ 70 | snprintf(xauthority, sizeof(xauthority), "%s/.Xauthority", pwdentry->pw_dir); 71 | } 72 | setenv("XAUTHORITY", xauthority, 1); 73 | setenv("DISPLAY", ":0", 1); 74 | } 75 | 76 | free(username); 77 | } 78 | -------------------------------------------------------------------------------- /src/stealcookie.h: -------------------------------------------------------------------------------- 1 | #ifndef STEALCOOKIE_H 2 | #define STEALCOOKIE_H 3 | 4 | /* Borrow X authorization cookie of logged-in user 5 | * Sets XAUTHORITY and DISPLAY environement variables */ 6 | void stealcookie(); 7 | 8 | #endif 9 | --------------------------------------------------------------------------------