1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
dnl Configuration for the toplevel directory of GNU libtextstyle
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT
AC_CONFIG_SRCDIR([version.sh])
AC_CONFIG_AUX_DIR([build-aux])
. $srcdir/version.sh
gl_INIT_PACKAGE([libtextstyle], [$VERSION_NUMBER])
AM_INIT_AUTOMAKE([1.13 silent-rules])
AC_CONFIG_HEADERS([config.h])
dnl Override automake's tar command used for creating distributions.
am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
dnl Checks for basic programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_MKDIR_P
dnl Check for host type.
AC_CANONICAL_HOST
dnl Checks that augment the CPPFLAGS.
lts_EARLY
dnl Checks for compiler output filename suffixes.
AC_OBJEXT
AC_EXEEXT
dnl Check for build configuration.
gt_MORE_WARNINGS
gl_CC_INHIBIT_WARNINGS
gl_WOE32_DLL
LT_INIT([win32-dll])
dnl Prepares the libtool configuration for handling of Windows resources, and
dnl sets the RC variable to a program that compiles Windows resource files.
LT_LANG([Windows Resource])
dnl On native Windows and Cygwin, we can activate special Makefile rules which
dnl add version information to the shared libraries and executables.
case "$host_os" in
mingw* | windows* | cygwin*) is_woe32=yes ;;
*) is_woe32=no ;;
esac
AM_CONDITIONAL([WOE32], [test $is_woe32 = yes])
dnl Checks for types, header files, functions and declarations.
lts_INIT
dnl Arrange that the gnulib-generated <unistd.h> does not declare isatty(). The
dnl adhoc-tests want to get this declaration from <textstyle.h>, not <unistd.h>.
GL_LTS_GNULIB_ISATTY=0
GL_LTS_GNULIB_MDA_ISATTY=0
dnl Compilation on native Windows and Cygwin needs special Makefile rules,
dnl because
dnl 1. when we install a shared library, we must arrange to export
dnl auxiliary pointer variables for every exported variable,
dnl 2. when we install a shared library and a static library simultaneously,
dnl the include file specifies __declspec(dllimport) and therefore we
dnl must arrange to define the auxiliary pointer variables for the
dnl exported variables _also_ in the static library.
if test "$enable_shared" = yes; then
case "$host_os" in
mingw* | windows* | cygwin*) is_woe32dll=yes ;;
*) is_woe32dll=no ;;
esac
else
is_woe32dll=no
fi
AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
dnl For substitution in woe32dll.in.h.
if test $is_woe32dll = yes; then
DLL_VARIABLE='__declspec (dllimport)'
else
DLL_VARIABLE=
fi
AC_SUBST([DLL_VARIABLE])
dnl Put some default definitions into config.h.
AH_BOTTOM([
/* In order to define all the symbols declared by textstyle.h, do not use
'inline' functions, even when the compiler would support them. */
#include "notinline.h"
/* Ignore DLL_VARIABLE markup that is meant for gettext. */
#define DLL_VARIABLE
/* Get LIBTEXTSTYLE_DLL_VARIABLE. */
#include "textstyle/woe32dll.h"
])
dnl Namespacing is the default: it builds a namespace clean library.
dnl Allow the user to disable namespacing. This speeds up "make" considerably.
AC_ARG_ENABLE([namespacing],
[ --disable-namespacing build a library that exports undesired symbols],
[:], [enable_namespacing=yes])
if test "$enable_namespacing" != no; then
NAMESPACING=yes
else
NAMESPACING=
fi
AC_SUBST([NAMESPACING])
dnl Check for prerequisites of exported.sh.
gt_GLOBAL_SYMBOL_PIPE
dnl Substitutable version number.
AC_PROG_AWK
changequote(,)
sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
i\
0
q
'
sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
i\
0
q
'
sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
i\
0
q
'
changequote([,])
version_major=`echo "${VERSION}" | sed -n -e "$sed_extract_major"`
version_minor=`echo "${VERSION}" | sed -n -e "$sed_extract_minor"`
version_subminor=`echo "${VERSION}" | sed -n -e "$sed_extract_subminor"`
HEXVERSION=0x`$AWK 'BEGIN { printf("%02X%02X%02X"',"$version_major","$version_minor","$version_subminor"') }'`
AC_SUBST([HEXVERSION])
dnl For substitution in version.in.h.
if test "$am_func_iconv" = yes; then
HAVE_ICONV=1
else
HAVE_ICONV=0
fi
AC_SUBST([HAVE_ICONV])
dnl Check for tools needed for formatting the documentation.
ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
AC_PATH_PROG([TEXI2DVI], [texi2dvi], [$ac_aux_dir_abs/missing texi2dvi])
AC_PATH_PROG([DVIPS], [dvips], [$ac_aux_dir_abs/missing dvips])
AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([lib/Makefile])
AC_CONFIG_FILES([lib/exported.sh])
AC_CONFIG_FILES([lib/textstyle/version.h:lib/textstyle/version.in.h])
AC_CONFIG_FILES([lib/textstyle/woe32dll.h:lib/textstyle/woe32dll.in.h])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([adhoc-tests/Makefile])
AC_OUTPUT
|