Re: magick/GraphicsMagick.pc.in in 1.1.2

Albert Chin <[email protected]> Thu, 22 Jul 2004 14:44:38 -0500
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Thu, Jul 22, 2004 at 02:20:33PM -0500, Albert Chin wrote:
> On Thu, Jul 22, 2004 at 02:02:43PM -0500, Bob Friesenhahn wrote:
> > On Thu, 22 Jul 2004, Albert Chin wrote:
> > 
> > >Why do you have the following in magick/GraphicsMagick.pc.in:
> > > Libs: @MAGICK_API_LDFLAGS@ @MAGICK_API_LIBS@
> > > Cflags: @MAGICK_API_CPPFLAGS@
> > >
> > >The standard would be:
> > > Libs: -L${libdir} -lGraphicsMagick
> > > Cflags: -I${includedir}
> > 
> > Wouldn't that constrain the dependent application so that it must be 
> > installed using the same prefix as GraphicsMagick?  Or does pkg-config 
> > expand ${libdir} and ${includedir} automatically while reporting them?
> 
> > There are some flags added via @MAGICK_API_CPPFLAGS@ which may be 
> > important.  For example, flags are added for multithread support.
> 
> Ok. Then maybe:
>   Cflags: -I${includedir}@blah@ @GM_CPPFLAGS@

What about the following?

-- 
albert chin ([email protected])

-- snip snip
--- configure.ac.orig	Thu Jul 22 11:44:11 2004
+++ configure.ac	Thu Jul 22 14:25:20 2004
@@ -73,6 +73,7 @@
 
 MAGICK_API_CFLAGS=''
 MAGICK_API_CPPFLAGS=$CPPFLAGS_INITIAL
+MAGICK_API_PC_CPPFLAGS=''
 MAGICK_API_LDFLAGS=''
 MAGICK_API_LIBS=''
 
@@ -665,6 +637,7 @@
   then
     CPPFLAGS="$CPPFLAGS -D_DLL"
     MAGICK_API_CPPFLAGS="$MAGICK_API_CPPFLAGS -D_DLL"
+    MAGICK_API_PC_CPPFLAGS="$MAGICK_API_PC_CPPFLAGS -D_DLL"
     LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
 
     if test "$with_modules" = 'yes'
@@ -677,12 +650,14 @@
   else
     CPPFLAGS="$CPPFLAGS -D_LIB"
     MAGICK_API_CPPFLAGS="$MAGICK_API_CPPFLAGS -D_LIB"
+    MAGICK_API_PC_CPPFLAGS="$MAGICK_API_PC_CPPFLAGS -D_LIB"
 
   fi
   if test "$with_threads" = 'yes'
   then
      CPPFLAGS="$CPPFLAGS -D_MT"
      MAGICK_API_CPPFLAGS="$MAGICK_API_CPPFLAGS -D_MT"
+     MAGICK_API_PC_CPPFLAGS="$MAGICK_API_PC_CPPFLAGS -D_MT"
   fi
 fi
 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
@@ -2630,6 +2605,7 @@
 
 AC_SUBST(MAGICK_API_CFLAGS)
 AC_SUBST(MAGICK_API_CPPFLAGS)
+AC_SUBST(MAGICK_API_PC_CPPFLAGS)
 AC_SUBST(MAGICK_API_LDFLAGS)
 AC_SUBST(MAGICK_API_LIBS)
 
--- magick/GraphicsMagick.pc.in.orig	Thu Jul 22 12:00:19 2004
+++ magick/GraphicsMagick.pc.in	Thu Jul 22 14:25:38 2004
@@ -7,6 +7,5 @@
 Name: GraphicsMagick
 Version: @PACKAGE_VERSION@
 Description: GraphicsMagick image processing library
-Requires:
-Libs: @MAGICK_API_LDFLAGS@ @MAGICK_API_LIBS@
-Cflags: @MAGICK_API_CPPFLAGS@
+Libs: -L${libdir} -lGraphicsMagick
+Cflags: -I${includedir}/GraphicsMagick @MAGICK_API_PC_CPPFLAGS@


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click