Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apparently there are two different function signatures for the iconv …
…function. Account for that.
- Loading branch information
1 parent
d8f9431
commit 5cf686b
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,12 @@ | |||
echo "#include <JavaScriptCore/JavaScript.h>" > .check_JavaScript_h.h | if echo "#include <JavaScriptCore/JavaScript.h>" | cpp &> /dev/null; then | ||
if gcc -E .check_JavaScript_h.h -framework JavaScriptCore &>/dev/null; then | echo "#define HAVE_JAVASCRIPT_H" > include/config.h | ||
echo '#define HAVE_JAVASCRIPT_H 1' > include/config.h | |||
echo 'Detected <JavaScriptCore/JavaScript.h>' | |||
else | else | ||
echo '#ifdef HAVE_JAVASCRIPT_H' > include/config.h | echo "#undef HAVE_JAVASCRIPT_H" > include/config.h | ||
echo '#undef HAVE_JAVASCRIPT_H' >> include/config.h | |||
echo '#endif' >> include/config.h | |||
echo 'No <JavaScriptCore/JavaScript.h> detected. Using <JavaScriptCore/JavaScriptCore.h> instead.' | |||
fi | fi | ||
rm -f .check_JavaScript_h.h | |||
|
|
||
if echo "#include <iconv.h>" | cpp | egrep -C2 "size_t[\w]+iconv" |\ | |||
tr -d "\n" | egrep "const[\w]+char" &> /dev/null; then | |||
echo "#define ICONV_REQUIRES_CONST_POINTER" > include/config.h | |||
else | |||
echo "#undef ICONV_REQUIRES_CONST_POINTER" > include/config.h | |||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters