File: Makeconf.in

package info (click to toggle)
octave2.1 1%3A2.1.73-13
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 37,028 kB
  • ctags: 20,874
  • sloc: cpp: 106,508; fortran: 46,978; ansic: 5,720; sh: 4,800; makefile: 3,186; yacc: 3,132; lex: 2,892; lisp: 1,715; perl: 778; awk: 174; exp: 134
file content (529 lines) | stat: -rw-r--r-- 17,455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# @configure_input@
#
# Common configuration rules for all of octave's Makefiles.
#
# John W. Eaton
# jwe@bevo.che.wisc.edu
# University of Wisconsin-Madison
# Department of Chemical Engineering
 
SHELL = /bin/sh

AWK = @AWK@
export AWK

SED = @SED@
export SED

# A shell command to extract the version number from version.h.
getversion = $(SED) -e '/OCTAVE_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q

# A shell command to extract the API version number from version.h.
getapiversion = $(SED) -e '/OCTAVE_API_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q

# Look for version.h to get version information.
xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h
version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file))))
version := $(shell $(getversion) $(version_file))
apiversion := $(shell $(getapiversion) $(version_file))

#### Start of system configuration section. ####

EXEEXT = @EXEEXT@

BUILD_EXEEXT = @BUILD_EXEEXT@

LEX = @LEX@
LFLAGS = @LFLAGS@
LEXLIB = @LEXLIB@

YACC = @YACC@
YFLAGS = -dv

GPERF = @GPERF@

AR = @AR@
ARFLAGS = @ARFLAGS@ 

TEMPLATE_AR = @TEMPLATE_AR@
TEMPLATE_ARFLAGS = @TEMPLATE_ARFLAGS@

RANLIB = @RANLIB@

LN_S = @LN_S@

RUNTEST = @RUNTEST@

MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf

DEFAULT_PAGER = @DEFAULT_PAGER@

ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@

STATIC_LIBS = @STATIC_LIBS@

SHARED_LIBS = @SHARED_LIBS@
SHLEXT = @SHLEXT@
SHLEXT_VER = @SHLEXT_VER@
SHLLIB = @SHLLIB@
SHLLIB_VER = @SHLLIB_VER@
SHLBIN = @SHLBIN@
SHLBIN_VER = @SHLBIN_VER@
SHLLINKEXT=

LIBEXT = a

# Fortran to C translator and associated flags.

F2C = @F2C@
F2CFLAGS = @F2CFLAGS@

# Fortran compiler flags.

FC = @FC@
F77 = @F77@
FFLAGS = @FFLAGS@
FPICFLAG = @FPICFLAG@
ALL_FFLAGS = $(FFLAGS)

# cc and associated flags.

DLFCN_INCFLAGS = @DLFCN_INCFLAGS@

# Clean up INCFLAGS a bit if we are not compiling in a separate
# directory.
ifeq ($(srcdir),.)
  TMP_IF_1 = -I.
else
  TMP_IF_1 = -I. -I$(srcdir)
endif
ifeq ($(TOPDIR),$(top_srcdir))
  TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src \
	-I$(TOPDIR)/libcruft/misc
else
  TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src \
	-I$(TOPDIR)/libcruft/misc -I$(top_srcdir) \
	-I$(top_srcdir)/liboctave -I$(top_srcdir)/src \
	-I$(top_srcdir)/libcruft/misc
endif
INCFLAGS = $(TMP_IF_1) $(TMP_IF_2) $(DLFCN_INCFLAGS)

LIBFLAGS = -L$(TOPDIR)

DEFS = @DEFS@

UGLY_DEFS = @UGLY_DEFS@

CC = @CC@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
CPICFLAG = @CPICFLAG@
XTRA_CFLAGS = @XTRA_CFLAGS@
WARN_CFLAGS = @WARN_CFLAGS@
ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)
BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)

BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@

DEPEND_FLAGS = @DEPEND_FLAGS@
DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@

CXX = @CXX@
CXX_VERSION = @CXX_VERSION@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CXXPICFLAG = @CXXPICFLAG@
XTRA_CXXFLAGS = @XTRA_CXXFLAGS@
WARN_CXXFLAGS = @WARN_CXXFLAGS@
ALL_CXXFLAGS = \
  $(INCFLAGS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS)
BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS)

BUILD_CXX = @BUILD_CXX@
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@

CPPFLAGS = @CPPFLAGS@

LD_CXX = @LD_CXX@
LDFLAGS = @LDFLAGS@
LD_STATIC_FLAG = @LD_STATIC_FLAG@
ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS)

BUILD_LDFLAGS = @BUILD_LDFLAGS@

SH_LD = @SH_LD@
SH_LDFLAGS = @SH_LDFLAGS@

DL_LD = @DL_LD@
DL_LDFLAGS = @DL_LDFLAGS@

SONAME_FLAGS = @SONAME_FLAGS@

RDYNAMIC_FLAG = @RDYNAMIC_FLAG@

RLD_FLAG = @RLD_FLAG@

FLIBS = @FLIBS@

LIBDLFCN = @LIBDLFCN@
LIBPLPLOT = @LIBPLPLOT@
LIBOCTINTERP = @LIBOCTINTERP@
LIBOCTAVE = @LIBOCTAVE@
LIBCRUFT = @LIBCRUFT@
LIBREADLINE = @LIBREADLINE@
TERMLIBS = @TERMLIBS@

BLAS_LIBS = @BLAS_LIBS@
FFTW_LIBS = @FFTW_LIBS@
LIBS = @LIBS@

# The arguments passed to configure.
config_opts = @config_opts@

# ==================== Where To Install Things ====================

# The default location for installation.  Everything is placed in
# subdirectories of this directory.  The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them.  This defaults to /usr/local.
prefix = @prefix@

# Like `prefix', but used for architecture-specific files.
exec_prefix = @exec_prefix@

# Where to install Octave and other binaries that people will want to
# run directly.
bindir = @bindir@

# Normally the directory for installing executables that system
# administrators run.  This is the same as libexecdir on Cygwin systems.
sbindir = @sbindir@

# Where to install architecture-independent data files.  ${fcnfiledir}
# and ${localfcnfiledir} are subdirectories of this.
datadir = @datadir@

libdir = @libdir@

# Where to install and expect libraries like libcruft.a, liboctave.a,
# and other architecture-dependent data.
octlibdir = @octlibdir@

# Where to install and expect executable programs to be run by Octave
# rather than directly by users.
libexecdir = @libexecdir@

# The prefix for Octave's include file directory.  The default is
# ${prefix}/include
includedir = @includedir@

# Where to install Octave's man pages, and what extension they should
# have.  The default is ${prefix}/man/man1
mandir = @mandir@
man1dir = @man1dir@
man1ext = @man1ext@

# Where to install and expect the info files describing Octave..
infodir = @infodir@

# The fill path to the default info file.
infofile = @infofile@

# ==================== Octave-specific directories ====================

# These variables hold the values specific to Octave.  They are
# based on the values of the standard Make variables above.

# Where to install Octave's include files (they will actually be
# installed in a subdirectory called octave).  The default is
# ${includedir}/octave-${version}
octincludedir = @octincludedir@

# Where to install the function file distributed with
# Octave.  This includes the Octave version, so that the
# function files for different versions of Octave will install
# themselves in separate directories.
fcnfiledir = @fcnfiledir@

# Directories Octave should search for function files specific
# to this site (i.e. customizations), before consulting
# ${fcnfiledir}.  This should be a colon-separated list of
# directories.
localfcnfiledir = @localfcnfiledir@
localapifcnfiledir = @localapifcnfiledir@
localverfcnfiledir = @localverfcnfiledir@
localfcnfilepath = @localfcnfilepath@

# Where to put executables to be run by Octave rather than
# the user.  This path usually includes the Octave version
# and configuration name, so that multiple configurations
# for multiple versions of Octave may be installed at once.
archlibdir = @archlibdir@

# Where to put executables to be run by Octave rather than by the
# user that are specific to this site.
localarchlibdir = @localarchlibdir@
localverarchlibdir = @localverarchlibdir@

# Where to put object files that will by dynamically loaded.
# This path usually includes the Octave version and configuration
# name, so that multiple configurations for multiple versions of
# Octave may be installed at once. 
octfiledir = @octfiledir@

# Directories Octave should search for object files that will be
# dynamically loaded and that are specific to this site
# (i.e. customizations), before consulting ${octfiledir}.  This should
# be a colon-separated list of directories.
localoctfiledir = @localoctfiledir@
localapioctfiledir = @localapioctfiledir@
localveroctfiledir = @localveroctfiledir@
localoctfilepath = @localoctfilepath@

# Where Octave will search to find its function files.  Before
# changing this, check to see if your purpose wouldn't
# better be served by changing localfcnfilepath.  This
# should be a colon-separated list of directories.
fcnfilepath = @fcnfilepath@

# Where Octave will search to find image files.es.
imagedir = @imagedir@
imagepath = @imagepath@

# The type of computer we are running on.
canonical_host_type = @canonical_host_type@

# Where Octave will look for startup files
startupfiledir = ${fcnfiledir}/startup
localstartupfiledir = ${localfcnfiledir}/startup

# The -I flags to use for the mkoctfile script.
ifeq ($(includedir),/usr/include)
 MKOCTFILE_INCFLAGS = \
    -I$(octincludedir) -I$(octincludedir)/octave
else
 MKOCTFILE_INCFLAGS = \
    -I$(octincludedir) -I$(octincludedir)/octave -I$(includedir)
endif

# The -L flags to use for the mkoctfile scrip (for --link-stand-alone)
MKOCTFILE_LFLAGS = -L$(octlibdir)

MKOCTFILE_DL_LDFLAGS = @MKOCTFILE_DL_LDFLAGS@

NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@

# The following pattern rules and the substitution functions require
# GNU make.  If you don't have it, get it!

# Rules for making object files from Fortran source.
#
# If we are using f2c there will be a command for the `%.c : %.f'
# pattern and no command for the `%.o : %.f' pattern, so that make
# will not invoke the fortran compiler by mistake.
#
# If we are not using f2c, it should be ok to have an empty rule for
# the pattern `%.c : %.f', but we don't want to replace make's default
# rule for making object from Fortran source files, so there should be
# no pattern or command for that.

@f77_rules_frag@

# How to make .o files:

%.o : %.c
	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -o $@

%.o : %.cc
	$(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $< -o $@

pic/%.o : %.c
	$(CC) -c $(CPPFLAGS) $(CPICFLAG) $(ALL_CFLAGS) $< -o $@

pic/%.o : %.cc
	$(CXX) -c $(CPPFLAGS) $(CXXPICFLAG) $(ALL_CXXFLAGS) $< -o $@

# Here is a rule for generating dependencies for .cc files:

%.d : %.cc
	@echo making $@ from $<
	@rm -f $@
	@$(CXX) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
	  $(SED) \
              $(DEPEND_EXTRA_SED_PATTERN) \
	      -e 's,^[^:]*/\(.*\.o\):,\1:,' \
	      -e 's,$*\.o,pic/& & $*.df $@,g' > $@-t
	@mv $@-t $@

# And one for .c files.too:

%.d : %.c
	@echo making $@ from $<
	@rm -f $@
	@$(CC) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CFLAGS) $< | \
	  $(SED) \
              $(DEPEND_EXTRA_SED_PATTERN) \
	      -e 's,^[^:]*/\(.*\.o\):,\1:,' \
	      -e 's,$*\.o,pic/& & $@,g' > $@-t
	@mv $@-t $@

define do-subdir-for-command
echo making $@ in $d; $(MAKE) -C $d $@;
endef

define subdir-for-command
$(foreach d, $(SUBDIRS), $(do-subdir-for-command))
endef

# Yes, the second sed command near the end is needed, to avoid limits
# in command lengths for some versions of sed.  UGLY_DEFS is often
# quite large, so it makes sense to split this command there.

define do-subst-config-vals
echo "making $@ from $<"
$(SED) < $< \
  -e "s;%NO_OCT_FILE_STRIP%;${NO_OCT_FILE_STRIP};" \
  -e "s;%OCTAVE_BINDIR%;\"${bindir}\";" \
  -e "s;%OCTAVE_CONF_ALL_CFLAGS%;\"${ALL_CFLAGS}\";" \
  -e "s;%OCTAVE_CONF_ALL_CXXFLAGS%;\"${ALL_CXXFLAGS}\";" \
  -e "s;%OCTAVE_CONF_ALL_FFLAGS%;\"${ALL_FFLAGS}\";" \
  -e "s;%OCTAVE_CONF_ALL_LDFLAGS%;\"${ALL_LDFLAGS}\";" \
  -e "s;%OCTAVE_CONF_AR%;\"${AR}\";" \
  -e "s;%OCTAVE_CONF_ARFLAGS%;\"${ARFLAGS}\";" \
  -e "s;%OCTAVE_CONF_BLAS_LIBS%;\"${BLAS_LIBS}\";" \
  -e "s;%OCTAVE_CONF_CANONICAL_HOST_TYPE%;\"${canonical_host_type}\";" \
  -e "s;%OCTAVE_CONF_CC%;\"${CC}\";" \
  -e "s;%OCTAVE_CONF_CC_VERSION%;\"${CC_VERSION}\";" \
  -e "s;%OCTAVE_CONF_CFLAGS%;\"${CFLAGS}\";" \
  -e "s;%OCTAVE_CONF_CPICFLAG%;\"${CPICFLAG}\";" \
  -e "s;%OCTAVE_CONF_CPPFLAGS%;\"${CPPFLAGS}\";" \
  -e "s;%OCTAVE_CONF_CXX%;\"${CXX}\";" \
  -e "s;%OCTAVE_CONF_CXXCPP%;\"${CXXCPP}\";" \
  -e "s;%OCTAVE_CONF_CXXFLAGS%;\"${CXXFLAGS}\";" \
  -e "s;%OCTAVE_CONF_CXXPICFLAG%;\"${CXXPICFLAG}\";" \
  -e "s;%OCTAVE_CONF_CXX_VERSION%;\"${CXX_VERSION}\";" \
  -e "s;%OCTAVE_CONF_DEFAULT_PAGER%;\"${DEFAULT_PAGER}\";" \
  -e "s;%OCTAVE_CONF_DEPEND_FLAGS%;\"${DEPEND_FLAGS}\";" \
  -e "s;%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%;\"${DEPEND_EXTRA_SED_PATTERN}\";" \
  -e "s;%OCTAVE_CONF_DLFCN_INCFLAGS%;\"${DLFCN_INCFLAGS}\";" \
  -e "s;%OCTAVE_CONF_DL_LD%;\"${DL_LD}\";" \
  -e "s;%OCTAVE_CONF_DL_LDFLAGS%;\"${DL_LDFLAGS}\";" \
  -e "s;%OCTAVE_CONF_EXEEXT%;\"${EXEEXT}\";" \
  -e "s;%OCTAVE_CONF_F2C%;\"${F2C}\";" \
  -e "s;%OCTAVE_CONF_F2CFLAGS%;\"${F2CFLAGS}\";" \
  -e "s;%OCTAVE_CONF_F77%;\"${F77}\";" \
  -e "s;%OCTAVE_CONF_FC%;\"${FC}\";" \
  -e "s;%OCTAVE_CONF_FFLAGS%;\"${FFLAGS}\";" \
  -e "s;%OCTAVE_CONF_FFTW_LIBS%;\"${FFTW_LIBS}\";" \
  -e "s;%OCTAVE_CONF_FLIBS%;\"${FLIBS}\";" \
  -e "s;%OCTAVE_CONF_FPICFLAG%;\"${FPICFLAG}\";" \
  -e "s;%OCTAVE_CONF_INCFLAGS%;\"${INCFLAGS}\";" \
  -e "s;%OCTAVE_CONF_LD_CXX%;\"${LD_CXX}\";" \
  -e "s;%OCTAVE_CONF_LDFLAGS%;\"${LDFLAGS}\";" \
  -e "s;%OCTAVE_CONF_LD_STATIC_FLAG%;\"${LD_STATIC_FLAG}\";" \
  -e "s;%OCTAVE_CONF_LEX%;\"${LEX}\";" \
  -e "s;%OCTAVE_CONF_LEXLIB%;\"${LEXLIB}\";" \
  -e "s;%OCTAVE_CONF_LFLAGS%;\"${LFLAGS}\";" \
  -e "s;%OCTAVE_CONF_LIBCRUFT%;\"${LIBCRUFT}\";" \
  -e "s;%OCTAVE_CONF_LIBDLFCN%;\"${LIBDLFCN}\";" \
  -e "s;%OCTAVE_CONF_LIBEXT%;\"${LIBEXT}\";" \
  -e "s;%OCTAVE_CONF_LIBFLAGS%;\"${LIBFLAGS}\";" \
  -e "s;%OCTAVE_CONF_LIBOCTAVE%;\"${LIBOCTAVE}\";" \
  -e "s;%OCTAVE_CONF_LIBOCTINTERP%;\"${LIBOCTINTERP}\";" \
  -e "s;%OCTAVE_CONF_LIBPLPLOT%;\"${LIBPLPLOT}\";" \
  -e "s;%OCTAVE_CONF_LIBREADLINE%;\"${LIBREADLINE}\";" \
  -e "s;%OCTAVE_CONF_LIBS%;\"${LIBS}\";" \
  -e "s;%OCTAVE_CONF_LN_S%;\"${LN_S}\";" \
  -e "s;%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%;\"${MKOCTFILE_DL_LDFLAGS}\";" \
  -e "s;%OCTAVE_CONF_MKOCTFILE_INCFLAGS%;\"${MKOCTFILE_INCFLAGS}\";" \
  -e "s;%OCTAVE_CONF_MKOCTFILE_LFLAGS%;\"${MKOCTFILE_LFLAGS}\";" \
  -e "s;%OCTAVE_CONF_RANLIB%;\"${RANLIB}\";" \
  -e "s;%OCTAVE_CONF_RDYNAMIC_FLAG%;\"${RDYNAMIC_FLAG}\";" \
  -e "s;%OCTAVE_CONF_RLD_FLAG%;\"${RLD_FLAG}\";" \
  -e "s;%OCTAVE_CONF_RUNTEST%;\"${RUNTEST}\";" \
  -e "s;%OCTAVE_CONF_SED%;\"${SED}\";" \
  -e "s;%OCTAVE_CONF_SHARED_LIBS%;\"${SHARED_LIBS}\";" \
  -e "s;%OCTAVE_CONF_SHLEXT%;\"${SHLEXT}\";" \
  -e "s;%OCTAVE_CONF_SHLLINKEXT%;\"${SHLLINKEXT}\";" \
  -e "s;%OCTAVE_CONF_SHLEXT_VER%;\"${SHLEXT_VER}\";" \
  -e "s;%OCTAVE_CONF_SH_LD%;\"${SH_LD}\";" \
  -e "s;%OCTAVE_CONF_SH_LDFLAGS%;\"${SH_LDFLAGS}\";" \
  -e "s;%OCTAVE_CONF_SONAME_FLAGS%;\"${SONAME_FLAGS}\";" \
  -e "s;%OCTAVE_CONF_STATIC_LIBS%;\"${STATIC_LIBS}\";" \
  -e "s;%OCTAVE_CONF_UGLY_DEFS%;\"${UGLY_DEFS}\";" \
  -e "s;%OCTAVE_CONF_VERSION%;\"${version}\";" \
  -e "s;%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%;\"${ENABLE_DYNAMIC_LINKING}\";" \
  -e "s;%OCTAVE_CONF_XTRA_CFLAGS%;\"${XTRA_CFLAGS}\";" \
  -e "s;%OCTAVE_CONF_XTRA_CXXFLAGS%;\"${XTRA_CXXFLAGS}\";" \
  -e "s;%OCTAVE_CONF_YACC%;\"${YACC}\";" \
  -e "s;%OCTAVE_CONF_YFLAGS%;\"${YFLAGS}\";" \
  -e "s;%OCTAVE_CONF_config_opts%;\"${config_opts}\";" | \
  $(SED)  -e "s;%OCTAVE_CONF_DEFS%;\"${UGLY_DEFS}\";" > $@-t
$(top_srcdir)/move-if-change $@-t $@
endef

define do-subst-default-vals
echo "making $@ from $<"
$(SED) < $< > $@-t \
  -e "s;%OCTAVE_ARCHLIBDIR%;\"${archlibdir}\";" \
  -e "s;%OCTAVE_BINDIR%;\"${bindir}\";" \
  -e "s;%OCTAVE_CANONICAL_HOST_TYPE%;\"${canonical_host_type}\";" \
  -e "s;%OCTAVE_DATADIR%;\"${datadir}\";" \
  -e "s;%OCTAVE_DEFAULT_PAGER%;\"${DEFAULT_PAGER}\";" \
  -e "s;%OCTAVE_EXEC_PREFIX%;\"${exec_prefix}\";" \
  -e "s;%OCTAVE_FCNFILEDIR%;\"${fcnfiledir}\";" \
  -e "s;%OCTAVE_FCNFILEPATH%;\"${fcnfilepath}\";" \
  -e "s;%OCTAVE_IMAGEDIR%;\"${imagedir}\";" \
  -e "s;%OCTAVE_IMAGEPATH%;\"${imagepath}\";" \
  -e "s;%OCTAVE_INCLUDEDIR%;\"${includedir}\";" \
  -e "s;%OCTAVE_INFODIR%;\"${infodir}\";" \
  -e "s;%OCTAVE_INFOFILE%;\"${infofile}\";" \
  -e "s;%OCTAVE_LIBDIR%;\"${libdir}\";" \
  -e "s;%OCTAVE_LIBEXECDIR%;\"${libexecdir}\";" \
  -e "s;%OCTAVE_LOCALAPIFCNFILEDIR%;\"${localapifcnfiledir}\";" \
  -e "s;%OCTAVE_LOCALAPIOCTFILEDIR%;\"${localapioctfiledir}\";" \
  -e "s;%OCTAVE_LOCALARCHLIBDIR%;\"${localarchlibdir}\";" \
  -e "s;%OCTAVE_LOCALFCNFILEDIR%;\"${localfcnfiledir}\";" \
  -e "s;%OCTAVE_LOCALFCNFILEPATH%;\"${localfcnfilepath}\";" \
  -e "s;%OCTAVE_LOCALOCTFILEDIR%;\"${localoctfiledir}\";" \
  -e "s;%OCTAVE_LOCALOCTFILEPATH%;\"${localoctfilepath}\";" \
  -e "s;%OCTAVE_LOCALSTARTUPFILEDIR%;\"${localstartupfiledir}\";" \
  -e "s;%OCTAVE_LOCALVERARCHLIBDIR%;\"${localverarchlibdir}\";" \
  -e "s;%OCTAVE_LOCALVERFCNFILEDIR%;\"${localverfcnfiledir}\";" \
  -e "s;%OCTAVE_LOCALVEROCTFILEDIR%;\"${localveroctfiledir}\";" \
  -e "s;%OCTAVE_MAN1DIR%;\"${man1dir}\";" \
  -e "s;%OCTAVE_MAN1EXT%;\"${man1ext}\";" \
  -e "s;%OCTAVE_MANDIR%;\"${mandir}\";" \
  -e "s;%OCTAVE_OCTFILEDIR%;\"${octfiledir}\";" \
  -e "s;%OCTAVE_OCTINCLUDEDIR%;\"${octincludedir}\";" \
  -e "s;%OCTAVE_OCTLIBDIR%;\"${octlibdir}\";" \
  -e "s;%OCTAVE_STARTUPFILEDIR%;\"${startupfiledir}\";" \
  -e "s;%OCTAVE_PREFIX%;\"${prefix}\";" \
  -e "s;%OCTAVE_API_VERSION%;\"${apiversion}\";" \
  -e "s;%OCTAVE_VERSION%;\"${version}\";"
$(top_srcdir)/move-if-change $@-t $@
endef

define do-script-install
$(top_srcdir)/mkinstalldirs \
  $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir))
for f in $(FCN_FILES_NO_DIR); do \
  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
done
$(top_srcdir)/mkpkgadd $(DESTDIR)$(fcnfiledir)/$(script_sub_dir) > $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t
if [ -n "`cat $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t`" ]; then \
  mv $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD ; \
else \
  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t ; \
fi
endef

define do-script-uninstall
for f in $(FCN_FILES_NO_DIR); \
  do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
done
endef