summaryrefslogtreecommitdiffstats
path: root/make/configure.py
diff options
context:
space:
mode:
authorRodeo <[email protected]>2015-04-10 14:56:27 +0000
committerRodeo <[email protected]>2015-04-10 14:56:27 +0000
commit864ce5a4227d81f688f32e808245b2600f431ac3 (patch)
tree80fe0b03201bac220a3d2c291129381752b888db /make/configure.py
parentf360714523e5f1f78ced2ae8691f3087b80eef65 (diff)
Move strtok_r fallback to dedicated "compat" files.
Also, check whether the toolchain already provides strtok_r instead of building it unconditionally. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7076 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/configure.py')
-rw-r--r--make/configure.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/make/configure.py b/make/configure.py
index 89221f6cd..5f35ed4a6 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1617,6 +1617,19 @@ int main()
regex = LDProbe( 'static regex', '%s -static' % Tools.gcc.pathname, '-lregex', regex_test )
regex.run()
+ strtok_r_test = """
+#include <string.h>
+
+int main ()
+{
+ char *saveptr;
+ strtok_r("String tok string", "tok", &saveptr);
+ return 0;
+}
+"""
+ strtok_r = LDProbe( 'static strtok_r', '%s -static' % Tools.gcc.pathname, '', strtok_r_test )
+ strtok_r.run()
+
## cfg hook before doc prep
cfg.doc_ready()
@@ -1744,6 +1757,8 @@ int main()
doc.add( 'HAS.iconv', 1 )
if not regex.fail:
doc.add( 'HAS.regex', 1 )
+ if strtok_r.fail:
+ doc.add( 'COMPAT.strtok_r', 1 )
doc.addMake( '' )
doc.addMake( '## define debug mode and optimize before other includes' )