Commit eb57793e authored by miller86's avatar miller86

2.10RC->Trunk: fixing build for mili on OS X

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27559 18c085ea-50e0-402c-830e-de6fd14e8384
parent f15e4c9a
......@@ -51,9 +51,6 @@
#include <ParseTreeNode.h>
class Identifier;
class Token;
// ****************************************************************************
// Class: ExprParseTreeNode
//
......
......@@ -203,6 +203,149 @@ function apply_mili_111_patch
return 0
}
function apply_mili_151_darwin_patch1
{
patch -p0 << \EOF
diff -c mili/src/mesh_u.c mili.patched/src/mesh_u.c
*** mili/src/mesh_u.c 2015-09-22 13:20:42.000000000 -0700
--- mili.patched/src/mesh_u.c 2015-10-19 12:44:52.000000000 -0700
***************
*** 14,20 ****
#include <string.h>
#ifndef _MSC_VER
! #include <values.h>
#include <sys/time.h>
#endif
#include <time.h>
--- 14,20 ----
#include <string.h>
#ifndef _MSC_VER
! #include <limits.h>
#include <sys/time.h>
#endif
#include <time.h>
EOF
if [[ $? != 0 ]] ; then
warn "Unable to apply Darwin patch 1 to Mili 15.1"
return 1
fi
return 0
}
function apply_mili_151_darwin_patch2
{
patch -p0 << \EOF
*** mili/Makefile.Library 2013-12-10 12:55:55.000000000 -0800
--- mili.patched/Makefile.Library 2015-10-20 13:37:27.000000000 -0700
***************
*** 386,393 ****
done
uninstall:
-
- ifneq ($(OS_NAME),Linux)
- include $(OBJS:.o=.d)
- endif
-
--- 386,388 ----
EOF
if [[ $? != 0 ]] ; then
warn "Unable to apply Darwin patch 2 to Mili 15.1"
return 1
fi
return 0
}
function apply_mili_151_darwin_patch3
{
patch -p0 << \EOF
*** mili/src/mili_internal.h 2015-09-17 13:26:32.000000000 -0700
--- mili.patched/src/mili_internal.h 2015-10-20 16:57:21.000000000 -0700
***************
*** 534,542 ****
* Library-private file family management routines and data.
*/
! int host_index;
! int internal_sizes[QTY_PD_ENTRY_TYPES + 1];
! int mili_verbose;
Return_value validate_fam_id( Famid fam_id );
Return_value parse_control_string( char *ctl_str, Mili_family *fam,
Bool_type *p_create );
--- 534,542 ----
* Library-private file family management routines and data.
*/
! extern int host_index;
! extern int internal_sizes[QTY_PD_ENTRY_TYPES + 1];
! extern int mili_verbose;
Return_value validate_fam_id( Famid fam_id );
Return_value parse_control_string( char *ctl_str, Mili_family *fam,
Bool_type *p_create );
***************
*** 604,610 ****
Return_value load_directories( Mili_family *fam );
/* param.c - parameter management routines. */
! char *dtype_names[QTY_PD_ENTRY_TYPES + 1];
Return_value read_scalar( Mili_family *fam, Param_ref *p_pr, void *p_value );
Return_value mili_read_string( Mili_family *fam, Param_ref *p_pr,
char *p_value );
--- 604,610 ----
Return_value load_directories( Mili_family *fam );
/* param.c - parameter management routines. */
! extern char *dtype_names[QTY_PD_ENTRY_TYPES + 1];
Return_value read_scalar( Mili_family *fam, Param_ref *p_pr, void *p_value );
Return_value mili_read_string( Mili_family *fam, Param_ref *p_pr,
char *p_value );
***************
*** 647,653 ****
/* dep.c - routines for handling architecture dependencies. */
Return_value set_default_io_routines( Mili_family *fam );
Return_value set_state_data_io_routines( Mili_family *fam );
! void (*write_funcs[QTY_PD_ENTRY_TYPES + 1])();
/* svar.c - routines for managing state variables. */
Bool_type valid_svar_data( Aggregate_type atype, char *name,
--- 647,653 ----
/* dep.c - routines for handling architecture dependencies. */
Return_value set_default_io_routines( Mili_family *fam );
Return_value set_state_data_io_routines( Mili_family *fam );
! extern void (*write_funcs[QTY_PD_ENTRY_TYPES + 1])();
/* svar.c - routines for managing state variables. */
Bool_type valid_svar_data( Aggregate_type atype, char *name,
***************
*** 740,746 ****
void mili_delete_mo_class_data( void *p_data );
/* wrap_c.c - C-half of FORTRAN-to-C wrappers. */
! int fortran_api;
/* write_db.c */
Return_value
write_state_data( int state_num, Mili_analysis *out_db );
--- 740,746 ----
void mili_delete_mo_class_data( void *p_data );
/* wrap_c.c - C-half of FORTRAN-to-C wrappers. */
! extern int fortran_api;
/* write_db.c */
Return_value
write_state_data( int state_num, Mili_analysis *out_db );
EOF
if [[ $? != 0 ]] ; then
warn "Unable to apply Darwin patch 3 to Mili 15.1"
return 1
fi
return 0
}
function apply_mili_patch
{
if [[ ${MILI_VERSION} == 1.10.0 ]] ; then
......@@ -215,6 +358,19 @@ function apply_mili_patch
if [[ $? != 0 ]] ; then
return 1
fi
elif [[ ${MILI_VERSION} == 15.1 && "$OPSYS" == "Darwin" ]]; then
apply_mili_151_darwin_patch1
if [[ $? != 0 ]] ; then
return 1
fi
apply_mili_151_darwin_patch2
if [[ $? != 0 ]] ; then
return 1
fi
apply_mili_151_darwin_patch3
if [[ $? != 0 ]] ; then
return 1
fi
fi
return 0
......@@ -255,6 +411,7 @@ function build_mili
info "Invoking command to configure Mili"
./configure CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
ac_cv_prog_FOUND_GMAKE=make \
--prefix="$VISITDIR/mili/$MILI_VERSION/$VISITARCH"
if [[ $? != 0 ]] ; then
warn "Mili configure failed. Giving up"
......@@ -315,11 +472,19 @@ function build_mili
if [[ "$DO_STATIC_BUILD" == "no" && "$OPSYS" == "Darwin" ]]; then
INSTALLNAMEPATH="$VISITDIR/mili/${MILI_VERSION}/$VISITARCH/lib"
$C_COMPILER -dynamiclib -o libmili.$SO_EXT *.o \
-Wl,-headerpad_max_install_names \
-Wl,-install_name,$INSTALLNAMEPATH/libmili.${SO_EXT} \
-Wl,-compatibility_version,$MILI_COMPATIBILITY_VERSION \
-Wl,-current_version,$MILI_VERSION
if [[ ${MILI_VERSION} != 15.1 ]] ; then
$C_COMPILER -dynamiclib -o libmili.$SO_EXT *.o \
-Wl,-headerpad_max_install_names \
-Wl,-install_name,$INSTALLNAMEPATH/libmili.${SO_EXT} \
-Wl,-compatibility_version,$MILI_COMPATIBILITY_VERSION \
-Wl,-current_version,$MILI_VERSION
else
$C_COMPILER -dynamiclib -o libmili.$SO_EXT objs_opt/*.o \
-Wl,-headerpad_max_install_names \
-Wl,-install_name,$INSTALLNAMEPATH/libmili.${SO_EXT} \
-Wl,-compatibility_version,$MILI_COMPATIBILITY_VERSION \
-Wl,-current_version,$MILI_VERSION
fi
if [[ $? != 0 ]] ; then
warn "Mili dynamic library build failed. Giving up"
return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment