Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=604e7242e98fe73d2d23f82700d282b96b16bd1b
commit 604e7242e98fe73d2d23f82700d282b96b16bd1b Author: James Buren <[email protected]> Date: Wed Oct 8 19:49:34 2014 -0500 scons: switch to using autoconf-like arguments for configuring the build diff --git a/SConstruct b/SConstruct index b0430d1..01f9df6 100755 --- a/SConstruct +++ b/SConstruct @@ -26,6 +26,22 @@ def CheckPlatform(ctx): ctx.Result(rv) return rv +AddOption( + '--enable-shared', + dest='shared', + nargs='?', + const=1, + default=1 +) + +AddOption( + '--disable-shared', + dest='shared', + nargs='?', + const=0, + default=1 +) + env = Environment() cfg = Configure( @@ -64,23 +80,5 @@ env.ParseConfig('pkg-config --cflags --libs libarchive libcurl') env.Append(CFLAGS = '-std=c99') env.Append(CXXFLAGS = '-std=c++11') -try: - debug = int(ARGUMENTS.get('debug', 0)) -except ValueError: - print('debug is invalid.') - Exit(1) - -try: - static = int(ARGUMENTS.get('static', 0)) -except ValueError: - print('static is invalid.') - Exit(1) - -try: - shared = int(ARGUMENTS.get('shared', 1)) -except ValueError: - print('shared is invalid.') - Exit(1) - if debug: env.Append(CCFLAGS = '-g') _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
