From 87e9d62e5538b3cde3470aed9eb4cb9670ce41b2 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Fri, 16 Nov 2012 01:29:22 -0800 Subject: [PATCH] Add cflags to pkg-config files. --- ntk.pc.in | 2 +- ntk_gl-uninstalled.pc.in | 2 +- ntk_gl.pc.in | 2 +- ntk_images-uninstalled.pc.in | 2 +- ntk_images.pc.in | 2 +- wscript | 12 ++++++++++-- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ntk.pc.in b/ntk.pc.in index 6ad6a90..c273965 100644 --- a/ntk.pc.in +++ b/ntk.pc.in @@ -10,4 +10,4 @@ Version: @VERSION@ Requires: cairo >= 1.9.0 Requires.private: x11 xft Libs: -L${libdir} -lntk -Cflags: -I${includedir}/ntk +Cflags: -I${includedir}/ntk @CFLAGS@ diff --git a/ntk_gl-uninstalled.pc.in b/ntk_gl-uninstalled.pc.in index 17f6600..d6f3d98 100644 --- a/ntk_gl-uninstalled.pc.in +++ b/ntk_gl-uninstalled.pc.in @@ -5,4 +5,4 @@ Version: @VERSION@ Requires: gl Libs: @BUILD@/libs/libntk_gl.a Libs.private: -lgl -Cflags: -I@BUILD@/FL +Cflags: -I@BUILD@/FL @CFLAGS@ diff --git a/ntk_gl.pc.in b/ntk_gl.pc.in index 0c4e644..a0adff2 100644 --- a/ntk_gl.pc.in +++ b/ntk_gl.pc.in @@ -10,4 +10,4 @@ Version: @VERSION@ Requires: gl Requires.private: x11 xft Libs: -L${libdir} -lntk -lgl -lntk_gl -Cflags: -I${includedir}/ntk +Cflags: -I${includedir}/ntk @CFLAGS@ diff --git a/ntk_images-uninstalled.pc.in b/ntk_images-uninstalled.pc.in index 68f4b80..4e24a9e 100644 --- a/ntk_images-uninstalled.pc.in +++ b/ntk_images-uninstalled.pc.in @@ -6,4 +6,4 @@ Requires: cairo >= 1.9.0 Requires.private: x11 xft Libs: @BUILD@/libs/libntk_images.a Libs.private: -lcairo -lxft -lx11 -Cflags: -I@BUILD@/FL +Cflags: -I@BUILD@/FL @CFLAGS@ diff --git a/ntk_images.pc.in b/ntk_images.pc.in index 3b5eb46..be5d75a 100644 --- a/ntk_images.pc.in +++ b/ntk_images.pc.in @@ -10,4 +10,4 @@ Version: @VERSION@ Requires: cairo >= 1.9.0 Requires.private: x11 xft Libs: -L${libdir} -lntk_images -lntk -Cflags: -I${includedir}/ntk +Cflags: -I${includedir}/ntk @CFLAGS@ diff --git a/wscript b/wscript index 953a6c0..a93ed88 100644 --- a/wscript +++ b/wscript @@ -26,6 +26,8 @@ out = 'build' children = [ 'fluid', 'test' ] #children = [] +CFLAGS = [ '-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_THREAD_SAFE', '-D_REENTRANT' ] + def options(opt): opt.load('compiler_c') opt.load('compiler_cxx') @@ -44,9 +46,9 @@ def configure(conf): conf.load('gnu_dirs') # conf.load('ntk_fluid') conf.line_just = 52 - conf.env.append_value('CFLAGS',['-Wall']) + conf.env.append_value('CFLAGS', CFLAGS + ['-Wall']) # conf.env.append_value('CXXFLAGS',['-Wall','-fno-exceptions', '-fno-rtti']) - conf.env.append_value('CXXFLAGS',['-Wall']) + conf.env.append_value('CXXFLAGS',CFLAGS + ['-Wall']) conf.check_cfg(package='x11', uselib_store='X11', args="--cflags --libs", mandatory=True) @@ -445,6 +447,7 @@ src/Fl_Gl_Window.cxx target = 'ntk.pc', encoding = 'utf8', install_path = '${LIBDIR}/pkgconfig', + CFLAGS = string.join( CFLAGS, ' ' ), VERSION = VERSION, PREFIX = bld.env.PREFIX ) @@ -453,6 +456,7 @@ src/Fl_Gl_Window.cxx target = 'ntk_images.pc', encoding = 'utf8', install_path = '${LIBDIR}/pkgconfig', + CFLAGS = string.join( CFLAGS, ' ' ), VERSION = VERSION, PREFIX = bld.env.PREFIX ) @@ -461,6 +465,7 @@ src/Fl_Gl_Window.cxx target = 'ntk_gl.pc', encoding = 'utf8', install_path = '${LIBDIR}/pkgconfig', + CFLAGS = string.join( CFLAGS, ' ' ), VERSION = VERSION, PREFIX = bld.env.PREFIX ) @@ -468,6 +473,7 @@ src/Fl_Gl_Window.cxx source = 'ntk-uninstalled.pc.in', target = 'ntk-uninstalled.pc', encoding = 'utf8', + CFLAGS = string.join( CFLAGS, ' ' ), VERSION = VERSION, BUILD = os.getcwd() + '/' + out ) @@ -476,6 +482,7 @@ src/Fl_Gl_Window.cxx target = 'ntk_images-uninstalled.pc', encoding = 'utf8', VERSION = VERSION, + CFLAGS = string.join( CFLAGS, ' ' ), BUILD = os.getcwd() + '/' + out ) @@ -484,6 +491,7 @@ src/Fl_Gl_Window.cxx target = 'ntk_gl-uninstalled.pc', encoding = 'utf8', VERSION = VERSION, + CFLAGS = string.join( CFLAGS, ' ' ), BUILD = os.getcwd() + '/' + out ) # bld( features = 'subst',