build-sys: add --with-uthash=DIR ./configure option

Allow program builder to specify where uthash.h is.

Proposed-by: Ryan Steinmetz <zi@freebsd.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-05-06 21:53:17 +02:00
parent 1c40d8ac1e
commit 3c9226752b

View file

@ -40,6 +40,19 @@ AC_CHECK_HEADERS([\
unistd.h \
])
AC_ARG_WITH(uthash,
AC_HELP_STRING([--with-uthash=DIR], [Use uthash from [DIR]/uthash.h)]),
[ case "$with_uthash" in
yes)
;;
no)
AC_MSG_ERROR([the uthash.h is required])
;;
*)
CPPFLAGS="$CPPFLAGS -I$with_uthash"
;;
esac]
)
AC_CHECK_HEADER(uthash.h, [], [AC_MSG_ERROR([Unable to find uthash.h])])
# Checks for typedefs, structures, and compiler characteristics.