From 9dbdf62243f01f6aee41c2b5f2976c56da47f25d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sat, 31 Aug 2013 15:32:39 +0200 Subject: 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. --- configure.ac | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 39f6a3197..cdf46d4c7 100644 --- a/configure.ac +++ b/configure.ac @@ -157,16 +157,15 @@ m4_include([src/external/libndr_nbt.m4]) WITH_UNICODE_LIB if test x$unicode_lib = xlibunistring; then - m4_include([src/external/libunistring.m4]) - AC_DEFINE_UNQUOTED(HAVE_LIBUNISTRING, 1, [Using libunistring for unicode]) - UNICODE_LIBS=-lunistring - AC_SUBST(UNICODE_LIBS) + m4_include([src/external/libunistring.m4]) + AC_DEFINE_UNQUOTED(HAVE_LIBUNISTRING, 1, [Using libunistring for unicode]) + UNICODE_LIBS=$UNISTRING_LIBS else - m4_include([src/external/glib.m4]) - AC_DEFINE_UNQUOTED(HAVE_GLIB2, 1, [Using libunistring for unicode]) - UNICODE_LIBS=$GLIB2_LIBS - AC_SUBST(UNICODE_LIBS) + m4_include([src/external/glib.m4]) + AC_DEFINE_UNQUOTED(HAVE_GLIB2, 1, [Using glib2 for unicode]) + UNICODE_LIBS=$GLIB2_LIBS fi +AC_SUBST(UNICODE_LIBS) WITH_LIBNL -- cgit