~ubuntu-branches/debian/stretch/tcl-fitstcl/stretch

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2015-06-10 17:35:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150610173543-37jifpt0bjuocrr0
Tags: 2.4-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
AC_INIT
10
10
AC_CONFIG_SRCDIR([Makefile.in])
11
 
AC_REVISION($Revision: 1.16 $)
 
11
AC_REVISION($Revision: 1.19 $)
12
12
AC_PREREQ(2.59)
13
13
 
14
14
if test $cache_file = ./config.cache; then
15
15
  cache_file=`pwd`/config.cache
16
16
fi
17
17
 
 
18
# Tcl:
 
19
#-------------------------------------------
18
20
AC_ARG_WITH(
19
21
  tcl,
20
22
  [ --with-tcl Path to tcl library ],
25
27
  [ --with-tcl-includes Path to tcl include files ],
26
28
  TCL_INCLUDES=$withval
27
29
)
 
30
AC_SUBST(TCL_PATH)
28
31
# Make sure we have tcl.h before proceeding:
29
32
#-------------------------------------------
30
33
AC_MSG_CHECKING([for tcl header file])
38
41
done
39
42
if test -z "$TCL_INC_PATH"; then
40
43
    AC_MSG_RESULT([no])
41
 
    AC_MSG_ERROR(Can't find Tcl header.  Use --with-tcl-includes to specify the location of tcl.h on your system.)
 
44
    AC_MSG_ERROR(Cannot find Tcl header. Use --with-tcl-includes to specify the location of tcl.h on your system.)
42
45
fi
43
 
#-------------------------------------------
44
 
AC_ARG_WITH(
45
 
  tk,
46
 
  [ --with-tk Path to tk library ],
47
 
  TK_PATH=$withval
48
 
)
49
 
AC_ARG_WITH(
50
 
  tk-includes,
51
 
  [ --with-tk-includes Path to tk include files ],
52
 
  TK_INC_PATH=$withval
53
 
)
54
 
AC_ARG_WITH(
55
 
  itcl,
56
 
  [ --with-itcl Path to itcl source ],
57
 
  ITCL_PATH=$withval
58
 
)
59
 
# Make sure we have cfitsio before proceeding:
60
 
#-------------------------------------------
 
46
AC_SUBST(TCL_INC_PATH)
 
47
 
61
48
#-------------------------------------------
62
49
AC_ARG_ENABLE(
63
50
  shared,
71
58
  [ --enable-static Produce static binaries ],
72
59
  [ if test $enableval = yes; then lhea_shared=no; fi ]
73
60
)
74
 
changequote(,)
75
 
TCL_LIB=`echo $TCL_PATH | sed 's:.*tcl8:tcl8:' | sed 's:.[0-9]/unix$::'`
76
 
TK_LIB=`echo $TK_PATH | sed 's:.*tk8:tk8:' | sed 's:.[0-9]/unix$::'`
77
 
changequote([,])
78
 
AC_SUBST(TCL_LIB)
79
 
AC_SUBST(TK_LIB)
80
61
 
81
62
if test $lhea_shared = yes; then
82
63
  C_LIB_OPTION=shared
106
87
      BINDIR=CYGWIN32_`$UNAME -a 2> /dev/null | awk '{ print $4 }'`
107
88
      lhea_machine=
108
89
      BIN_EXT=".exe"
109
 
      EXT=lnx
110
 
      ;;
111
 
    IRIX*)
112
 
      AC_MSG_WARN(IRIX support is marginal)
113
 
      EXT=sgi
114
 
      ;;
115
 
    HP-UX*)
116
 
      AC_MSG_WARN(HP-UX support is marginal)
117
 
      EXT=hpu
118
 
      lhea_machine=`$UNAME -m 2> /dev/null | tr '/' ' ' | awk '{ print $2 }'`
 
90
      EXT=win
119
91
      ;;
120
92
    Linux*|kFreeBSD*|GNU*)
121
93
      EXT=lnx
122
94
      ;;
123
 
    OSF1*)
124
 
      EXT=osf
125
 
      ;;
126
 
    SunOS_4*)
127
 
      AC_MSG_WARN(SunOS 4.x is not supported!)
128
 
      AC_MSG_WARN(PROCEED AT YOUR OWN RISK!)
129
 
      EXT=sun
130
 
      lhea_machine=sparc
 
95
    Darwin*)
 
96
      EXT=darwin
 
97
      lhea_machine=`$UNAME -p`
131
98
      ;;
132
99
    SunOS_5*)
133
100
      EXT=sol
134
101
      lhea_machine=`$UNAME -p`
135
102
      ;;
136
 
    Darwin_*)
137
 
      EXT=darwin
138
 
      lhea_machine=`$UNAME -p`
139
 
      ;;
140
103
    *)
141
104
      AC_MSG_ERROR(Unable to recognize your system. Please make sure this platform is supported.)
142
105
      ;;
162
125
if test "$cross_compiling" = yes; then
163
126
  AC_MSG_WARN(Cannot run a simple C executable on your system:)
164
127
  AC_MSG_WARN(There may be something wrong with your compiler,)
165
 
  AC_MSG_WARN(or perhaps you're trying to cross-compile?)
 
128
  AC_MSG_WARN(or perhaps you are trying to cross-compile?)
166
129
  AC_MSG_WARN(Cross-compiling is not supported within HEAsoft.)
167
130
  AC_MSG_WARN(Please make sure your compiler is working.)
168
131
  AC_MSG_WARN(Contact the FTOOLS help desk for further assistance.)
176
139
if test $EXT = darwin; then
177
140
  RANLIB="$RANLIB -cs"
178
141
fi
179
 
# RANLIB on IRIX is flaky
180
 
if test $EXT = sgi; then
181
 
  RANLIB=:
182
 
fi
183
142
 
184
143
#-------------------------------------------------------------------------------
185
144
 
192
151
XINCLUDES=
193
152
 
194
153
# socket and nsl libraries -- only if needed
195
 
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
196
 
AC_CHECK_FUNCS(
197
 
  connect accept,
198
 
  ,
199
 
  AC_CHECK_LIB(socket, main, , , [ $XLIBS ])
200
 
)
 
154
AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname)])
 
155
AC_CHECK_FUNCS(connect accept, [], [AC_CHECK_LIB(socket, main, , , [ $XLIBS ])])
201
156
 
 
157
# Prepend the standard location X11 bin directory (if it exists) to PATH
 
158
# to assist AC_PATH_X in finding headers & libraries:
 
159
if test -d /usr/X11R6/bin; then
 
160
  if test "x$PATH" != x; then
 
161
    PATH=$PATH:/usr/X11R6/bin
 
162
  else
 
163
    PATH=/usr/X11R6/bin
 
164
  fi
 
165
  export PATH
 
166
fi
202
167
AC_PATH_X
 
168
 
203
169
if test "x$no_x" != xyes; then
204
170
  USE_X=yes
205
171
  no_x=no
259
225
    ;;
260
226
  lnx)
261
227
    ;;
262
 
  osf)
263
 
    changequote(,)
264
 
    if test $GCC = yes; then
265
 
      # Remove optimization on DEC systems
266
 
      CFLAGS=`echo $CFLAGS | sed 's:-O[0-9]* *::g'`
267
 
    else
268
 
      # Standard DEC cc behavior is *STILL* K&R -- force ANSI compliance
269
 
      CFLAGS="$CFLAGS -std1 -Dunix"
270
 
    fi
271
 
    changequote([,])
272
 
    ;;
273
 
  sgi)
274
 
    AC_DEFINE(HAVE_POSIX_SIGNALS)
275
 
    ;;
276
228
  sol)
277
229
    AC_DEFINE(HAVE_POSIX_SIGNALS)
278
230
    ;;
279
231
  *)
280
232
    ;;
281
233
esac
282
 
# Remove optimization on all systems for all older gcc
283
 
if test $GCC = yes; then
284
 
  if test `$CC -v 2> /dev/null | grep -c 'version 2\.[45678]'` -ne 0; then
285
 
    CFLAGS=`echo $CFLAGS | sed 's:-O[0-9]* *::g'`
286
 
  fi
287
 
fi
288
234
#-------------------------------------------------------------------------------
289
235
 
290
236
# Shared library section
302
248
      lhea_shlib_cflags='-fPIC -fno-common'
303
249
      lhea_shlib_fflags='-fPIC -fno-common'
304
250
      ;;
305
 
    hpu)
306
 
      SHLIB_LD="ld -b"
307
 
      SHLIB_LD_LIBS='${LIBS}'
308
 
      SHLIB_SUFFIX=".sl"
309
 
      ;;
310
251
    lnx)
311
252
      SHLIB_LD=":"
312
253
      ;;
313
 
    osf)
314
 
      SHLIB_LD="ld -shared -expect_unresolved '*'"
315
 
      ;;
316
254
    sol)
317
255
      SHLIB_LD="/usr/ccs/bin/ld -G"
318
256
      SHLIB_LD_LIBS='${LIBS}'
319
257
      lhea_shlib_cflags="-KPIC"
320
258
      lhea_shlib_fflags="-KPIC"
321
259
      ;;
322
 
    sgi)
323
 
      SHLIB_LD="ld -shared -rdata_shared"
324
 
      ;;
325
260
    win)
326
261
      SHLIB_LD="$CC -shared"
327
262
      SHLIB_SUFFIX=".dll"
356
291
AC_CHECK_FUNCS(getcwd socket strcspn strspn strstr strtod strtol)
357
292
#-------------------------------------------------------------------------------
358
293
 
359
 
AC_SUBST(TCL_PATH)
360
 
AC_SUBST(TCL_INC_PATH)
361
 
AC_SUBST(ITCL_PATH)
362
 
AC_SUBST(TK_PATH)
363
 
AC_SUBST(TK_INC_PATH)
 
294
# Construct TCL_LIB:
 
295
#-------------------------------------------------------------------------------
 
296
for tclversion in 8 8.5 8.4; do
 
297
   if test -e "$TCL_PATH/libtcl${tclversion}${SHLIB_SUFFIX}"; then
 
298
     TCL_LIB="tcl${tclversion}"
 
299
   fi
 
300
done
 
301
AC_SUBST(TCL_LIB)
364
302
 
365
303
AC_CONFIG_FILES([Makefile])
366
304
AC_OUTPUT