-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
84 lines (65 loc) · 2.18 KB
/
configure.ac
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
dnl Process this file with autoconf to produce a configure script.
dnl This is required at the start; the name is the name of a file
dnl it should be seeing, to verify it is in the same directory.
AC_INIT
AC_CONFIG_SRCDIR([src/pmw.h])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_CHECK_FUNCS(memmove strerror)
dnl Handle --disable-pmwrc
NO_PMWRC=0
AC_ARG_ENABLE(pmwrc,
AS_HELP_STRING([--disable-pmwrc], [disable support for .pmwrc file]),
, enable_pmwrc=unset)
if test "x$enable_pmwrc" = "xunset"; then enable_pmwrc=yes; fi
if test "x$enable_pmwrc" != "xyes"; then NO_PMWRC=1; fi
dnl Handle --enable-b2pf
SUPPORT_B2PF=0
AC_ARG_ENABLE(b2pf,
AS_HELP_STRING([--enable-b2pf], [enable support for B2PF processing]),
, enable_b2pf=unset)
if test "x$enable_b2pf" = "xunset"; then enable_b2pf=no; fi
if test "x$enable_b2pf" = "xyes"; then
AC_CHECK_LIB([b2pf], [b2pf_context_create],
, AC_MSG_ERROR(B2PF library not found))
SUPPORT_B2PF=1
LFLAGS=-lb2pf
fi
dnl Handle --enable-musicxml
SUPPORT_XML=0
AC_ARG_ENABLE(musicxml,
AS_HELP_STRING([--enable-musicxml], [enable support for MusicXML input]),
, enable_musicxml=unset)
if test "x$enable_musicxml" = "xunset"; then enable_musicxml=no; fi
if test "x$enable_musicxml" = "xyes"; then SUPPORT_XML=1; fi
dnl Export these values in addition to the defaults
AC_SUBST(LFLAGS)
AC_SUBST(NO_PMWRC)
AC_SUBST(SUPPORT_B2PF)
AC_SUBST(SUPPORT_XML)
dnl Write these files
AC_CONFIG_FILES(
Makefile
src/config.h
)
dnl This must be last
AC_OUTPUT
dnl Output configuration settings
cat <<EOF
PMW configuration summary:
C compiler .......................: ${CC}
C compiler flags .................: ${CFLAGS}
Linker flags .....................: ${LFLAGS}
Install pmw command in ...........: ${prefix}/bin
Install shared data in ...........: ${prefix}/share/pmw
Install man page in ..............: ${prefix}/man
Support .pmwrc file ..............: ${enable_pmwrc}
Support B2PF text processing .....: ${enable_b2pf}
Support for MusicXML input .......: ${enable_musicxml}
EOF
dnl End of configure.ac