File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -81,20 +81,23 @@ def get_config():
81
81
cflags = mysql_config ("cflags" )
82
82
83
83
include_dirs = []
84
- extra_compile_args = []
84
+ extra_compile_args = ["-std=c99" ]
85
85
86
86
for a in cflags :
87
87
if a .startswith ("-I" ):
88
88
include_dirs .append (dequote (a [2 :]))
89
89
elif a .startswith (("-L" , "-l" )): # This should be LIBS.
90
90
pass
91
91
else :
92
- extra_compile_args = [ a .replace ("%" , "%%" )]
92
+ extra_compile_args . append ( a .replace ("%" , "%%" ))
93
93
94
94
# Copy the arch flags for linking as well
95
- for i in range (len (extra_compile_args )):
96
- if extra_compile_args [i ] == "-arch" :
95
+ try :
96
+ i = extra_compile_args .index ("-arch" )
97
+ if "-arch" not in extra_link_args :
97
98
extra_link_args += ["-arch" , extra_compile_args [i + 1 ]]
99
+ except ValueError :
100
+ pass
98
101
99
102
if static :
100
103
# properly handle mysql client libraries that are not called libmysqlclient
You can’t perform that action at this time.
0 commit comments