6 |
|
# |
7 |
|
|
8 |
|
# Change these to change the package name and version |
9 |
< |
AC_INIT(idar, 1.0, dev@i-scream.org.uk) |
10 |
< |
AM_INIT_AUTOMAKE(idar, 1.0) |
9 |
> |
AC_INIT(idar, 1.2, dev@i-scream.org.uk) |
10 |
> |
AM_INIT_AUTOMAKE(idar, 1.2) |
11 |
|
|
12 |
|
# Revision number (automatically updated) |
13 |
|
AC_REVISION($Revision$) |
35 |
|
] |
36 |
|
) |
37 |
|
|
38 |
+ |
# User specified curses/ncurses prefix |
39 |
+ |
AC_ARG_WITH([curses-prefix], |
40 |
+ |
[ --with-curses-prefix=PATH curses (or ncurses) is in PATH], |
41 |
+ |
[ |
42 |
+ |
if test -d "$withval/lib"; then |
43 |
+ |
LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
44 |
+ |
fi |
45 |
+ |
if test -d "$withval/include"; then |
46 |
+ |
CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
47 |
+ |
fi |
48 |
+ |
] |
49 |
+ |
) |
50 |
+ |
|
51 |
|
# Checks for header files |
52 |
|
AC_HEADER_STDC |
53 |
|
AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) |
59 |
|
AC_FUNC_MALLOC |
60 |
|
AC_FUNC_REALLOC |
61 |
|
AC_FUNC_FORK |
62 |
+ |
AC_CHECK_FUNCS(strlcpy) |
63 |
+ |
AC_CHECK_FUNCS(atoll) |
64 |
|
|
65 |
+ |
# Need curses or ncurses |
66 |
+ |
MP_WITH_CURSES |
67 |
+ |
|
68 |
+ |
# Need libxml2 |
69 |
+ |
AM_PATH_XML2 |
70 |
+ |
CFLAGS="$CFLAGS $XML_CFLAGS" |
71 |
+ |
LIBS="$LIBS $XML_LIBS" |
72 |
+ |
|
73 |
|
# Figure out details about the host - we need the OS |
74 |
|
AC_CANONICAL_HOST |
75 |
|
|
78 |
|
# We also need to add the right LDFLAGS |
79 |
|
case $host_os in |
80 |
|
solaris2.*) |
81 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])],[-lnsl -lsocket]) |
82 |
|
LIBS="$LIBS -lnsl -lsocket -Wl,-Bstatic -lukcprog -Wl,-Bdynamic" |
83 |
|
;; |
84 |
|
freebsd4.*) |
85 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
86 |
|
LIBS="$LIBS -lukcprog -static" |
87 |
|
;; |
88 |
|
linux-gnu) |
89 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
90 |
|
LIBS="$LIBS -lukcprog -static" |
91 |
|
;; |
92 |
|
*) |
93 |
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
94 |
|
;; |
95 |
|
esac |
70 |
– |
|
71 |
– |
# Library checks that need to be done after the OS specific stuff |
72 |
– |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
73 |
– |
|
74 |
– |
# Need libxml2 |
75 |
– |
AM_PATH_XML2 |
76 |
– |
CFLAGS="$CFLAGS $XML_CFLAGS" |
77 |
– |
LIBS="$LIBS $XML_LIBS" |
96 |
|
|
97 |
|
# And finish by changing these files |
98 |
|
AC_CONFIG_FILES([Makefile]) |