~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to config/cs_config_info.m4

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl----------------------------------------------------------------------------
2
 
dnl   This file is part of the Code_Saturne Kernel, element of the
3
 
dnl   Code_Saturne CFD tool.
4
 
dnl
5
 
dnl   Copyright (C) 2009 EDF S.A., France
6
 
dnl
7
 
dnl   The Code_Saturne Kernel is free software; you can redistribute it
8
 
dnl   and/or modify it under the terms of the GNU General Public License
9
 
dnl   as published by the Free Software Foundation; either version 2 of
10
 
dnl   the License, or (at your option) any later version.
11
 
dnl
12
 
dnl   The Code_Saturne Kernel is distributed in the hope that it will be
13
 
dnl   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
 
dnl   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
dnl   GNU General Public License for more details.
16
 
dnl
17
 
dnl   You should have received a copy of the GNU General Public Licence
18
 
dnl   along with the Code_Saturne Preprocessor; if not, write to the
19
 
dnl   Free Software Foundation, Inc.,
20
 
dnl   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
 
dnl-----------------------------------------------------------------------------
22
 
 
23
 
# CS_AC_CONFIG_INFO_INIT([OUTPUT FILE NAME])
24
 
#-----------------------
25
 
# Write main config info file header.
26
 
 
27
 
AC_DEFUN([CS_AC_CONFIG_INFO_INIT], [
28
 
 
29
 
# First arg is output file name
30
 
if test "$1" = "" ; then
31
 
  cs_ac_config_info="cs-config"
32
 
else
33
 
  cs_ac_config_info=$1
34
 
fi
35
 
 
36
 
outfile="$cs_ac_config_info"-tmp
37
 
 
38
 
rm -f $outfile
39
 
 
40
 
AC_MSG_NOTICE([initializing $cs_ac_config_info])
41
 
])
42
 
 
43
 
# CS_AC_CONFIG_INFO_EXTRA([extra config info strings])
44
 
#------------------------
45
 
# Write extra info to config info file header.
46
 
 
47
 
AC_DEFUN([CS_AC_CONFIG_INFO_EXTRA], [
48
 
 
49
 
AC_REQUIRE([CS_AC_CONFIG_INFO_INIT])dnl
50
 
 
51
 
outfile="$cs_ac_config_info"-tmp
52
 
 
53
 
echo "# Configuration:" >> $outfile
54
 
echo "# --------------"    >> $outfile
55
 
echo "$1" >> $outfile
56
 
 
57
 
])
58
 
 
59
 
# CS_AC_CONFIG_INFO_CC([version], [version_full])
60
 
#---------------------
61
 
# Write available compiler info to config info file header.
62
 
 
63
 
AC_DEFUN([CS_AC_CONFIG_INFO_CC], [
64
 
 
65
 
AC_REQUIRE([CS_AC_CONFIG_INFO_INIT])dnl
66
 
 
67
 
outfile="$cs_ac_config_info"-tmp
68
 
 
69
 
if test "$1" != "" -o "$2" != "" ; then
70
 
  echo "" >> $outfile
71
 
  echo "# C compiler used for build: $1" >> $outfile
72
 
  echo "# --------------------------"    >> $outfile
73
 
  if test "$2" != "" ; then
74
 
    echo "$2" | sed 's/^/# /' >> $outfile
75
 
  fi
76
 
else
77
 
  AC_MSG_NOTICE([C compiler version info unavailable for configuration file])
78
 
fi
79
 
])
80
 
 
81
 
# CS_AC_CONFIG_INFO_FC([version], [version_full])
82
 
#---------------------
83
 
# Write available compiler info to config info file header.
84
 
 
85
 
AC_DEFUN([CS_AC_CONFIG_INFO_FC], [
86
 
 
87
 
AC_REQUIRE([CS_AC_CONFIG_INFO_INIT])dnl
88
 
 
89
 
outfile="$cs_ac_config_info"-tmp
90
 
 
91
 
if test "$1" != "" -o "$2" != "" ; then
92
 
  echo "" >> $outfile
93
 
  echo "# Fortran compiler used for build: $1" >> $outfile
94
 
  echo "# --------------------------------"    >> $outfile
95
 
  if test "$2" != "" ; then
96
 
    echo "$2" | sed 's/^/# /' >> $outfile
97
 
  fi
98
 
else
99
 
  AC_MSG_NOTICE([Fortran compiler version info unavailable for configuration file])
100
 
fi
101
 
])
102
 
 
103
 
# CS_AC_CONFIG_INFO_FINALIZE
104
 
#---------------------------
105
 
# Write main config info file body (script part).
106
 
 
107
 
AC_DEFUN([CS_AC_CONFIG_INFO_FINALIZE], [
108
 
 
109
 
AC_REQUIRE([CS_AC_CONFIG_INFO_INIT])dnl
110
 
 
111
 
outfile="$cs_ac_config_info"-tmp
112
 
 
113
 
AC_MSG_NOTICE([closing $cs_ac_config_info])
114
 
 
115
 
diff $outfile $cs_ac_config_info > /dev/null 2>&1
116
 
if test $? -eq 0 ; then
117
 
  AC_MSG_NOTICE([$cs_ac_config_info is unchanged])
118
 
  rm -f $outfile
119
 
else
120
 
  mv $outfile $cs_ac_config_info
121
 
  chmod +x $cs_ac_config_info
122
 
fi
123
 
 
124
 
])dnl
125