Changeset 26656

Show
Ignore:
Timestamp:
10.01.2013 15:42:38 (6 years ago)
Author:
davidb
Message:

Support for cross-compilation added. In addition to the CrossOS check, this particular set of changes focus on flags that assist cross-compilation with JNI

Location:
main/trunk/greenstone2/common-src/indexers
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mg/configure

    r25169 r26656  
    601601 
    602602ac_subst_vars='LTLIBOBJS 
    603 JNIFLAGS 
     603JNILDFLAGS 
     604JNICFLAGS 
    604605JNISUFFIX 
     606JNIPREFIX 
    605607JNIINC 
    606608LIBOBJS 
     
    39343936        ac_cv_prog_uudecode_base64=yes 
    39353937else 
    3936         echo "configure: 3936: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 
     3938        echo "configure: 3938: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 
    39373939        echo "configure: failed file was:" >&5 
    39383940        cat Test.uue >&5 
     
    40574059CLASS_TEST=Test.class 
    40584060cat << \EOF > $JAVA_TEST 
    4059 /* #line 4059 "configure" */ 
     4061/* #line 4061 "configure" */ 
    40604062public class Test { 
    40614063} 
     
    40964098TEST=Test 
    40974099cat << \EOF > $JAVA_TEST 
    4098 /* [#]line 4098 "configure" */ 
     4100/* [#]line 4100 "configure" */ 
    40994101public class Test { 
    41004102public static void main (String args[]) { 
     
    42414243CLASS_TEST=Test.class 
    42424244cat << \EOF > $JAVA_TEST 
    4243 /* #line 4243 "configure" */ 
     4245/* #line 4245 "configure" */ 
    42444246public class Test { 
    42454247} 
     
    57805782# set defaults 
    57815783JNIINC="" 
     5784JNIPREFIX="lib" 
    57825785JNISUFFIX="so" 
    5783 JNIFLAGS="-shared" 
     5786JNICFLAGS="" 
     5787JNILDFLAGS="-shared" 
    57845788 
    57855789if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then 
     
    57885792  JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ " 
    57895793  JNISUFFIX="jnilib" 
    5790   JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
     5794  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
    57915795fi 
    57925796if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then 
     
    57985802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 
    57995803$as_echo "Linux" >&6; } 
    5800   JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include " 
    5801 fi 
     5804  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/in5Aclude " 
     5805fi 
     5806 
     5807if test "x$crossOS" != "x" ; then 
     5808  if test "$crossOS" = "windows" ; then 
     5809    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include " 
     5810    JNICFLAGS="-Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at" 
     5811    JNIPREFIX="" 
     5812    JNISUFFIX="dll" 
     5813  fi 
     5814fi 
     5815 
     5816 
    58025817 
    58035818 
  • main/trunk/greenstone2/common-src/indexers/mg/configure.in

    r25169 r26656  
    125125# set defaults 
    126126JNIINC="" 
     127JNIPREFIX="lib" 
    127128JNISUFFIX="so" 
    128 JNIFLAGS="-shared" 
     129JNICFLAGS="" 
     130JNILDFLAGS="-shared" 
    129131 
    130132if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then 
     
    132134  JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ " 
    133135  JNISUFFIX="jnilib" 
    134   JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
     136  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
    135137fi 
    136138if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then 
     
    140142if test "`(uname -s) 2> /dev/null`" = 'Linux'; then 
    141143  AC_MSG_RESULT(Linux) 
    142   JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include " 
     144  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/in5Aclude " 
     145fi 
     146 
     147if test "x$crossOS" != "x" ; then 
     148  if test "$crossOS" = "windows" ; then 
     149    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include " 
     150    JNICFLAGS="-Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at" 
     151    JNIPREFIX="" 
     152    JNISUFFIX="dll" 
     153  fi 
    143154fi 
    144155 
    145156AC_SUBST(JNIINC) 
     157AC_SUBST(JNIPREFIX) 
    146158AC_SUBST(JNISUFFIX) 
    147 AC_SUBST(JNIFLAGS) 
     159AC_SUBST(JNICFLAGS) 
     160AC_SUBST(JNILDFLAGS) 
    148161 
    149162fp_WITH_DMALLOC 
  • main/trunk/greenstone2/common-src/indexers/mgpp/configure

    r25170 r26656  
    601601 
    602602ac_subst_vars='LTLIBOBJS 
    603 JNIFLAGS 
     603JNILDFLAGS 
     604JNICFLAGS 
    604605JNISUFFIX 
     606JNIPREFIX 
    605607JNIINC 
    606608LIBOBJS 
     
    41384140        ac_cv_prog_uudecode_base64=yes 
    41394141else 
    4140         echo "configure: 4140: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 
     4142        echo "configure: 4142: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 
    41414143        echo "configure: failed file was:" >&5 
    41424144        cat Test.uue >&5 
     
    42614263CLASS_TEST=Test.class 
    42624264cat << \EOF > $JAVA_TEST 
    4263 /* #line 4263 "configure" */ 
     4265/* #line 4265 "configure" */ 
    42644266public class Test { 
    42654267} 
     
    43004302TEST=Test 
    43014303cat << \EOF > $JAVA_TEST 
    4302 /* [#]line 4302 "configure" */ 
     4304/* [#]line 4304 "configure" */ 
    43034305public class Test { 
    43044306public static void main (String args[]) { 
     
    44454447CLASS_TEST=Test.class 
    44464448cat << \EOF > $JAVA_TEST 
    4447 /* #line 4447 "configure" */ 
     4449/* #line 4449 "configure" */ 
    44484450public class Test { 
    44494451} 
     
    53465348fi 
    53475349 
    5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5 
    5349 $as_echo_n "checking for main in -lstdc++... " >&6; } 
    5350 if ${ac_cv_lib_stdcpp_main+:} false; then : 
    5351   $as_echo_n "(cached) " >&6 
    5352 else 
    5353   ac_check_lib_save_LIBS=$LIBS 
    5354 LIBS="-lstdc++  $LIBS" 
    5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    5356 /* end confdefs.h.  */ 
    5357  
    5358  
    5359 int 
    5360 main () 
    5361 { 
    5362 return main (); 
    5363   ; 
    5364   return 0; 
    5365 } 
    5366 _ACEOF 
    5367 if ac_fn_c_try_link "$LINENO"; then : 
    5368   ac_cv_lib_stdcpp_main=yes 
    5369 else 
    5370   ac_cv_lib_stdcpp_main=no 
    5371 fi 
    5372 rm -f core conftest.err conftest.$ac_objext \ 
    5373     conftest$ac_exeext conftest.$ac_ext 
    5374 LIBS=$ac_check_lib_save_LIBS 
    5375 fi 
    5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5 
    5377 $as_echo "$ac_cv_lib_stdcpp_main" >&6; } 
    5378 if test "x$ac_cv_lib_stdcpp_main" = xyes; then : 
    5379   cat >>confdefs.h <<_ACEOF 
    5380 #define HAVE_LIBSTDC__ 1 
    5381 _ACEOF 
    5382  
    5383   LIBS="-lstdc++ $LIBS" 
    5384  
    5385 fi 
    5386  
    53875350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5 
    53885351$as_echo_n "checking for main in -lcrypt... " >&6; } 
     
    61006063# set defaults 
    61016064JNIINC="" 
     6065JNIPREFIX="lib" 
    61026066JNISUFFIX="so" 
    6103 JNIFLAGS="-shared" 
     6067JNICFLAGS="" 
     6068JNILDFLAGS="-shared" 
    61046069 
    61056070if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then 
     
    61086073  JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ " 
    61096074  JNISUFFIX="jnilib" 
    6110   JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
     6075  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
    61116076fi 
    61126077if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then 
     
    61206085  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include " 
    61216086fi 
     6087 
     6088if test "x$crossOS" != "x" ; then 
     6089  if test "$crossOS" = "windows" ; then 
     6090    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include " 
     6091    JNICFLAGS="-shared -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at" 
     6092    JNIPREFIX="" 
     6093    JNISUFFIX="dll" 
     6094  fi 
     6095fi 
     6096 
     6097 
    61226098 
    61236099 
  • main/trunk/greenstone2/common-src/indexers/mgpp/configure.in

    r25170 r26656  
    119119AC_CHECK_LIB(m, main) 
    120120dnl Replace `main' with a function in -lstdc++: 
    121 AC_CHECK_LIB(stdc++, main) 
     121dnl AC_CHECK_LIB(stdc++, main) 
    122122dnl Replace `main' with a function in -lcrypt: 
    123123AC_CHECK_LIB(crypt, main) 
     
    153153# set defaults 
    154154JNIINC="" 
     155JNIPREFIX="lib" 
    155156JNISUFFIX="so" 
    156 JNIFLAGS="-shared" 
     157JNICFLAGS="" 
     158JNILDFLAGS="-shared" 
    157159 
    158160if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then 
     
    160162  JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ " 
    161163  JNISUFFIX="jnilib" 
    162   JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
     164  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM" 
    163165fi 
    164166if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then 
     
    171173fi 
    172174 
     175if test "x$crossOS" != "x" ; then 
     176  if test "$crossOS" = "windows" ; then 
     177    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include " 
     178    JNICFLAGS="-shared -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at" 
     179    JNIPREFIX="" 
     180    JNISUFFIX="dll" 
     181  fi 
     182fi 
     183 
    173184AC_SUBST(JNIINC) 
     185AC_SUBST(JNIPREFIX) 
    174186AC_SUBST(JNISUFFIX) 
    175 AC_SUBST(JNIFLAGS) 
     187AC_SUBST(JNICFLAGS) 
     188AC_SUBST(JNILDFLAGS) 
    176189 
    177190# *** Custom checking (based on GNU tar configure.in) ***