-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure.in
67 lines (52 loc) · 1.45 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(gbdfed.c)
AC_PROG_CC
dnl Get Compiler flags right.
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall -pedantic"
else
case "$host" in
alpha-dec-osf*)
XX_CFLAGS="-std1 -O2 -g3"
;;
*)
XX_CFLAGS=
;;
esac
fi
AC_SUBST(XX_CFLAGS)
AC_CHECK_PROG(RM, rm, rm)
AC_CHECK_PROG(CP, cp, cp)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([libintl.h stddef.h stdlib.h string.h unistd.h])
AC_C_CONST
dnl Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memmove memset strchr strdup strrchr strstr])
dnl These use the pkgconfig macro (in aclocal.m4) to check on libraries.
PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.0,DEFINES="-DHAVE_FREETYPE" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LIBS="$LIBS $FREETYPE_LIBS",)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6,CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",)
AC_CHECK_FILE(hbf.c, DEFINES="$DEFINES -DHAVE_HBF" HBFSRC="hbf.c" HBFOBJ="hbf.o",)
AC_PATH_XTRA
if test "$have_x" != yes; then
AC_MSG_NOTICE(X11 not found. Disabling server font grabbing.)
else
DEFINES="$DEFINES -DHAVE_XLIB"
BDFGRABSRC="bdfgrab.c"
BDFGRABOBJ="bdfgrab.o"
fi
#
# Fix for implicit DSO linking issue.
#
AC_CHECK_LIB(X11, XCreatePixmap)
AC_SUBST(DEFINES)
AC_SUBST(HBFSRC)
AC_SUBST(HBFOBJ)
AC_SUBST(BDFGRABSRC)
AC_SUBST(BDFGRABOBJ)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT