configure.ac 1.19 KB
Newer Older
1 2
## ExampleLib Example: an example of using Automake to link with a library

3
AC_INIT([freetype-gl], [1.10], [bernd@net2o.de], [freetype-gl for Linux/Android],
4
        [https://github.com/forthy42/freetype-gl])
5 6
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
Bernd Paysan's avatar
Bernd Paysan committed
7
AC_USE_SYSTEM_EXTENSIONS
8 9 10 11 12 13 14 15 16 17 18
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AM_PROG_AR
LT_INIT

case $CC in
     *android*)
	LIBADD="-llog"
	;;
esac
19 20 21 22 23 24 25 26 27
case "$host_os" in
    *darwin*)
	for i in /opt/X11 /sw /usr/local
	do
	    test -d $i/include && CPPFLAGS="$CPPFLAGS -I$i/include"
	    test -d $i/lib && LDFLAGS="$LDFLAGS -L$i/lib"
	done
	;;
esac
28 29

>conftest.$ac_ext
Bernd Paysan's avatar
Bernd Paysan committed
30
echo -n "checking include directory for ft2build.h... "
31
FTINC=`eval $ac_compiler -E -Wp,-v conftest.$ac_ext 2>&1 | grep '^ ' | while read i; do test -f $i/freetype2/ft2build.h && echo -I$i/freetype2; done`
Bernd Paysan's avatar
Bernd Paysan committed
32
echo "$FTINC"
33 34
rm conftest.$ac_ext

35
SOURCE_PATH_SIZE=0 #$(echo $PWD | wc -c)
36

37 38
AC_SUBST(FTINC)
AC_SUBST(LIBADD)
39
AC_SUBST(SOURCE_PATH_SIZE)
40
dnl AX_GCC_BUILTIN(__builtin_bswap32)
41 42 43 44 45 46

PRECC=${CC%gcc*}
PRECLANG=${PRECC%clang*}
AC_CHECK_PROGS(GNU_LIBTOOL,"glibtool --tag=CC" libtool)
AC_SUBST(LIBTOOL)

Bernd Paysan's avatar
Bernd Paysan committed
47
AC_CONFIG_FILES([Makefile debian/control debian/changelog])
48
AC_OUTPUT