summaryrefslogtreecommitdiffstats
path: root/m4/rtems-multilib.m4
blob: 25be9d4e0b83d17e13377d5ab27c3d5823a2855b (plain) (blame)
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
#
# Prepare for a multilibbed build
#  - check for presence of 'config-ml.in'
#  - expand AM_ENABLE_MULTILIB(MAKEFILE, REL-TO-TOP-SRCDIR)
#  - expand TILLAM_MULTISUB_INSTALLDIR (workaround so that
#    multilibs are installed into proper subdir.
#  - make sure  'enable_multilib' is set to 'no' if it was initially
#    unset; yet another little workaround...
#
# TILLAC_RTEMS_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
AC_DEFUN([TILLAC_RTEMS_MULTILIB],
	[if test -f ${srcdir}/config-ml.in || test -f $(srcdir)/../config-ml.in ; then
		AM_ENABLE_MULTILIB([$1],[$2])
		# install multilibs into MULTISUBDIR
		TILLAM_MULTISUB_INSTALLDIR
dnl		AC_SUBST(libdir,[${libdir}'$(MULTISUBDIR)'])
		# in order to properly build multilibs in sub-libraries it seems we
		# must pass the --enable-multilibs arg to sub-configures or multilibs
		# are not built there.
		# To work around, we simply set the default to 'no' so the user must
		# say --enable-multilib to get them.
		if test ! "${enable_multilib+set}" = "set" ; then
		    multilib=no
		fi
	else
		enable_multilib=no
	fi]dnl
)