Add -lgflags into LD_FLAGS when gflags is detected and --with-gflags isn't specified...
author <shinichiro.hamaji@gmail.com> <>
Wed, 22 Apr 2009 04:28:59 +0000 (04:28 +0000)
committer <shinichiro.hamaji@gmail.com> <>
Wed, 22 Apr 2009 04:28:59 +0000 (04:28 +0000)
git-svn-id: https://google-glog.googlecode.com/svn/trunk@49 eb4d4688-79bd-11dd-afb4-1d65580434c0

configure
configure.ac

index 4080e111779d5e6e38d8656e8756a82ff457d6ba..b92000785a19057136620c95b46e095450e0a2de 100755 (executable)
--- a/configure
+++ b/configure
@@ -23944,6 +23944,9 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIB_GFLAGS 1
 _ACEOF
 
+  if test x"$GFLAGS_LIBS" = x""; then
+    GFLAGS_LIBS="-lgflags"
+  fi
 else
   GFLAGS_CFLAGS=
   GFLAGS_LIBS=
index 1e87cee4f2469343aca4d24969a7545f6b8a1f07..60466dfdbfba6d6649f321fd276783d809cf6808 100644 (file)
@@ -110,6 +110,9 @@ AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR],
 AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0)
 if test x"$ac_cv_have_libgflags" = x"1"; then
   AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library])
+  if test x"$GFLAGS_LIBS" = x""; then
+    GFLAGS_LIBS="-lgflags"
+  fi
 else
   GFLAGS_CFLAGS=
   GFLAGS_LIBS=