From: wolf Date: Tue, 17 Dec 2002 16:09:48 +0000 (+0000) Subject: Run ranlib on static archives. MAC OS X wants this, and probably also some very very... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a16ddda4552d445cad673f5c16084ebff4f0b13;p=dealii-svn.git Run ranlib on static archives. MAC OS X wants this, and probably also some very very old other systems. git-svn-id: https://svn.dealii.org/trunk@6840 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index 308c1a0fd6..65e5c8e3e8 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -47,10 +47,12 @@ endif $(LIBDIR)/libbase.a: $(o-files) @echo "=====base=============optimized==$(MT)== Linking library: $(@F)" @ar ru $@ $(o-files) + @$(RANLIB) $@ $(LIBDIR)/libbase.g.a: $(go-files) @echo "=====base=============debug======$(MT)== Linking library: $(@F)" @ar ru $@ $(go-files) + @$(RANLIB) $@ $(LIBDIR)/libbase.so: $(o-files) diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 31759139f7..72cb31d69e 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -23,6 +23,7 @@ CC = @CC@ CXX = @CXX@ GXX-VERSION = @GXX_VERSION@ SHLIBLD = @SHLIBLD@ +RANLIB = @RANLIB@ LDFLAGS = @LDFLAGS@ F77 = @F77@ F77-VERSION = @F77_VERSION@ diff --git a/deal.II/configure b/deal.II/configure index cfbc0a25f5..c1b8fd6f33 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -273,7 +273,7 @@ PACKAGE_BUGREPORT= ac_unique_file="deal.II" ac_subdirs_all="$ac_subdirs_all contrib tests" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD LDFLAGSPIC enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared lib_suffix enablemultigrid TECPLOT_LIBRARY_PATH TECPLOT_INCLUDE_PATH USE_CONTRIB_HSL kdocdir kdocversion docxx PERL subdirs LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD LDFLAGSPIC enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared lib_suffix RANLIB ac_ct_RANLIB enablemultigrid TECPLOT_LIBRARY_PATH TECPLOT_INCLUDE_PATH USE_CONTRIB_HSL kdocdir kdocversion docxx PERL subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -6339,6 +6339,127 @@ fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +# Extract the first word of "$RANLIB", so it can be a program name with args. +set dummy $RANLIB; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RANLIB in + [\\/]* | ?:[\\/]*) + ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RANLIB="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +RANLIB=$ac_cv_path_RANLIB + +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + @@ -7503,6 +7624,8 @@ s,@F77FLAGSPIC@,$F77FLAGSPIC,;t t s,@F77LIBS@,$F77LIBS,;t t s,@enableshared@,$enableshared,;t t s,@lib_suffix@,$lib_suffix,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@enablemultigrid@,$enablemultigrid,;t t s,@TECPLOT_LIBRARY_PATH@,$TECPLOT_LIBRARY_PATH,;t t s,@TECPLOT_INCLUDE_PATH@,$TECPLOT_INCLUDE_PATH,;t t diff --git a/deal.II/configure.in b/deal.II/configure.in index 2c6c17a86e..070fc40408 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -263,6 +263,12 @@ fi AC_SUBST(enableshared) AC_SUBST(lib_suffix) +dnl Also look for RANLIB, since some rather old systems (ah, and MAC OS X!) +dnl still require it for statically linked libraries +AC_PROG_RANLIB +AC_PATH_PROG(RANLIB,$RANLIB) +AC_SUBST(RANLIB) + dnl -------------------------------------------------------------- diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index c841959b61..f7baa92d41 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -92,25 +92,31 @@ $(LIBDIR)/3d/%.$(OBJEXT) : $(LIBDIR)/libdeal_II_1d.g.a: $(go-files-1d) @echo "=====deal.II====1d====debug======$(MT)== Linking library: $(@F)" @ar ru $@ $(go-files-1d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_1d.a: $(o-files-1d) @echo "=====deal.II====1d====optimized==$(MT)== Linking library: $(@F)" @ar ru $@ $(o-files-1d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_2d.g.a: $(go-files-2d) @echo "=====deal.II====2d====debug======$(MT)== Linking library: $(@F)" @ar ru $@ $(go-files-2d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_2d.a: $(o-files-2d) @echo "=====deal.II====2d====optimized==$(MT)== Linking library: $(@F)" @ar ru $@ $(o-files-2d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_3d.g.a: $(go-files-3d) @echo "=====deal.II====3d====debug======$(MT)== Linking library: $(@F)" @ar ru $@ $(go-files-3d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_3d.a: $(o-files-3d) @echo "=====deal.II====3d====optimized==$(MT)== Linking library: $(@F)" @ar ru $@ $(o-files-3d) + @$(RANLIB) $@ $(LIBDIR)/libdeal_II_1d.g.so: $(go-files-1d) diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index 0f2f23aeca..e884462606 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -46,10 +46,12 @@ endif $(LIBDIR)/liblac.a: $(o-files) @echo "=====lac==============optimized==$(MT)== Linking library: $(@F)" @ar ru $@ $(o-files) + @$(RANLIB) $@ $(LIBDIR)/liblac.g.a: $(go-files) @echo "=====lac==============debug======$(MT)== Linking library: $(@F)" @ar ru $@ $(go-files) + @$(RANLIB) $@ $(LIBDIR)/liblac.so: $(o-files)