libcycript_la_LIBADD += $(LTRUBY)
endif
+if CY_PYTHON
+filters += Python
+libcycript_la_SOURCES += Python/Execute.cpp
+libcycript_la_LIBADD += $(LTPYTHON)
+endif
+
if CY_OBJECTIVEC
filters += ObjectiveC
libcycript_la_SOURCES += ObjectiveC/Output.cpp ObjectiveC/Replace.cpp ObjectiveC/Library.mm
@CY_JAVA_TRUE@am__append_10 = Java
@CY_JAVA_TRUE@am__append_11 = Java/Execute.cpp
@CY_JAVA_TRUE@am__append_12 = $(LTJAVA)
-@CY_RUBY_TRUE@am__append_13 = Ruby
-@CY_RUBY_TRUE@am__append_14 = Ruby/Execute.cpp
-@CY_RUBY_TRUE@am__append_15 = $(LTRUBY)
+@CY_RUBY_TRUE@am__append_13 = Ruby Python
+@CY_RUBY_TRUE@am__append_14 = Ruby/Execute.cpp Python/Execute.cpp
+@CY_RUBY_TRUE@am__append_15 = $(LTRUBY) $(LTPYTHON)
@CY_OBJECTIVEC_TRUE@am__append_16 = ObjectiveC
@CY_OBJECTIVEC_TRUE@am__append_17 = ObjectiveC/Output.cpp ObjectiveC/Replace.cpp ObjectiveC/Library.mm
@CY_OBJECTIVEC_TRUE@am__append_18 = $(LTOBJECTIVEC)
am__DEPENDENCIES_1 =
@CY_EXECUTE_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@CY_JAVA_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
-@CY_RUBY_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
+@CY_RUBY_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) \
+@CY_RUBY_TRUE@ $(am__DEPENDENCIES_1)
@CY_OBJECTIVEC_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
libcycript_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
Replace.cpp Syntax.cpp Parser.cpp Scanner.cpp Complete.cpp \
sig/ffi_type.cpp sig/parse.cpp sig/copy.cpp Execute.cpp \
JavaScriptCore.cpp Java/Execute.cpp Ruby/Execute.cpp \
- ObjectiveC/Output.cpp ObjectiveC/Replace.cpp \
- ObjectiveC/Library.mm Handler.cpp
+ Python/Execute.cpp ObjectiveC/Output.cpp \
+ ObjectiveC/Replace.cpp ObjectiveC/Library.mm Handler.cpp
@CY_CONSOLE_TRUE@am__objects_1 = Complete.lo
am__dirstamp = $(am__leading_dot)dirstamp
@CY_EXECUTE_TRUE@am__objects_2 = sig/ffi_type.lo sig/parse.lo \
@CY_EXECUTE_TRUE@ sig/copy.lo Execute.lo JavaScriptCore.lo
@CY_JAVA_TRUE@am__objects_3 = Java/Execute.lo
-@CY_RUBY_TRUE@am__objects_4 = Ruby/Execute.lo
+@CY_RUBY_TRUE@am__objects_4 = Ruby/Execute.lo Python/Execute.lo
@CY_OBJECTIVEC_TRUE@am__objects_5 = ObjectiveC/Output.lo \
@CY_OBJECTIVEC_TRUE@ ObjectiveC/Replace.lo \
@CY_OBJECTIVEC_TRUE@ ObjectiveC/Library.lo
CY_JAVA = @CY_JAVA@
CY_LIBCLANG = @CY_LIBCLANG@
CY_OBJECTIVEC = @CY_OBJECTIVEC@
+CY_PYTHON = @CY_PYTHON@
CY_RUBY = @CY_RUBY@
CY_SYSTEM = @CY_SYSTEM@
DEFS = @DEFS@
LTLIBTERMCAP = @LTLIBTERMCAP@
LTLIBUV = @LTLIBUV@
LTOBJECTIVEC = @LTOBJECTIVEC@
+LTPYTHON = @LTPYTHON@
LTRUBY = @LTRUBY@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
@$(MKDIR_P) Ruby/$(DEPDIR)
@: > Ruby/$(DEPDIR)/$(am__dirstamp)
Ruby/Execute.lo: Ruby/$(am__dirstamp) Ruby/$(DEPDIR)/$(am__dirstamp)
+Python/$(am__dirstamp):
+ @$(MKDIR_P) Python
+ @: > Python/$(am__dirstamp)
+Python/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) Python/$(DEPDIR)
+ @: > Python/$(DEPDIR)/$(am__dirstamp)
+Python/Execute.lo: Python/$(am__dirstamp) \
+ Python/$(DEPDIR)/$(am__dirstamp)
ObjectiveC/$(am__dirstamp):
@$(MKDIR_P) ObjectiveC
@: > ObjectiveC/$(am__dirstamp)
-rm -f Java/*.lo
-rm -f ObjectiveC/*.$(OBJEXT)
-rm -f ObjectiveC/*.lo
+ -rm -f Python/*.$(OBJEXT)
+ -rm -f Python/*.lo
-rm -f Ruby/*.$(OBJEXT)
-rm -f Ruby/*.lo
-rm -f sig/*.$(OBJEXT)
@AMDEP_TRUE@@am__include@ @am__quote@ObjectiveC/$(DEPDIR)/Library.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ObjectiveC/$(DEPDIR)/Output.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ObjectiveC/$(DEPDIR)/Replace.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@Python/$(DEPDIR)/Execute.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@Ruby/$(DEPDIR)/Execute.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sig/$(DEPDIR)/copy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sig/$(DEPDIR)/ffi_type.Plo@am__quote@
-rm -rf .libs _libs
-rm -rf Java/.libs Java/_libs
-rm -rf ObjectiveC/.libs ObjectiveC/_libs
+ -rm -rf Python/.libs Python/_libs
-rm -rf Ruby/.libs Ruby/_libs
-rm -rf sig/.libs sig/_libs
-rm -f Java/$(am__dirstamp)
-rm -f ObjectiveC/$(DEPDIR)/$(am__dirstamp)
-rm -f ObjectiveC/$(am__dirstamp)
+ -rm -f Python/$(DEPDIR)/$(am__dirstamp)
+ -rm -f Python/$(am__dirstamp)
-rm -f Ruby/$(DEPDIR)/$(am__dirstamp)
-rm -f Ruby/$(am__dirstamp)
-rm -f sig/$(DEPDIR)/$(am__dirstamp)
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR) Java/$(DEPDIR) ObjectiveC/$(DEPDIR) Ruby/$(DEPDIR) sig/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) Java/$(DEPDIR) ObjectiveC/$(DEPDIR) Python/$(DEPDIR) Ruby/$(DEPDIR) sig/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR) Java/$(DEPDIR) ObjectiveC/$(DEPDIR) Ruby/$(DEPDIR) sig/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) Java/$(DEPDIR) ObjectiveC/$(DEPDIR) Python/$(DEPDIR) Ruby/$(DEPDIR) sig/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
--- /dev/null
+/* Cycript - Optimizing JavaScript Compiler/Runtime
+ * Copyright (C) 2009-2015 Jay Freeman (saurik)
+*/
+
+/* GNU Affero General Public License, Version 3 {{{ */
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+**/
+/* }}} */
+
+#include <Python.h>
for arch in i386 x86_64; do
configure "osx-${arch}" "${mac}" "${arch}" "-mmacosx-version-min=10.6" \
- false "-I../readline.osx" "-L../readline.osx" ""
+ false "-I../readline.osx" "-L../readline.osx" "" \
+ --with-python=/usr/bin/python-config
done
for arch in i386 x86_64; do
LTLIBGCC
LTLIBTERMCAP
LTLIBREADLINE
-CY_PRELINK_FALSE
-CY_PRELINK_TRUE
CY_LIBCLANG
CY_OBJECTIVEC_FALSE
CY_OBJECTIVEC_TRUE
+CY_PYTHON_FALSE
+CY_PYTHON_TRUE
CY_RUBY_FALSE
CY_RUBY_TRUE
CY_JAVA_FALSE
LTOBJECTIVEC
GNUSTEP_CONFIG
CY_OBJECTIVEC
+CY_PRELINK_FALSE
+CY_PRELINK_TRUE
+LTPYTHON
+CY_PYTHON
LTRUBY
CY_RUBY
LIBRUBY21_LIBS
enable_javascript
enable_console
enable_attach
+with_python
with_libclang
'
ac_precious_vars='build_alias
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
+ --with-python support python (pass the path to python-config)
--with-libclang build bridge definitions using this libclang
Some influential environment variables:
+
+# Check whether --with-python was given.
+if test "${with_python+set}" = set; then :
+ withval=$with_python;
+else
+ with_python=no
+fi
+
+
+ if test "x$with_python" != "xno"; then :
+
+ CY_PYTHON=1
+
+
+ cy_save=$LIBS
+ LIBS=
+
+
+ for element in `$with_python --includes`; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ for element in `$with_python --ldflags`; do
+ haveit=
+ for x in $LIBS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBS="${LIBS}${LIBS:+ }$element"
+ fi
+ done
+
+
+ LTPYTHON=$LIBS
+ LIBS=$cy_save
+
+
+
+else
+
+ CY_PYTHON=0
+
+
+fi
+
+ if test "x$with_python" != "xno"; then
+ CY_PRELINK_TRUE=
+ CY_PRELINK_FALSE='#'
+else
+ CY_PRELINK_TRUE='#'
+ CY_PRELINK_FALSE=
+fi
+
+
ac_ext=mm
ac_cpp='$OBJCXXCPP $CPPFLAGS'
ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
CY_RUBY_FALSE=
fi
+ if test "x$CY_PYTHON" = x1; then
+ CY_PYTHON_TRUE=
+ CY_PYTHON_FALSE='#'
+else
+ CY_PYTHON_TRUE='#'
+ CY_PYTHON_FALSE=
+fi
+
if test "x$CY_OBJECTIVEC" = x1; then
CY_OBJECTIVEC_TRUE=
CY_OBJECTIVEC_FALSE='#'
as_fn_error $? "conditional \"CY_EXECUTE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${CY_PRELINK_TRUE}" && test -z "${CY_PRELINK_FALSE}"; then
+ as_fn_error $? "conditional \"CY_PRELINK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${CY_JAVA_TRUE}" && test -z "${CY_JAVA_FALSE}"; then
as_fn_error $? "conditional \"CY_JAVA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
as_fn_error $? "conditional \"CY_RUBY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${CY_PYTHON_TRUE}" && test -z "${CY_PYTHON_FALSE}"; then
+ as_fn_error $? "conditional \"CY_PYTHON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${CY_OBJECTIVEC_TRUE}" && test -z "${CY_OBJECTIVEC_FALSE}"; then
as_fn_error $? "conditional \"CY_OBJECTIVEC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
AC_SUBST([CY_RUBY], [0])
])])])])
+ AC_ARG_WITH([python], AS_HELP_STRING([--with-python], [support python (pass the path to python-config)]), [], [with_python=no])
+
+ AS_IF([test "x$with_python" != "xno"], [
+ AC_SUBST([CY_PYTHON], [1])
+ CY_LT_LIB([LTPYTHON], [
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [`$with_python --includes`])
+ AC_LIB_APPENDTOVAR([LIBS], [`$with_python --ldflags`])
+ ])
+ ], [
+ AC_SUBST([CY_PYTHON], [0])
+ ])
+
+ AM_CONDITIONAL([CY_PRELINK], [test "x$with_python" != "xno"])
+
AC_LANG_PUSH([Objective C++])
AC_MSG_CHECKING([if we really have Objective C++])
AM_CONDITIONAL([CY_JAVA], [test "x$CY_JAVA" = x1])
AM_CONDITIONAL([CY_RUBY], [test "x$CY_RUBY" = x1])
+AM_CONDITIONAL([CY_PYTHON], [test "x$CY_PYTHON" = x1])
AM_CONDITIONAL([CY_OBJECTIVEC], [test "x$CY_OBJECTIVEC" = x1])
AC_ARG_WITH([libclang], AS_HELP_STRING([--with-libclang], [build bridge definitions using this libclang]), [], [with_libclang=no])