]> git.ipfire.org Git - thirdparty/gcc.git/blame - intl/configure.ac
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / intl / configure.ac
CommitLineData
79035f0d 1AC_INIT
22e05272 2AC_USE_SYSTEM_EXTENSIONS
79035f0d 3AC_CONFIG_SRCDIR(gettext.c)
6eb95e99 4AC_CONFIG_HEADER(config.h)
88fa57d7 5AC_CONFIG_MACRO_DIR(../config)
6eb95e99 6AM_GNU_GETTEXT_VERSION(0.12.1)
2d041117 7AM_GNU_GETTEXT([], [need-ngettext])
6eb95e99 8
79035f0d 9# This replaces the extensive use of DEFS in the original Makefile.in.
6eb95e99
ZW
10AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])
11AC_DEFINE(IN_LIBRARY, 1, [Define because this is a library.])
12AC_DEFINE(DEPENDS_ON_LIBICONV, 1, [Define because we depend on libiconv.])
13AC_DEFINE(ENABLE_RELOCATABLE, 1, [Define to enable relocation.])
14AC_DEFINE(NO_XMALLOC, 1, [Define if there is no xmalloc.])
15AC_DEFINE(set_relocation_prefix, libintl_set_relocation_prefix,
16[Define this entry point correctly.])
17AC_DEFINE(relocate, libintl_relocate,
18[Define this entry point correctly.])
19
88fa57d7
KC
20MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
21AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
22AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
23AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
24
25AC_ARG_ENABLE(maintainer-mode,
26[ --enable-maintainer-mode enable rules only needed by maintainers],,
27enable_maintainer_mode=no)
28if test "x$enable_maintainer_mode" = xno; then
29 MAINT='#'
30else
31 MAINT=
32fi
33AC_SUBST(MAINT)
34
909b30a1
EG
35dnl Variables for tags utilities; based on automake 1.16.4+'s init.m4
36if test -z "$CTAGS"; then
37 CTAGS=ctags
38fi
39AC_SUBST([CTAGS])
40if test -z "$ETAGS"; then
41 ETAGS=etags
42fi
43AC_SUBST([ETAGS])
44if test -z "$MKID"; then
45 MKID=mkid
46fi
47AC_SUBST([MKID])
48
79035f0d
NN
49# Additional info for config.intl.
50AC_SUBST(LIBINTL_DEP)
51AC_SUBST(INCINTL)
56694dd9 52
79035f0d
NN
53LIBINTL_DEP=
54INCINTL=
55case $USE_INCLUDED_LIBINTL in
56 yes)
5da9128a
PB
57 LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},&/..,' `
58 LTLIBINTL=`echo $LTLIBINTL | sed 's,${top_builddir},&/..,' `
59 LIBINTL_DEP='${top_builddir}/../intl/libintl.a'
60 INCINTL='-I${top_builddir}/../intl'
79035f0d
NN
61 ;;
62esac
56694dd9 63
2ca17e0a
JJ
64BISON3_YES='#'
65BISON3_NO=
66if test "$INTLBISON" != :; then
67 ac_bison3=no
68 AC_MSG_CHECKING([bison 3 or later])
69changequote(<<,>>)dnl
70 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
71 case $ac_prog_version in
72 [3-9].*)
73changequote([,])dnl
74 ac_prog_version="$ac_prog_version, bison3"; ac_bison3=yes;;
75 *) ac_prog_version="$ac_prog_version, old";;
76 esac
77 AC_MSG_RESULT([$ac_prog_version])
78 if test $ac_bison3 = yes; then
2ca17e0a
JJ
79 BISON3_YES=
80 BISON3_NO='#'
81 fi
82fi
83AC_SUBST(BISON3_YES)
84AC_SUBST(BISON3_NO)
85
b6cb10af 86# Enable --enable-host-shared.
4a1493f0
JJ
87AC_ARG_ENABLE(host-shared,
88[AS_HELP_STRING([--enable-host-shared],
b6cb10af
MP
89 [build host code as shared libraries])])
90AC_SUBST(enable_host_shared)
91
92# Enable --enable-host-pie.
93AC_ARG_ENABLE(host-pie,
94[AS_HELP_STRING([--enable-host-pie],
95 [build host code as PIE])])
96AC_SUBST(enable_host_pie)
97
98if test x$enable_host_shared = xyes; then
99 PICFLAG=-fPIC
100elif test x$enable_host_pie = xyes; then
101 PICFLAG=-fPIE
102else
103 PICFLAG=
104fi
4a1493f0
JJ
105AC_SUBST(PICFLAG)
106
79035f0d
NN
107AC_CONFIG_FILES(Makefile config.intl)
108AC_OUTPUT