Changeset 4011


Ignore:
Timestamp:
Sep 12, 2019 10:58:39 AM (4 weeks ago)
Author:
stefan
Message:

create and install own version of mumps_compat.h

  • so we can pass on MUMPS_CALL better
  • need also config.h.in, otherwise autoheader overwrites mumps_compat.h.in
Location:
ThirdParty/Mumps/branches/mumps5
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/branches/mumps5/Makefile.am

    r4005 r4011  
    498498CLEANFILES = *.mod
    499499
    500 # Reset DEFS to that they don't show up for the Fortran compiler
    501 DEFS =
    502500CFLAGS += $(MY_DEFS) $(MUMPS_CFLAGS)
    503501FCFLAGS += $(MY_FDEFS)
     
    511509thirdpartyinclude_HEADERS = \
    512510  MUMPS/include/dmumps_c.h \
    513   MUMPS/include/mumps_compat.h \
    514511  MUMPS/include/mumps_c_types.h \
    515   MUMPS/libseq/mumps_mpi.h
     512  MUMPS/libseq/mumps_mpi.h \
     513  mumps_compat.h
    516514
    517515pkgconfiglibdir = $(libdir)/pkgconfig
  • ThirdParty/Mumps/branches/mumps5/Makefile.in

    r4010 r4011  
    105105 configure.lineno config.status.lineno
    106106mkinstalldirs = $(install_sh) -d
     107CONFIG_HEADER = config.h mumps_compat.h
    107108CONFIG_CLEAN_FILES = coinmumps.pc
    108109CONFIG_CLEAN_VPATH_FILES =
     
    327328DATA = $(pkgconfiglib_DATA)
    328329HEADERS = $(thirdpartyinclude_HEADERS)
    329 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
     330am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
     331        $(LISP)config.h.in mumps_compat.h.in
    330332# Read a list of newline-separated strings from the standard input,
    331333# and print each of them once, without duplicates.  Input order is
     
    364366CPPFLAGS = @CPPFLAGS@
    365367CYGPATH_W = @CYGPATH_W@
    366 
    367 # Reset DEFS to that they don't show up for the Fortran compiler
    368 DEFS =
     368DEFS = @DEFS@
    369369DEPDIR = @DEPDIR@
    370370DLLTOOL = @DLLTOOL@
     
    402402MUMPS_CFLAGS = @MUMPS_CFLAGS@
    403403MUMPS_CFLAGS_NOPC = @MUMPS_CFLAGS_NOPC@
    404 MUMPS_EXPORT = @MUMPS_EXPORT@
    405404MUMPS_LFLAGS = @MUMPS_LFLAGS@
    406405MUMPS_LFLAGS_NOPC = @MUMPS_LFLAGS_NOPC@
     
    799798thirdpartyinclude_HEADERS = \
    800799  MUMPS/include/dmumps_c.h \
    801   MUMPS/include/mumps_compat.h \
    802800  MUMPS/include/mumps_c_types.h \
    803   MUMPS/libseq/mumps_mpi.h
     801  MUMPS/libseq/mumps_mpi.h \
     802  mumps_compat.h
    804803
    805804pkgconfiglibdir = $(libdir)/pkgconfig
     
    812811# Files that are generated and should be cleaned with make distclean
    813812DISTCLEANFILES =
    814 all: all-am
     813all: config.h mumps_compat.h
     814        $(MAKE) $(AM_MAKEFLAGS) all-am
    815815
    816816.SUFFIXES:
     
    849849        $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
    850850$(am__aclocal_m4_deps):
     851
     852config.h: stamp-h1
     853        @test -f $@ || rm -f stamp-h1
     854        @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
     855
     856stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
     857        @rm -f stamp-h1
     858        cd $(top_builddir) && $(SHELL) ./config.status config.h
     859$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
     860        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
     861        rm -f stamp-h1
     862        touch $@
     863
     864mumps_compat.h: stamp-h2
     865        @test -f $@ || rm -f stamp-h2
     866        @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2
     867
     868stamp-h2: $(srcdir)/mumps_compat.h.in $(top_builddir)/config.status
     869        @rm -f stamp-h2
     870        cd $(top_builddir) && $(SHELL) ./config.status mumps_compat.h
     871
     872distclean-hdr:
     873        -rm -f config.h stamp-h1 mumps_compat.h stamp-h2
    851874coinmumps.pc: $(top_builddir)/config.status $(srcdir)/coinmumps.pc.in
    852875        cd $(top_builddir) && $(SHELL) ./config.status $@
     
    13881411check-am: all-am
    13891412check: check-am
    1390 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
     1413all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h \
     1414                mumps_compat.h
    13911415installdirs:
    13921416        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfiglibdir)" "$(DESTDIR)$(thirdpartyincludedir)"; do \
     
    14601484        -rm -f Makefile
    14611485distclean-am: clean-am distclean-compile distclean-generic \
    1462         distclean-libtool distclean-tags
     1486        distclean-hdr distclean-libtool distclean-tags
    14631487
    14641488dvi: dvi-am
     
    15471571        uninstall-thirdpartyincludeHEADERS
    15481572
    1549 .MAKE: install-am install-strip
     1573.MAKE: all install-am install-strip
    15501574
    15511575.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
    15521576        check-am clean clean-cscope clean-generic clean-libLTLIBRARIES \
    15531577        clean-libtool cscope cscopelist-am ctags ctags-am distclean \
    1554         distclean-compile distclean-generic distclean-libtool \
    1555         distclean-tags dvi dvi-am html html-am info info-am install \
    1556         install-am install-data install-data-am install-dvi \
    1557         install-dvi-am install-exec install-exec-am install-html \
    1558         install-html-am install-info install-info-am \
     1578        distclean-compile distclean-generic distclean-hdr \
     1579        distclean-libtool distclean-tags dvi dvi-am html html-am info \
     1580        info-am install install-am install-data install-data-am \
     1581        install-dvi install-dvi-am install-exec install-exec-am \
     1582        install-html install-html-am install-info install-info-am \
    15591583        install-libLTLIBRARIES install-man install-pdf install-pdf-am \
    15601584        install-pkgconfiglibDATA install-ps install-ps-am \
  • ThirdParty/Mumps/branches/mumps5/coinmumps.pc.in

    r4008 r4011  
    1010Libs: -L${libdir} -lcoinmumps
    1111Libs.private: @MUMPS_LFLAGS_NOPC@
    12 Cflags: -I${includedir} -DCOIN_USE_MUMPS_MPI_H -DMUMPS_CALL=@MUMPS_EXPORT@
     12Cflags: -I${includedir}
    1313Requires.private: @MUMPS_PCFILES@
  • ThirdParty/Mumps/branches/mumps5/configure

    r4010 r4011  
    644644LTLIBOBJS
    645645LIBOBJS
    646 MUMPS_EXPORT
    647646MUMPS_CFLAGS_NOPC
    648647MUMPS_LFLAGS_NOPC
     
    1849018489
    1849118490
    18492 ac_config_files="$ac_config_files Makefile coinmumps.pc"
    18493 
    18494 
    1849518491
    1849618492   if test "$BUILDTOOLS_DEBUG" = 1 ; then
     
    1854418540
    1854518541
    18546 # libexport_attribute is set by AC_COIN_FINALIZE_FLAGS, either to __declspec(dllimport) or nothing
    18547 # we want to use this to pass on a define for MUMPS_CALL in the .pc files Cflags
    18548 MUMPS_EXPORT="$libexport_attribute"
    18549 
    18550 # and if it is dllimport, then we want dllexport when building Mumps
     18542# if libexport_attribute is set by COIN_FINALIZE_FLAGS to __declspec(dllimport)
     18543# then we want to use MUMPS_CALL=__declspec(dllexport) when building Mumps
     18544# and users should use __declspec(dllimport), but the parenthesis are difficult
     18545# to pass on via compiler flags
     18546# so also create and install our own version of mumps_compat.h instead
    1855118547if test "$libexport_attribute" = "__declspec(dllimport)" ; then
    18552   MY_DEFS="$MY_DEFS -DMUMPS_CALL=__declspec(dllexport)"
    18553 fi
     18548  MY_DEFS="$MY_DEFS -DMUMPS_CALL=\"__declspec(dllexport)\""
     18549fi
     18550
     18551cat >>confdefs.h <<_ACEOF
     18552#define MUMPS_CALL $libexport_attribute
     18553_ACEOF
     18554
    1855418555
    1855518556{ $as_echo "$as_me:${as_lineno-$LINENO}: additional C preprocessor flags: $MY_DEFS" >&5
     
    1855718558{ $as_echo "$as_me:${as_lineno-$LINENO}: additional Fortran preprocessor flags: $MY_FDEFS" >&5
    1855818559$as_echo "$as_me: additional Fortran preprocessor flags: $MY_FDEFS" >&6;}
     18560
     18561ac_config_files="$ac_config_files Makefile coinmumps.pc"
     18562
     18563ac_config_headers="$ac_config_headers config.h mumps_compat.h"
     18564
    1855918565
    1856018566
     
    1864918655test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
    1865018656
    18651 # Transform confdefs.h into DEFS.
    18652 # Protect against shell expansion while executing Makefile rules.
    18653 # Protect against Makefile macro expansion.
    18654 #
    18655 # If the first sed substitution is executed (which looks for macros that
    18656 # take arguments), then branch to the quote section.  Otherwise,
    18657 # look for a macro that doesn't take arguments.
    18658 ac_script='
    18659 :mline
    18660 /\\$/{
    18661  N
    18662  s,\\\n,,
    18663  b mline
    18664 }
    18665 t clear
    18666 :clear
    18667 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
    18668 t quote
    18669 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
    18670 t quote
    18671 b any
    18672 :quote
    18673 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
    18674 s/\[/\\&/g
    18675 s/\]/\\&/g
    18676 s/\$/$$/g
    18677 H
    18678 :any
    18679 ${
    18680         g
    18681         s/^\n//
    18682         s/\n/ /g
    18683         p
    18684 }
    18685 '
    18686 DEFS=`sed -n "$ac_script" confdefs.h`
    18687 
     18657DEFS=-DHAVE_CONFIG_H
    1868818658
    1868918659ac_libobjs=
     
    1916319133esac
    1916419134
     19135case $ac_config_headers in *"
     19136"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
     19137esac
    1916519138
    1916619139
     
    1916819141# Files that config.status was made for.
    1916919142config_files="$ac_config_files"
     19143config_headers="$ac_config_headers"
    1917019144config_commands="$ac_config_commands"
    1917119145
     
    1918919163      --file=FILE[:TEMPLATE]
    1919019164                   instantiate the configuration file FILE
     19165      --header=FILE[:TEMPLATE]
     19166                   instantiate the configuration header FILE
    1919119167
    1919219168Configuration files:
    1919319169$config_files
     19170
     19171Configuration headers:
     19172$config_headers
    1919419173
    1919519174Configuration commands:
     
    1926019239    as_fn_append CONFIG_FILES " '$ac_optarg'"
    1926119240    ac_need_defaults=false;;
    19262   --he | --h |  --help | --hel | -h )
     19241  --header | --heade | --head | --hea )
     19242    $ac_shift
     19243    case $ac_optarg in
     19244    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     19245    esac
     19246    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     19247    ac_need_defaults=false;;
     19248  --he | --h)
     19249    # Conflict between --help and --header
     19250    as_fn_error $? "ambiguous option: \`$1'
     19251Try \`$0 --help' for more information.";;
     19252  --help | --hel | -h )
    1926319253    $as_echo "$ac_cs_usage"; exit ;;
    1926419254  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     
    1971019700    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    1971119701    "coinmumps.pc") CONFIG_FILES="$CONFIG_FILES coinmumps.pc" ;;
     19702    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     19703    "mumps_compat.h") CONFIG_HEADERS="$CONFIG_HEADERS mumps_compat.h" ;;
    1971219704
    1971319705  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
     
    1972219714if $ac_need_defaults; then
    1972319715  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
     19716  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
    1972419717  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
    1972519718fi
     
    1991019903fi # test -n "$CONFIG_FILES"
    1991119904
    19912 
    19913 eval set X "  :F $CONFIG_FILES      :C $CONFIG_COMMANDS"
     19905# Set up the scripts for CONFIG_HEADERS section.
     19906# No need to generate them if there are no CONFIG_HEADERS.
     19907# This happens for instance with `./config.status Makefile'.
     19908if test -n "$CONFIG_HEADERS"; then
     19909cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
     19910BEGIN {
     19911_ACEOF
     19912
     19913# Transform confdefs.h into an awk script `defines.awk', embedded as
     19914# here-document in config.status, that substitutes the proper values into
     19915# config.h.in to produce config.h.
     19916
     19917# Create a delimiter string that does not exist in confdefs.h, to ease
     19918# handling of long lines.
     19919ac_delim='%!_!# '
     19920for ac_last_try in false false :; do
     19921  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
     19922  if test -z "$ac_tt"; then
     19923    break
     19924  elif $ac_last_try; then
     19925    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
     19926  else
     19927    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
     19928  fi
     19929done
     19930
     19931# For the awk script, D is an array of macro values keyed by name,
     19932# likewise P contains macro parameters if any.  Preserve backslash
     19933# newline sequences.
     19934
     19935ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
     19936sed -n '
     19937s/.\{148\}/&'"$ac_delim"'/g
     19938t rset
     19939:rset
     19940s/^[     ]*#[    ]*define[       ][      ]*/ /
     19941t def
     19942d
     19943:def
     19944s/\\$//
     19945t bsnl
     19946s/["\\]/\\&/g
     19947s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
     19948D["\1"]=" \3"/p
     19949s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
     19950d
     19951:bsnl
     19952s/["\\]/\\&/g
     19953s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
     19954D["\1"]=" \3\\\\\\n"\\/p
     19955t cont
     19956s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
     19957t cont
     19958d
     19959:cont
     19960n
     19961s/.\{148\}/&'"$ac_delim"'/g
     19962t clear
     19963:clear
     19964s/\\$//
     19965t bsnlc
     19966s/["\\]/\\&/g; s/^/"/; s/$/"/p
     19967d
     19968:bsnlc
     19969s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
     19970b cont
     19971' <confdefs.h | sed '
     19972s/'"$ac_delim"'/"\\\
     19973"/g' >>$CONFIG_STATUS || ac_write_fail=1
     19974
     19975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     19976  for (key in D) D_is_set[key] = 1
     19977  FS = ""
     19978}
     19979/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
     19980  line = \$ 0
     19981  split(line, arg, " ")
     19982  if (arg[1] == "#") {
     19983    defundef = arg[2]
     19984    mac1 = arg[3]
     19985  } else {
     19986    defundef = substr(arg[1], 2)
     19987    mac1 = arg[2]
     19988  }
     19989  split(mac1, mac2, "(") #)
     19990  macro = mac2[1]
     19991  prefix = substr(line, 1, index(line, defundef) - 1)
     19992  if (D_is_set[macro]) {
     19993    # Preserve the white space surrounding the "#".
     19994    print prefix "define", macro P[macro] D[macro]
     19995    next
     19996  } else {
     19997    # Replace #undef with comments.  This is necessary, for example,
     19998    # in the case of _POSIX_SOURCE, which is predefined and required
     19999    # on some systems where configure will not decide to define it.
     20000    if (defundef == "undef") {
     20001      print "/*", prefix defundef, macro, "*/"
     20002      next
     20003    }
     20004  }
     20005}
     20006{ print }
     20007_ACAWK
     20008_ACEOF
     20009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
     20010  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
     20011fi # test -n "$CONFIG_HEADERS"
     20012
     20013
     20014eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
    1991420015shift
    1991520016for ac_tag
     
    2013020231  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    2013120232 ;;
    20132 
     20233  :H)
     20234  #
     20235  # CONFIG_HEADER
     20236  #
     20237  if test x"$ac_file" != x-; then
     20238    {
     20239      $as_echo "/* $configure_input  */" \
     20240      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
     20241    } >"$ac_tmp/config.h" \
     20242      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     20243    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
     20244      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
     20245$as_echo "$as_me: $ac_file is unchanged" >&6;}
     20246    else
     20247      rm -f "$ac_file"
     20248      mv "$ac_tmp/config.h" "$ac_file" \
     20249        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     20250    fi
     20251  else
     20252    $as_echo "/* $configure_input  */" \
     20253      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
     20254      || as_fn_error $? "could not create -" "$LINENO" 5
     20255  fi
     20256# Compute "$ac_file"'s index in $config_headers.
     20257_am_arg="$ac_file"
     20258_am_stamp_count=1
     20259for _am_header in $config_headers :; do
     20260  case $_am_header in
     20261    $_am_arg | $_am_arg:* )
     20262      break ;;
     20263    * )
     20264      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
     20265  esac
     20266done
     20267echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
     20268$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
     20269         X"$_am_arg" : 'X\(//\)[^/]' \| \
     20270         X"$_am_arg" : 'X\(//\)$' \| \
     20271         X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
     20272$as_echo X"$_am_arg" |
     20273    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
     20274            s//\1/
     20275            q
     20276          }
     20277          /^X\(\/\/\)[^/].*/{
     20278            s//\1/
     20279            q
     20280          }
     20281          /^X\(\/\/\)$/{
     20282            s//\1/
     20283            q
     20284          }
     20285          /^X\(\/\).*/{
     20286            s//\1/
     20287            q
     20288          }
     20289          s/.*/./; q'`/stamp-h$_am_stamp_count
     20290 ;;
    2013320291
    2013420292  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
  • ThirdParty/Mumps/branches/mumps5/configure.ac

    r4010 r4011  
    108108AC_SUBST(MY_FDEFS)
    109109
    110 AC_CONFIG_FILES([Makefile coinmumps.pc])
    111 
    112110AC_COIN_FINALIZE_FLAGS([MUMPS])
    113111
    114 # libexport_attribute is set by AC_COIN_FINALIZE_FLAGS, either to __declspec(dllimport) or nothing
    115 # we want to use this to pass on a define for MUMPS_CALL in the .pc files Cflags
    116 MUMPS_EXPORT="$libexport_attribute"
    117 AC_SUBST(MUMPS_EXPORT)
    118 # and if it is dllimport, then we want dllexport when building Mumps
     112# if libexport_attribute is set by COIN_FINALIZE_FLAGS to __declspec(dllimport)
     113# then we want to use MUMPS_CALL=__declspec(dllexport) when building Mumps
     114# and users should use __declspec(dllimport), but the parenthesis are difficult
     115# to pass on via compiler flags
     116# so also create and install our own version of mumps_compat.h instead
    119117if test "$libexport_attribute" = "__declspec(dllimport)" ; then
    120   MY_DEFS="$MY_DEFS -DMUMPS_CALL=__declspec(dllexport)"
     118  MY_DEFS="$MY_DEFS -DMUMPS_CALL=\"__declspec(dllexport)\""
    121119fi
     120AC_DEFINE_UNQUOTED(MUMPS_CALL, [$libexport_attribute], [Library Visibility Attribute])
    122121
    123122AC_MSG_NOTICE([additional C preprocessor flags: $MY_DEFS])
    124123AC_MSG_NOTICE([additional Fortran preprocessor flags: $MY_FDEFS])
    125124
     125AC_CONFIG_FILES([Makefile coinmumps.pc])
     126AC_CONFIG_HEADER(config.h mumps_compat.h)
     127
    126128AC_COIN_FINALIZE
Note: See TracChangeset for help on using the changeset viewer.