summaryrefslogtreecommitdiffstats
path: root/src/external
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-08-31 15:32:39 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-09 16:59:47 +0200
commit4d12b06c45f91715902cb2d28c9b689964911632 (patch)
treecab5ef67ffeb89ec085ab9021f560a00be631245 /src/external
parenta4b698cdd9b974ecf53e7d90aa989b350ca4cec0 (diff)
downloadsssd-4d12b06c45f91715902cb2d28c9b689964911632.tar.gz
sssd-4d12b06c45f91715902cb2d28c9b689964911632.tar.xz
sssd-4d12b06c45f91715902cb2d28c9b689964911632.zip
AUTOTOOLS: Refactor unicode library detection
If $libdir is not in default library path libunistring cannot be found. (pkg-config can not be used in this case). This patch helps to search libunistring in "$libdir" directory. In refactoring part, indentation was updated to be more readable and some duplicated parts were removed.
Diffstat (limited to 'src/external')
-rw-r--r--src/external/libunistring.m431
1 files changed, 24 insertions, 7 deletions
diff --git a/src/external/libunistring.m4 b/src/external/libunistring.m4
index 18ea3e62a..bbc92b332 100644
--- a/src/external/libunistring.m4
+++ b/src/external/libunistring.m4
@@ -1,14 +1,31 @@
-AC_CHECK_HEADERS(unistr.h,
- [AC_CHECK_LIB([unistring], [u8_strlen], [ UNISTRING_LIBS="-lunistring" ], [AC_MSG_ERROR([No usable libunistring library found])])],
+SSS_AC_EXPAND_LIB_DIR()
+
+AC_CHECK_HEADERS([unistr.h],
+ [AC_CHECK_LIB([unistring],
+ [u8_strlen],
+ [UNISTRING_LIBS="-lunistring"],
+ [AC_MSG_ERROR([No usable libunistring library found])],
+ [-L$sss_extra_libdir])],
[AC_MSG_ERROR([libunistring header files are not installed])]
)
-AC_CHECK_HEADERS(unicase.h,
- [AC_CHECK_LIB([unistring], [u8_casecmp], [ UNISTRING_LIBS="-lunistring" ], [AC_MSG_ERROR([No usable libunistring library found])])],
+AC_CHECK_HEADERS([unicase.h],
+ [AC_CHECK_LIB([unistring],
+ [u8_casecmp],
+ [UNISTRING_LIBS="-lunistring"],
+ [AC_MSG_ERROR([No usable libunistring library found])],
+ [-L$sss_extra_libdir])],
[AC_MSG_ERROR([libunistring header files are not installed])]
)
-AC_CHECK_HEADERS(unistr.h,
- [AC_CHECK_LIB([unistring], [u8_check], [ UNISTRING_LIBS="-lunistring" ], [AC_MSG_ERROR([No usable libunistring library found])])],
+AC_CHECK_HEADERS([unistr.h],
+ [AC_CHECK_LIB([unistring],
+ [u8_check],
+ [UNISTRING_LIBS="-lunistring"],
+ [AC_MSG_ERROR([No usable libunistring library found])],
+ [-L$sss_extra_libdir])],
[AC_MSG_ERROR([libunistring header files are not installed])]
-) \ No newline at end of file
+)
+
+
+UNISTRING_LIBS="-L$sss_extra_libdir $UNISTRING_LIBS "