Fixed configure.ac so that configure script fails if uthash and/or
authorJarkko Sakkinen <ext-jarkko.2.sakkinen@nokia.com>
Thu, 25 Nov 2010 16:45:48 +0000 (08:45 -0800)
committerJarkko Sakkinen <ext-jarkko.2.sakkinen@nokia.com>
Thu, 25 Nov 2010 16:45:48 +0000 (08:45 -0800)
libattr and their corresponding headers are not detected. Thanks to
Ahmed S. Darwish for reporting this issue.

configure.ac

index 0c143b4..b2fa5ae 100644 (file)
@@ -22,8 +22,17 @@ fi
 AM_CONDITIONAL([HAVE_DOXYGEN],[test ! -z "$DOXYGEN"])
 AC_SUBST([DOXYGEN], [$DOXYGEN])
 
-AC_CHECK_HEADERS([utarray.h  uthash.h  utlist.h  utstring.h])
+AC_CHECK_HEADER([attr/xattr.h],[
+       AC_CHECK_LIB([attr],[setxattr],[],[
+               AC_MSG_ERROR([Cannot find setxattr in libattr])])
+       AC_CHECK_LIB([attr],[getxattr],[],[
+               AC_MSG_ERROR([Cannot find getxattr in libattr])])
+],[
+       AC_MSG_ERROR([Cannot find attr/xattr.h])
+])
 
+AC_CHECK_HEADERS([utarray.h  uthash.h  utlist.h  utstring.h],,
+       [AC_MSG_ERROR(Cannot find uthash headers)])
 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
 
 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile doc/Makefile libsmack.spec])