# | Line 6 | Line 6 | |
---|---|---|
6 | # | |
7 | ||
8 | # Change these to change the package name and version | |
9 | < | AC_INIT(ihost, 1.6, dev@i-scream.org.uk) |
10 | < | AM_INIT_AUTOMAKE(ihost, 1.6) |
9 | > | AC_INIT(ihost, 1.5.5, dev@i-scream.org.uk) |
10 | > | AM_INIT_AUTOMAKE(ihost, 1.5.5) |
11 | ||
12 | # Revision number (automatically updated) | |
13 | AC_REVISION($Revision$) | |
# | Line 21 | Line 21 | AM_CONFIG_HEADER(config.h) | |
21 | # Checks for programs | |
22 | AC_PROG_CC | |
23 | AC_PROG_INSTALL | |
24 | – | AC_PROG_RANLIB |
24 | ||
25 | # User specified libstatgrab prefix | |
26 | AC_ARG_WITH([libstatgrab-prefix], | |
27 | [ --with-libstatgrab-prefix=PATH libstatgrab is in PATH], | |
28 | [ | |
29 | if test -d "$withval/lib"; then | |
30 | < | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
30 | > | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
31 | fi | |
32 | if test -d "$withval/include"; then | |
33 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" | |
# | Line 36 | Line 35 | AC_ARG_WITH([libstatgrab-prefix], | |
35 | ] | |
36 | ) | |
37 | ||
38 | + | # User specified libukcprog prefix |
39 | + | AC_ARG_WITH([libukcprog-prefix], |
40 | + | [ --with-libukcprog-prefix=PATH libukcprog 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(statgrab.h,,[AC_MSG_ERROR([need statgrab.h])]) | |
54 | + | AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) |
55 | ||
56 | # Checks for typedefs, structures, and compiler characteristics | |
57 | AC_C_CONST | |
# | Line 47 | Line 60 | AC_C_CONST | |
60 | AC_FUNC_MALLOC | |
61 | AC_FUNC_REALLOC | |
62 | AC_FUNC_FORK | |
63 | < | AC_CHECK_LIB(statgrab, get_general_stats,[LIBS="-Wl,-Bstatic -lstatgrab -Wl,-Bdynamic $LIBS"],[AC_MSG_ERROR([need libstatgrab])]) |
63 | > | AC_CHECK_FUNCS(strlcat) |
64 | ||
65 | # Figure out details about the host - we need the OS | |
66 | AC_CANONICAL_HOST | |
# | Line 61 | Line 74 | AM_CONDITIONAL(SETGIDKMEM, false) | |
74 | case $host_os in | |
75 | solaris2.*) | |
76 | AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) | |
77 | < | LIBS="$LIBS -lnsl -lsocket -lkstat" |
77 | > | LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -lukcprog -Wl,-Bdynamic" |
78 | ;; | |
79 | freebsd4.*) | |
80 | AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) | |
81 | < | LIBS="$LIBS -lkvm" |
81 | > | LIBS="$LIBS -lkvm -lstatgrab -lukcprog -static" |
82 | # FreeBSD needs ihost to be setgid kmem | |
83 | AM_CONDITIONAL(SETGIDKMEM, true) | |
84 | ;; | |
85 | linux-gnu) | |
86 | AC_DEFINE(LINUX, , [Building on GNU/Linux]) | |
87 | + | LIBS="$LIBS -lstatgrab -lukcprog -static" |
88 | ;; | |
89 | *) | |
90 | AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) | |
91 | ;; | |
92 | esac | |
93 | ||
94 | + | # Library checks that need to be done after the OS specific stuff |
95 | + | AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) |
96 | + | AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
97 | + | |
98 | # Check for the --with-pid-file option | |
99 | AC_ARG_WITH([pid-file], [ --with-pid-file=FILE location of PID file (default: /var/tmp/.ihost.pid)], [pidfile=$withval], [pidfile=[/var/tmp/.ihost.pid]]) | |
100 | AC_DEFINE_UNQUOTED([PID_FILE], ["$pidfile"], [Location of PID file]) | |
# | Line 90 | Line 108 | AC_ARG_WITH([log-file], [ --with-log-file=FILE loc | |
108 | AC_DEFINE_UNQUOTED([LOG_FILE], ["$logfile"], [Location of log file]) | |
109 | ||
110 | # And finish by changing these files | |
111 | < | AC_CONFIG_FILES([Makefile libukcprog/Makefile]) |
111 | > | AC_CONFIG_FILES([Makefile]) |
112 | ||
113 | AC_OUTPUT |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |