Patch config.w32.patch for Trader Bug #62251
Patch version 2012-06-07 10:44 UTC
Return to Bug #62251 |
Download this patch
Patch Revisions:
Developer: tomkrawc@gmail.com
--- config-bak.w32 2012-06-03 12:14:02.000000000 +0200
+++ config.w32 2012-06-07 11:21:14.328125000 +0200
@@ -1,13 +1,349 @@
// $Id$
// vim:ft=javascript
-// If your extension references something external, use ARG_WITH
-// ARG_WITH("ta", "for ta support", "no");
+ARG_ENABLE("trader", "enable ta support", "no");
-// Otherwise, use ARG_ENABLE
-// ARG_ENABLE("ta", "enable ta support", "no");
+if (PHP_TRADER != "no") {
+ if( CHECK_HEADER_ADD_INCLUDE("ta_func.h", "CFLAGS_TRADER", PHP_TRADER + ";ext\\trader\\ta-lib\\include") &&
+ CHECK_HEADER_ADD_INCLUDE("ta_global.h", "CFLAGS_TRADER", PHP_TRADER + ";ext\\trader\\ta-lib\\src\\ta_common") &&
+ CHECK_HEADER_ADD_INCLUDE("php_trader.h", "CFLAGS_TRADER", PHP_TRADER + ";ext\\trader")
+ ) {
+
+ EXTENSION("trader", "trader.c");
-if (PHP_TA != "no") {
- EXTENSION("ta", "ta.c");
-}
+ ADD_SOURCES("ext/trader/ta-lib/src/ta_common", "ta_global.c ta_retcode.c ta_version.c", "trader");
+ ADD_SOURCES("ext/trader/ta-lib/src/ta_func", " \
+ ta_ACOS.c \
+ ta_AD.c \
+ ta_ADD.c \
+ ta_ADOSC.c \
+ ta_ADX.c \
+ ta_ADXR.c \
+ ta_APO.c \
+ ta_AROON.c \
+ ta_AROONOSC.c \
+ ta_ASIN.c \
+ ta_ATAN.c \
+ ta_ATR.c \
+ ta_AVGPRICE.c \
+ ta_BBANDS.c \
+ ta_BETA.c \
+ ta_BOP.c \
+ ta_CCI.c \
+ ta_CDL2CROWS.c \
+ ta_CDL3BLACKCROWS.c \
+ ta_CDL3INSIDE.c \
+ ta_CDL3LINESTRIKE.c \
+ ta_CDL3OUTSIDE.c \
+ ta_CDL3STARSINSOUTH.c \
+ ta_CDL3WHITESOLDIERS.c \
+ ta_CDLABANDONEDBABY.c \
+ ta_CDLADVANCEBLOCK.c \
+ ta_CDLBELTHOLD.c \
+ ta_CDLBREAKAWAY.c \
+ ta_CDLCLOSINGMARUBOZU.c \
+ ta_CDLCONCEALBABYSWALL.c \
+ ta_CDLCOUNTERATTACK.c \
+ ta_CDLDARKCLOUDCOVER.c \
+ ta_CDLDOJI.c \
+ ta_CDLDOJISTAR.c \
+ ta_CDLDRAGONFLYDOJI.c \
+ ta_CDLENGULFING.c \
+ ta_CDLEVENINGDOJISTAR.c \
+ ta_CDLEVENINGSTAR.c \
+ ta_CDLGAPSIDESIDEWHITE.c \
+ ta_CDLGRAVESTONEDOJI.c \
+ ta_CDLHAMMER.c \
+ ta_CDLHANGINGMAN.c \
+ ta_CDLHARAMI.c \
+ ta_CDLHARAMICROSS.c \
+ ta_CDLHIGHWAVE.c \
+ ta_CDLHIKKAKE.c \
+ ta_CDLHIKKAKEMOD.c \
+ ta_CDLHOMINGPIGEON.c \
+ ta_CDLIDENTICAL3CROWS.c \
+ ta_CDLINNECK.c \
+ ta_CDLINVERTEDHAMMER.c \
+ ta_CDLKICKING.c \
+ ta_CDLKICKINGBYLENGTH.c \
+ ta_CDLLADDERBOTTOM.c \
+ ta_CDLLONGLEGGEDDOJI.c \
+ ta_CDLLONGLINE.c \
+ ta_CDLMARUBOZU.c \
+ ta_CDLMATCHINGLOW.c \
+ ta_CDLMATHOLD.c \
+ ta_CDLMORNINGDOJISTAR.c \
+ ta_CDLMORNINGSTAR.c \
+ ta_CDLONNECK.c \
+ ta_CDLPIERCING.c \
+ ta_CDLRICKSHAWMAN.c \
+ ta_CDLRISEFALL3METHODS.c \
+ ta_CDLSEPARATINGLINES.c \
+ ta_CDLSHOOTINGSTAR.c \
+ ta_CDLSHORTLINE.c \
+ ta_CDLSPINNINGTOP.c \
+ ta_CDLSTALLEDPATTERN.c \
+ ta_CDLSTICKSANDWICH.c \
+ ta_CDLTAKURI.c \
+ ta_CDLTASUKIGAP.c \
+ ta_CDLTHRUSTING.c \
+ ta_CDLTRISTAR.c \
+ ta_CDLUNIQUE3RIVER.c \
+ ta_CDLUPSIDEGAP2CROWS.c \
+ ta_CDLXSIDEGAP3METHODS.c \
+ ta_CEIL.c \
+ ta_CMO.c \
+ ta_CORREL.c \
+ ta_COS.c \
+ ta_COSH.c \
+ ta_DEMA.c \
+ ta_DIV.c \
+ ta_DX.c \
+ ta_EMA.c \
+ ta_EXP.c \
+ ta_FLOOR.c \
+ ta_HT_DCPERIOD.c \
+ ta_HT_DCPHASE.c \
+ ta_HT_PHASOR.c \
+ ta_HT_SINE.c \
+ ta_HT_TRENDLINE.c \
+ ta_HT_TRENDMODE.c \
+ ta_KAMA.c \
+ ta_LINEARREG.c \
+ ta_LINEARREG_ANGLE.c \
+ ta_LINEARREG_INTERCEPT.c \
+ ta_LINEARREG_SLOPE.c \
+ ta_LN.c \
+ ta_LOG10.c \
+ ta_MA.c \
+ ta_MACD.c \
+ ta_MACDEXT.c \
+ ta_MACDFIX.c \
+ ta_MAMA.c \
+ ta_MAVP.c \
+ ta_MAX.c \
+ ta_MAXINDEX.c \
+ ta_MEDPRICE.c \
+ ta_MFI.c \
+ ta_MIDPOINT.c \
+ ta_MIDPRICE.c \
+ ta_MIN.c \
+ ta_MININDEX.c \
+ ta_MINMAX.c \
+ ta_MINMAXINDEX.c \
+ ta_MINUS_DI.c \
+ ta_MINUS_DM.c \
+ ta_MOM.c \
+ ta_MULT.c \
+ ta_NATR.c \
+ ta_OBV.c \
+ ta_PLUS_DI.c \
+ ta_PLUS_DM.c \
+ ta_PPO.c \
+ ta_ROC.c \
+ ta_ROCP.c \
+ ta_ROCR.c \
+ ta_ROCR100.c \
+ ta_RSI.c \
+ ta_SAR.c \
+ ta_SAREXT.c \
+ ta_SIN.c \
+ ta_SINH.c \
+ ta_SMA.c \
+ ta_SQRT.c \
+ ta_STDDEV.c \
+ ta_STOCH.c \
+ ta_STOCHF.c \
+ ta_STOCHRSI.c \
+ ta_SUB.c \
+ ta_SUM.c \
+ ta_T3.c \
+ ta_TAN.c \
+ ta_TANH.c \
+ ta_TEMA.c \
+ ta_TRANGE.c \
+ ta_TRIMA.c \
+ ta_TRIX.c \
+ ta_TSF.c \
+ ta_TYPPRICE.c \
+ ta_ULTOSC.c \
+ ta_utility.c \
+ ta_VAR.c \
+ ta_WCLPRICE.c \
+ ta_WILLR.c \
+ ta_WMA.c \
+ ", "trader"
+ );
+
+ ADD_SOURCES("ext/trader/functions", " \
+ trader_acos.c \
+ trader_ad.c \
+ trader_add.c \
+ trader_adosc.c \
+ trader_adx.c \
+ trader_adxr.c \
+ trader_apo.c \
+ trader_aroon.c \
+ trader_aroonosc.c \
+ trader_asin.c \
+ trader_atan.c \
+ trader_atr.c \
+ trader_avgprice.c \
+ trader_bbands.c \
+ trader_beta.c \
+ trader_bop.c \
+ trader_cci.c \
+ trader_cdl2crows.c \
+ trader_cdl3blackcrows.c \
+ trader_cdl3inside.c \
+ trader_cdl3linestrike.c \
+ trader_cdl3outside.c \
+ trader_cdl3starsinsouth.c \
+ trader_cdl3whitesoldiers.c \
+ trader_cdlabandonedbaby.c \
+ trader_cdladvanceblock.c \
+ trader_cdlbelthold.c \
+ trader_cdlbreakaway.c \
+ trader_cdlclosingmarubozu.c \
+ trader_cdlconcealbabyswall.c \
+ trader_cdlcounterattack.c \
+ trader_cdldarkcloudcover.c \
+ trader_cdldoji.c \
+ trader_cdldojistar.c \
+ trader_cdldragonflydoji.c \
+ trader_cdlengulfing.c \
+ trader_cdleveningdojistar.c \
+ trader_cdleveningstar.c \
+ trader_cdlgapsidesidewhite.c \
+ trader_cdlgravestonedoji.c \
+ trader_cdlhammer.c \
+ trader_cdlhangingman.c \
+ trader_cdlharami.c \
+ trader_cdlharamicross.c \
+ trader_cdlhighwave.c \
+ trader_cdlhikkake.c \
+ trader_cdlhikkakemod.c \
+ trader_cdlhomingpigeon.c \
+ trader_cdlidentical3crows.c \
+ trader_cdlinneck.c \
+ trader_cdlinvertedhammer.c \
+ trader_cdlkicking.c \
+ trader_cdlkickingbylength.c \
+ trader_cdlladderbottom.c \
+ trader_cdllongleggeddoji.c \
+ trader_cdllongline.c \
+ trader_cdlmarubozu.c \
+ trader_cdlmatchinglow.c \
+ trader_cdlmathold.c \
+ trader_cdlmorningdojistar.c \
+ trader_cdlmorningstar.c \
+ trader_cdlonneck.c \
+ trader_cdlpiercing.c \
+ trader_cdlrickshawman.c \
+ trader_cdlrisefall3methods.c \
+ trader_cdlseparatinglines.c \
+ trader_cdlshootingstar.c \
+ trader_cdlshortline.c \
+ trader_cdlspinningtop.c \
+ trader_cdlstalledpattern.c \
+ trader_cdlsticksandwich.c \
+ trader_cdltakuri.c \
+ trader_cdltasukigap.c \
+ trader_cdlthrusting.c \
+ trader_cdltristar.c \
+ trader_cdlunique3river.c \
+ trader_cdlupsidegap2crows.c \
+ trader_cdlxsidegap3methods.c \
+ trader_ceil.c \
+ trader_cmo.c \
+ trader_correl.c \
+ trader_cos.c \
+ trader_cosh.c \
+ trader_dema.c \
+ trader_div.c \
+ trader_dx.c \
+ trader_ema.c \
+ trader_exp.c \
+ trader_floor.c \
+ trader_ht_dcperiod.c \
+ trader_ht_dcphase.c \
+ trader_ht_phasor.c \
+ trader_ht_sine.c \
+ trader_ht_trendline.c \
+ trader_ht_trendmode.c \
+ trader_kama.c \
+ trader_linearreg.c \
+ trader_linearreg_angle.c \
+ trader_linearreg_intercept.c \
+ trader_linearreg_slope.c \
+ trader_ln.c \
+ trader_log10.c \
+ trader_ma.c \
+ trader_macd.c \
+ trader_macdext.c \
+ trader_macdfix.c \
+ trader_mama.c \
+ trader_mavp.c \
+ trader_max.c \
+ trader_maxindex.c \
+ trader_medprice.c \
+ trader_mfi.c \
+ trader_midpoint.c \
+ trader_midprice.c \
+ trader_min.c \
+ trader_minindex.c \
+ trader_minmax.c \
+ trader_minmaxindex.c \
+ trader_minus_di.c \
+ trader_minus_dm.c \
+ trader_mom.c \
+ trader_mult.c \
+ trader_natr.c \
+ trader_obv.c \
+ trader_plus_di.c \
+ trader_plus_dm.c \
+ trader_ppo.c \
+ trader_roc.c \
+ trader_rocp.c \
+ trader_rocr.c \
+ trader_rocr100.c \
+ trader_rsi.c \
+ trader_sar.c \
+ trader_sarext.c \
+ trader_sin.c \
+ trader_sinh.c \
+ trader_sma.c \
+ trader_sqrt.c \
+ trader_stddev.c \
+ trader_stoch.c \
+ trader_stochf.c \
+ trader_stochrsi.c \
+ trader_sub.c \
+ trader_sum.c \
+ trader_t3.c \
+ trader_tan.c \
+ trader_tanh.c \
+ trader_tema.c \
+ trader_trange.c \
+ trader_trima.c \
+ trader_trix.c \
+ trader_tsf.c \
+ trader_typprice.c \
+ trader_ultosc.c \
+ trader_var.c \
+ trader_wclprice.c \
+ trader_willr.c \
+ trader_wma.c \
+ ", "trader"
+ );
+ AC_DEFINE('HAVE_TRADER', 1, 'Have ta library');
+
+ ADD_FLAG("CFLAGS_TRADER", ' /I "ta-lib/include" /I "ta-lib/src/ta_common" /I "functions" ');
+ ADD_FLAG("LDFLAGS_TRADER", ' /libpath:"ta-lib/include" /libpath:"ta-lib/src/ta_common" /libpath:"functions" ');
+
+ }
+ else {
+ WARNING("trader not enabled; libraries and headers not found");
+ }
+}
|