1 dnl Check for APU Libraries
2 dnl CHECK_APU(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
20 [AC_HELP_STRING([--with-apu=PATH],[Path to apu prefix or config script])],
21 [test_paths="${with_apu}"],
22 [test_paths="/usr/local/libapr-util /usr/local/apr-util /usr/local/libapu /usr/local/apu /usr/local /opt/libapr-util /opt/apr-util /opt/libapu /opt/apu /opt /usr"])
24 AC_MSG_CHECKING([for libapu config script])
26 for x in ${test_paths}; do
27 dnl # Determine if the script was specified and use it directly
28 if test ! -d "$x" -a -e "$x"; then
34 dnl # Try known config script names/locations
35 for APU_CONFIG in apu-1-mt-config apu-1-config apu-config-1 apu-mt-config-1 apu-mt-config apu-config; do
36 if test -e "${x}/bin/${APU_CONFIG}"; then
39 elif test -e "${x}/${APU_CONFIG}"; then
46 if test -n "$apu_path"; then
51 if test -n "${apu_path}"; then
52 if test "${apu_path}" != "no"; then
53 APU_CONFIG="${apu_path}/${APU_CONFIG}"
55 AC_MSG_RESULT([${APU_CONFIG}])
56 APU_CFLAGS="`${APU_CONFIG} --includes`"
57 if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu CFLAGS: $APU_CFLAGS); fi
58 APU_LDFLAGS="`${APU_CONFIG} --ldflags`"
59 if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LDFLAGS: $APU_LDFLAGS); fi
60 APU_LIBS="`${APU_CONFIG} --libs`"
61 if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LIBS: $APU_LIBS); fi
62 APU_LINK_LD="`${APU_CONFIG} --link-ld`"
63 if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LINK_LD: $APU_LINK_LD); fi
75 if test -z "${APU_LIBS}"; then
76 AC_MSG_NOTICE([*** apu library not found.])
77 ifelse([$2], , AC_MSG_ERROR([apu library is required]), $2)
79 AC_MSG_NOTICE([using '${APU_LIBS}' for apu Library])