SVN: rc-scripts/trunk: configure.ac src/Makefile.am

baggins baggins at pld-linux.org
Sun Mar 20 00:57:31 CET 2011


Author: baggins
Date: Sun Mar 20 00:57:31 2011
New Revision: 12202

Modified:
   rc-scripts/trunk/configure.ac
   rc-scripts/trunk/src/Makefile.am
Log:
- fix glib2 static linking


Modified: rc-scripts/trunk/configure.ac
==============================================================================
--- rc-scripts/trunk/configure.ac	(original)
+++ rc-scripts/trunk/configure.ac	Sun Mar 20 00:57:31 2011
@@ -69,21 +69,13 @@
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 GLIBDIR=none
-AC_MSG_CHECKING([glib2 dir])
-GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
-GLIBNAME="libglib-2.0.a"
-GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
-if test "x$GLIBDIR" = "x"; then
-    AC_MSG_RESULT([none])
-    AC_MSG_CHECKING([glib dir])
-    GLIBDIR="`$PKG_CONFIG --variable=libdir glib`"
-    GLIBNAME="libglib.a"
-    GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`"
+AC_MSG_CHECKING([glib2])
+GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
+GLIB_CFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
+if test "x$GLIB_LIBS" = "x"; then
+	AC_MSG_ERROR(no)
 fi
-if test "x$GLIBDIR" = "x"; then
-    GLIBDIR=/usr/lib
-fi
-AC_MSG_RESULT([$GLIBDIR])
+AC_MSG_RESULT(yes)
 
 DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.],
   DPKG_C_GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.])
@@ -111,9 +103,8 @@
 AC_SUBST(initdir)
 AC_SUBST(docdir)
 AC_SUBST(firmwaredir)
-AC_SUBST(GLIBDIR)
-AC_SUBST(GLIBNAME)
-AC_SUBST(GCFLAGS)
+AC_SUBST(GLIB_LIBS)
+AC_SUBST(GLIB_CFLAGS)
 
 AH_BOTTOM([
 #ifdef HAVE_STDDEF_H

Modified: rc-scripts/trunk/src/Makefile.am
==============================================================================
--- rc-scripts/trunk/src/Makefile.am	(original)
+++ rc-scripts/trunk/src/Makefile.am	Sun Mar 20 00:57:31 2011
@@ -1,9 +1,5 @@
 @SET_MAKE@
 
-GLIBDIR = @GLIBDIR@
-GCFLAGS = @GCFLAGS@
-GLIBNAME = @GLIBNAME@
-
 DEFS = @DEFS@ -D_GNU_SOURCE=1 -DSBINDIR=\""@sbindir@"\"
 
 sysconf_DATA = \
@@ -60,8 +56,8 @@
 getkey_LDADD = -lpopt
 
 ppp_watch_SOURCES = ppp-watch.c shvar.c shvar.h
-ppp_watch_LDADD = $(GLIBDIR)/$(GLIBNAME)
-INCLUDES = $(GCFLAGS)
+ppp_watch_LDADD = $(GLIB_LIBS)
+INCLUDES = $(GLIB_CFLAGS)
 
 consoletype_SOURCES = consoletype.c
 


More information about the pld-cvs-commit mailing list