-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile.config
1383 lines (1277 loc) · 41.6 KB
/
Makefile.config
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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env make
#
# Makefile.config - Calc configuration and compile configuration values
#
# Copyright (C) 2023 Landon Curt Noll
#
# Suggestion: Read the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under
# the terms of version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation.
#
# Calc is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
# Public License for more details.
#
# A copy of version 2.1 of the GNU Lesser General Public License is
# distributed with calc under the filename COPYING-LGPL. You should have
# received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# This calculator first developed by David I. Bell with help/mods from others.
#
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding
# statements to modify, replace or append Makefile
# variables in the Makefile.local file.
# We do not support parallel make of calc. We have found most
# parallel make systems do not get the rule dependency order
# correct, resulting in a failed attempt to compile calc.
#
# If you believe you have a way to get a parallel make of calc
# to work, consider submitting a pull request with a
# proposed change.
#
.NOTPARALLEL:
##############################
# Set the target information #
##############################
# NOTE: You can force a target value by defining target as in:
#
# make ...__optional_arguments_... target=value
#
# Try uname -s if the target was not already set on the make command line
#
ifeq ($(target),)
target=$(shell uname -s 2>/dev/null)
endif # ($(target),)
ifeq ($(arch),)
arch=$(shell uname -p 2>/dev/null)
endif # ($(arch),)
ifeq ($(hardware),)
hardware=$(shell uname -m 2>/dev/null)
endif # ($(hardware),)
ifeq ($(OSNAME),)
OSNAME=$(shell uname -o 2>/dev/null)
endif # ($(OSNAME),)
###################################
# Set the shell used in Makefiles #
###################################
# The shell used by this Makefile
#
# On some systems, /bin/sh is a rather reduced shell with
# deprecated behavior.
#
# If your system has a up to date, bash shell, then
# you may wish to use:
#
# SHELL= bash
#
# On some systems such as macOS, the bash shell is very
# far behind to the point where is cannot be depended on.
# On such systems, the sh may be a much better alternative
# shell for this Makefile to use:
#
# SHELL= sh
#
SHELL= bash
#SHELL= sh
# Darwin shell default
#
ifeq ($(target),Darwin)
SHELL:= /bin/sh
endif # ($(target),Darwin)
# If you are using Cygwin with MinGW64 packages
# then we will also need to use the Cygwin runtime enviroment
# and the calc Cygwin make target.
#
ifeq ($(OSNAME),Cygwin)
target:= Cygwin
endif # ($(OSNAME),Cygwin)
# MSYS2 (MSYS) is a fork of Cygwin
#
ifeq ($(OSNAME),Msys)
target:= Cygwin
endif # ($(OSNAME),Msys)
##############################################################################
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
##############################################################################
# PREFIX - Top level location for calc
#
# The PREFIX is often prepended to paths within calc and calc Makefiles.
#
# Starting with calc v2.13.0.1, nearly all Makefile places that used
# /usr/local now use ${PREFIX}. An exception is the olduninstall rule
# and, of course, this section. :-)
#
# NOTE: The ${PREFIX} is not the same as ${T}. The ${T} specifies
# a top level directory under which calc installs things.
# While usually ${T} is empty, it can be specific path
# as if calc where "chrooted" during an install.
# The ${PREFIX} value, during install, is a path between
# the top level ${T} install directory and the object
# such as an include file.
#
# NOTE: See also, ${T}, below.
#
# There are some paths that do NOT call under ${PREFIX}, such as
# ${CALCPATH}, that include paths not under ${PREFIX}, but those
# too are exceptions to this general rule.
#
# When in doubt, try:
#
# PREFIX= /usr/local
#
PREFIX= /usr/local
#PREFIX= /usr
#PREFIX= /usr/global
# CCBAN is given to ${CC} in order to control if banned.h is in effect.
#
# The banned.h attempts to ban the use of certain dangerous functions
# that, if improperly used, could compromise the computational integrity
# if calculations.
#
# In the case of calc, we are motivated in part by the desire for calc
# to correctly calculate: even during extremely long calculations.
#
# If UNBAN is NOT defined, then calling certain functions
# will result in a call to a non-existent function (link error).
#
# While we do NOT encourage defining UNBAN, there may be
# a system / compiler environment where re-defining a
# function may lead to a fatal compiler complication.
# If that happens, consider compiling as:
#
# make clobber all chk CCBAN=-DUNBAN
#
# as see if this is a work-a-round.
#
# If YOU discover a need for the -DUNBAN work-a-round, PLEASE tell us!
# Please send us a bug report. See the file:
#
# BUGS
#
# or the URL:
#
# http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
#
# for how to send us such a bug report.
#
CCBAN= -UUNBAN
#CCBAN= -DUNBAN
# Determine the type of terminal controls that you want to use
#
# value meaning
# -------- -------
# (nothing) let the Makefile guess at what you need
# -DUSE_TERMIOS use struct termios from <termios.h>
# -DUSE_TERMIO use struct termios from <termio.h>
# -DUSE_SGTTY use struct sgttyb from <sys/ioctl.h>
# -DUSE_NOTHING Windows system, don't use any of them
#
# If in doubt, leave TERMCONTROL empty.
#
TERMCONTROL=
#TERMCONTROL= -DUSE_TERMIOS
#TERMCONTROL= -DUSE_TERMIO
#TERMCONTROL= -DUSE_SGTTY
# If your system does not have a vsnprintf() function, you could be in trouble.
#
# vsnprintf(string, size, format, ap)
#
# This function works like spnrintf except that the 4th arg is a va_list
# strarg (or varargs) list. Some old systems do not have vsnprintf().
# If you do not have vsnprintf(), then calc will try snprintf() and hope
# for the best.
#
# A similar problem occurs if your system does not have a vsnprintf()
# function. This function is like the vsnprintf() function except that
# there is an extra second argument that controls the maximum size
# string that is produced.
#
# If HAVE_VSNPRINTF is empty, this Makefile will run the have_stdvs.c and/or
# have_varvs.c program to determine if vsnprintf() is supported. If
# HAVE_VSNPRINTF is set to -DDONT_HAVE_VSNPRINTF then calc will hope that
# snprintf() will work.
#
# If in doubt, leave HAVE_VSNPRINTF empty.
#
HAVE_VSNPRINTF=
#HAVE_VSNPRINTF= -DDONT_HAVE_VSNPRINTF
# Determine the byte order of your machine
#
# Big Endian: Amdahl, 68k, Pyramid, Mips, Sparc, ...
# Little Endian: Vax, 32k, Spim (Dec Mips), i386, i486, ...
#
# If in doubt, leave CALC_BYTE_ORDER empty. This Makefile will attempt to
# use BYTE_ORDER in <machine/endian.h> or it will attempt to run
# the endian program. If you get syntax errors when you compile,
# try forcing the value to be -DBIG_ENDIAN and run the calc regression
# tests. (see the README.FIRST file) If the calc regression tests fail, do
# a make clobber and try -DCALC_LITTLE_ENDIAN. If that fails, ask a wizard
# for help.
#
CALC_BYTE_ORDER=
#CALC_BYTE_ORDER= -DBIG_ENDIAN
#CALC_BYTE_ORDER= -DLITTLE_ENDIAN
# Determine the number of bits in a byte
#
# If in doubt, leave CALC_CHARBIT empty. This Makefile will run
# the charbits program to determine the length.
#
# In order to avoid make brain damage in some systems, we avoid placing
# a space after the ='s below.
#
CALC_CHARBIT=
#CALC_CHARBIT= 8
# Determine the number of bits in a long
#
# If in doubt, leave LONG_BITS empty. This Makefile will run
# the longbits program to determine the length.
#
# In order to avoid make brain damage in some systems, we avoid placing
# a space after the ='s below.
#
LONG_BITS=
#LONG_BITS= 32
#LONG_BITS= 64
# Determine if we have the ANSI C fgetpos and fsetpos alternate interface
# to the ftell() and fseek() (with whence set to SEEK_SET) functions.
#
# If HAVE_FGETSETPOS is empty, this Makefile will run the have_fpos program
# to determine if there is are fgetpos and fsetpos functions. If HAVE_FGETSETPOS
# is set to -DHAVE_NO_FGETSETPOS, then calc will use ftell() and fseek().
#
# If in doubt, leave HAVE_FGETSETPOS empty and this Makefile will figure it out.
#
HAVE_FGETSETPOS=
#HAVE_FGETSETPOS= -DHAVE_NO_FGETSETPOS
# Determine if we have an __pos element of a file position (fpos_t) structure.
#
# If HAVE_FPOS_POS is empty, this Makefile will run the have_fpos_pos program
# to determine if fpos_t has a __pos structure element. If HAVE_FPOS_POS
# is set to -DHAVE_NO_FPOS_POS, then calc assume there is no __pos element.
#
# If in doubt, leave HAVE_FPOS_POS empty and this Makefile will figure it out.
#
HAVE_FPOS_POS=
#HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS
# Determine the size of the __pos element in fpos_t, if it exists.
#
# If FPOS_POS_BITS is empty, then the Makefile will determine the size of
# the file position value of the __pos element.
#
# If there is no __pos element in fpos_t (say because fpos_t is a scalar),
# leave FPOS_POS_BITS blank.
#
# If in doubt, leave FPOS_POS_BITS empty and this Makefile will figure it out.
#
FPOS_POS_BITS=
#FPOS_POS_BITS= 32
#FPOS_POS_BITS= 64
# Determine the size of a file position value.
#
# If FPOS_BITS is empty, then the Makefile will determine the size of
# the file position value.
#
# If in doubt, leave FPOS_BITS empty and this Makefile will figure it out.
#
FPOS_BITS=
#FPOS_BITS= 32
#FPOS_BITS= 64
# Determine the size of the off_t file offset element
#
# If OFF_T_BITS is empty, then the Makefile will determine the size of
# the file offset value.
#
# If in doubt, leave OFF_T_BITS empty and this Makefile will figure it out.
#
OFF_T_BITS=
#OFF_T_BITS= 32
#OFF_T_BITS= 64
# Determine the size of the dev_t device value
#
# If DEV_BITS is empty, then the Makefile will determine the size of
# the dev_t device value
#
# If in doubt, leave DEV_BITS empty and this Makefile will figure it out.
#
DEV_BITS=
#DEV_BITS= 16
#DEV_BITS= 32
#DEV_BITS= 64
# Determine the size of the ino_t device value
#
# If INODE_BITS is empty, then the Makefile will determine the size of
# the ino_t inode value
#
# If in doubt, leave INODE_BITS empty and this Makefile will figure it out.
#
INODE_BITS=
#INODE_BITS= 16
#INODE_BITS= 32
#INODE_BITS= 64
# Determine if we have an off_t which one can perform arithmetic operations,
# assignments and comparisons. On some systems off_t is some sort of union
# or struct.
#
# If HAVE_OFFSCL is empty, this Makefile will run the have_offscl program
# to determine if off_t is a scalar. If HAVE_OFFSCL is set to the value
# -DOFF_T_NON_SCALAR when calc will assume that off_t some sort of
# union or struct.
#
# If in doubt, leave HAVE_OFFSCL empty and this Makefile will figure it out.
#
HAVE_OFFSCL=
#HAVE_OFFSCL= -DOFF_T_NON_SCALAR
# Determine if we have an fpos_t which one can perform arithmetic operations,
# assignments and comparisons. On some systems fpos_t is some sort of union
# or struct. Some systems do not have an fpos_t and long is as a file
# offset instead.
#
# If HAVE_POSSCL is empty, this Makefile will run the have_offscl program
# to determine if off_t is a scalar, or if there is no off_t and long
# (a scalar) should be used instead. If HAVE_POSSCL is set to the value
# -DFILEPOS_NON_SCALAR when calc will assume that fpos_t exists and is
# some sort of union or struct.
#
# If in doubt, leave HAVE_POSSCL empty and this Makefile will figure it out.
#
HAVE_POSSCL=
#HAVE_POSSCL= -DFILEPOS_NON_SCALAR
# Determine if we have ANSI C const.
#
# If HAVE_CONST is empty, this Makefile will run the have_const program
# to determine if const is supported. If HAVE_CONST is set to -DHAVE_NO_CONST,
# then calc will not use const.
#
# If in doubt, leave HAVE_CONST empty and this Makefile will figure it out.
#
HAVE_CONST=
#HAVE_CONST= -DHAVE_NO_CONST
# Determine if we have uid_t
#
# If HAVE_UID_T is empty, this Makefile will run the have_uid_t program
# to determine if uid_t is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T,
# then calc will treat uid_t as an unsigned short. This only matters if
# $HOME is not set and calc must look up the home directory in /etc/passwd.
#
# If in doubt, leave HAVE_UID_T empty and this Makefile will figure it out.
#
HAVE_UID_T=
#HAVE_UID_T= -DHAVE_NO_UID_T
# Determine if we have a non-NULL user environment external:
#
# extern char **environ; /* user environment */
#
# If HAVE_ENVIRON is empty, this Makefile will run the have_environ program
# to determine if environ exists and is non-NULL. If HAVE_ENVIRON is set
# to -DHAVE_NO_ENVIRON, then calc will assume there is no external environ
# symbol.
#
# If in doubt, leave HAVE_ENVIRON empty and this Makefile will figure it out.
#
HAVE_ENVIRON=
#HAVE_ENVIRON= -DHAVE_NO_ENVIRON
# Determine if we have the arc4random_buf() function
#
# If HAVE_ARC4RANDOM is empty, this Makefile will run the have_arc4random
# program to determine if arc4random_buf() function exists. If
# HAVE_ARC4RANDOM is set to -DHAVE_NO_ARC4RANDOM, then calc will assume
# there is no arc4random_buf() function.
#
# If in doubt, leave HAVE_ARC4RANDOM empty and this Makefile will figure it out.
#
HAVE_ARC4RANDOM=
#HAVE_ARC4RANDOM= -DHAVE_NO_ARC4RANDOM
# Determine if we have memcpy(), memset() and strchr()
#
# If HAVE_NEWSTR is empty, this Makefile will run the have_newstr program
# to determine if memcpy(), memset() and strchr() are supported. If
# HAVE_NEWSTR is set to -DHAVE_NO_NEWSTR, then calc will use bcopy() instead
# of memcpy(), use bfill() instead of memset(), and use index() instead of
# strchr().
#
# If in doubt, leave HAVE_NEWSTR empty and this Makefile will figure it out.
#
HAVE_NEWSTR=
#HAVE_NEWSTR= -DHAVE_NO_NEWSTR
# Determine if we have memmove()
#
# If HAVE_MEMMOVE is empty, this Makefile will run the have_memmv program
# to determine if memmove() is supported. If HAVE_MEMMOVE is set to
# -DHAVE_NO_MEMMOVE, then calc will use internal functions to simulate
# the memory move function that does correct overlapping memory moves.
#
# If in doubt, leave HAVE_MEMMOVE empty and this Makefile will figure it out.
#
HAVE_MEMMOVE=
#HAVE_MEMMOVE= -DHAVE_NO_MEMMOVE
# Determine if we have ustat()
#
# If HAVE_USTAT is empty, this Makefile will run the have_ustat program
# to determine if ustat() is supported. If HAVE_USTAT is set to
# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
# the ustat() function that gets file system statistics.
#
# If in doubt, leave HAVE_USTAT empty and this Makefile will figure it out.
#
HAVE_USTAT=
#HAVE_USTAT= -DHAVE_NO_USTAT
# Determine if we have statfs()
#
# If HAVE_STATFS is empty, this Makefile will run the have_statfs program
# to determine if statfs() is supported. If HAVE_STATFS is set to
# -DHAVE_NO_STATFS, then calc will use internal functions to simulate
# the statfs() function that gets file system statistics.
#
# If in doubt, leave HAVE_STATFS empty and this Makefile will figure it out.
#
HAVE_STATFS=
#HAVE_STATFS= -DHAVE_NO_STATFS
# Determine if we have the <sys/vfs.h> include file.
#
# HAVE_SYS_VFS_H= let the Makefile look for the include file
# HAVE_SYS_VFS_H= YES assume that the include file exists
# HAVE_SYS_VFS_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_SYS_VFS_H empty.
#
HAVE_SYS_VFS_H=
#HAVE_SYS_VFS_H= YES
#HAVE_SYS_VFS_H= NO
# Determine if we have the <sys/param.h> include file.
#
# HAVE_SYS_PARAM_H= let the Makefile look for the include file
# HAVE_SYS_PARAM_H= YES assume that the include file exists
# HAVE_SYS_PARAM_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_SYS_PARAM_H empty.
#
HAVE_SYS_PARAM_H=
#HAVE_SYS_PARAM_H= YES
#HAVE_SYS_PARAM_H= NO
# Determine if we have the <sys/mount.h> include file.
#
# HAVE_SYS_MOUNT_H= let the Makefile look for the include file
# HAVE_SYS_MOUNT_H= YES assume that the include file exists
# HAVE_SYS_MOUNT_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_SYS_MOUNT_H empty.
#
HAVE_SYS_MOUNT_H=
#HAVE_SYS_MOUNT_H= YES
#HAVE_SYS_MOUNT_H= NO
# Determine if we have getsid()
#
# If HAVE_GETSID is empty, this Makefile will run the have_getsid program
# to determine if getsid() is supported. If HAVE_GETSID is set to
# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
# the getsid() function that gets session ID.
#
# If in doubt, leave HAVE_GETSID empty and this Makefile will figure it out.
#
HAVE_GETSID=
#HAVE_GETSID= -DHAVE_NO_GETSID
# Determine if we have getpgid()
#
# If HAVE_GETPGID is empty, this Makefile will run the have_getpgid program
# to determine if getpgid() is supported. If HAVE_GETPGID is set to
# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
# the getpgid() function that sets the process group ID.
#
# If in doubt, leave HAVE_GETPGID empty and this Makefile will figure it out.
#
HAVE_GETPGID=
#HAVE_GETPGID= -DHAVE_NO_GETPGID
# Determine if we have clock_gettime()
#
# If HAVE_GETTIME is empty, this Makefile will run the have_gettime program
# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to
# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
# the clock_gettime() function.
#
# If in doubt, leave HAVE_GETTIME empty and this Makefile will figure it out.
#
HAVE_GETTIME=
#HAVE_GETTIME= -DHAVE_NO_GETTIME
# Determine if we have getprid()
#
# If HAVE_GETPRID is empty, this Makefile will run the have_getprid program
# to determine if getprid() is supported. If HAVE_GETPRID is set to
# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
# the getprid() function.
#
# If in doubt, leave HAVE_GETPRID empty and this Makefile will figure it out.
#
HAVE_GETPRID=
#HAVE_GETPRID= -DHAVE_NO_GETPRID
# Determine if we have the /dev/urandom
#
# HAVE_URANDOM_H= let the Makefile look for /dev/urandom
# HAVE_URANDOM_H= YES assume that /dev/urandom exists
# HAVE_URANDOM_H= NO assume that /dev/urandom does not exist
#
# When in doubt, leave HAVE_URANDOM_H empty.
#
HAVE_URANDOM_H=
#HAVE_URANDOM_H= YES
#HAVE_URANDOM_H= NO
# Determine if we have getrusage()
#
# If HAVE_GETRUSAGE is empty, this Makefile will run the have_rusage program
# to determine if getrusage() is supported. If HAVE_GETRUSAGE is set to
# -DHAVE_NO_GETRUSAGE, then calc will use internal functions to simulate
# the getrusage() function.
#
# If in doubt, leave HAVE_GETRUSAGE empty and this Makefile will figure it out.
#
HAVE_GETRUSAGE=
#HAVE_GETRUSAGE= -DHAVE_NO_GETRUSAGE
# Determine if we have strdup()
#
# If HAVE_STRDUP is empty, this Makefile will run the have_strdup program
# to determine if strdup() is supported. If HAVE_STRDUP is set to
# -DHAVE_NO_STRDUP, then calc will use internal functions to simulate
# the strdup() function.
#
# If in doubt, leave HAVE_STRDUP empty and this Makefile will figure it out.
#
HAVE_STRDUP=
#HAVE_STRDUP= -DHAVE_NO_STRDUP
# Some architectures such as Sparc do not allow one to access 32 bit values
# that are not aligned on a 32 bit boundary.
#
# The Dec Alpha running OSF/1 will produce alignment error messages when
# align32.c tries to figure out if alignment is needed. Use the
# ALIGN32= -DMUST_ALIGN32 to force alignment and avoid such error messages.
#
# ALIGN32= let align32.c figure out if alignment is needed
# ALIGN32= -DMUST_ALIGN32 force 32 bit alignment
# ALIGN32= -UMUST_ALIGN32 allow non-alignment of 32 bit accesses
#
# When in doubt, be safe and pick ALIGN32=-DMUST_ALIGN32.
#
ALIGN32=
#ALIGN32= -DMUST_ALIGN32
#ALIGN32= -UMUST_ALIGN32
# Determine if we have the <stdlib.h> include file.
#
# HAVE_STDLIB_H= let the Makefile look for the include file
# HAVE_STDLIB_H= YES assume that the include file exists
# HAVE_STDLIB_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_STDLIB_H empty.
#
HAVE_STDLIB_H=
#HAVE_STDLIB_H= YES
#HAVE_STDLIB_H= NO
# Determine if we have the <string.h> include file.
#
# HAVE_STRING_H= let the Makefile look for the include file
# HAVE_STRING_H= YES assume that the include file exists
# HAVE_STRING_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_STRING_H empty.
#
HAVE_STRING_H=
#HAVE_STRING_H= YES
#HAVE_STRING_H= NO
# Determine if we have the <times.h> include file.
#
# HAVE_TIMES_H= let the Makefile look for the include file
# HAVE_TIMES_H= YES assume that the include file exists
# HAVE_TIMES_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_TIMES_H empty.
#
HAVE_TIMES_H=
#HAVE_TIMES_H= YES
#HAVE_TIMES_H= NO
# Determine if we have the <sys/times.h> include file.
#
# HAVE_SYS_TIMES_H= let the Makefile look for the include file
# HAVE_SYS_TIMES_H= YES assume that the include file exists
# HAVE_SYS_TIMES_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_SYS_TIMES_H empty.
#
HAVE_SYS_TIMES_H=
#HAVE_SYS_TIMES_H= YES
#HAVE_SYS_TIMES_H= NO
# Determine if we have the <time.h> include file.
#
# HAVE_TIME_H= let the Makefile look for the include file
# HAVE_TIME_H= YES assume that the include file exists
# HAVE_TIME_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_TIME_H empty.
#
HAVE_TIME_H=
#HAVE_TIME_H= YES
#HAVE_TIME_H= NO
# Determine if we have the <sys/time.h> include file.
#
# HAVE_SYS_TIME_H= let the Makefile look for the include file
# HAVE_SYS_TIME_H= YES assume that the include file exists
# HAVE_SYS_TIME_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_SYS_TIME_H empty.
#
HAVE_SYS_TIME_H=
#HAVE_SYS_TIME_H= YES
#HAVE_SYS_TIME_H= NO
# Determine if we have the <unistd.h> include file.
#
# HAVE_UNISTD_H= let the Makefile look for the include file
# HAVE_UNISTD_H= YES assume that the include file exists
# HAVE_UNISTD_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_UNISTD_H empty.
#
HAVE_UNISTD_H=
#HAVE_UNISTD_H= YES
#HAVE_UNISTD_H= NO
# Determine if we have the <limits.h> include file.
#
# HAVE_LIMITS_H= let the Makefile look for the include file
# HAVE_LIMITS_H= YES assume that the include file exists
# HAVE_LIMITS_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_LIMITS_H empty.
#
HAVE_LIMITS_H=
#HAVE_LIMITS_H= YES
#HAVE_LIMITS_H= NO
# Determine if we have the <stdbool.h> include file.
#
# HAVE_STDBOOL_H= let the Makefile look for the include file
# HAVE_STDBOOL_H= YES assume that the include file exists
# HAVE_STDBOOL_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_STDBOOL_H empty.
#
HAVE_STDBOOL_H=
#HAVE_STDBOOL_H= YES
#HAVE_STDBOOL_H= NO
# Determine if we have the <stdint.h> include file.
#
# HAVE_STDINT_H= let the Makefile look for the include file
# HAVE_STDINT_H= YES assume that the include file exists
# HAVE_STDINT_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_STDINT_H empty.
#
HAVE_STDINT_H=
#HAVE_STDINT_H= YES
#HAVE_STDINT_H= NO
# Determine if we have the <inttypes.h> include file.
#
# HAVE_INTTYPES_H= let the Makefile look for the include file
# HAVE_INTTYPES_H= YES assume that the include file exists
# HAVE_INTTYPES_H= NO assume that the include file does not exist
#
# When in doubt, leave HAVE_INTTYPES_H empty.
#
HAVE_INTTYPES_H=
#HAVE_INTTYPES_H= YES
#HAVE_INTTYPES_H= NO
# Determine if our compiler allows the unused attribute
#
# If HAVE_UNUSED is empty, this Makefile will run the have_unused program
# to determine if the unused attribute is supported. If HAVE_UNUSED is set to
# -DHAVE_NO_UNUSED, then the unused attribute will not be used.
#
# If in doubt, leave HAVE_UNUSED empty and this Makefile will figure it out.
#
HAVE_UNUSED=
#HAVE_UNUSED= -DHAVE_NO_UNUSED
# Determine if we allow use of "#pragma GCC poison func_name"
#
# If HAVE_PRAGMA_GCC_POSION is empty, then Makefile will run the
# have_bprag program to determine if the "#pragma GCC poison func_name"
# is supported. If HAVE_PRAGMA_GCC_POSION is set to
# -DHAVE_NO_PRAGMA_GCC_POSION. then the "#pragma GCC poison func_name"
# is not used.
#
# If in doubt, leave HAVE_PRAGMA_GCC_POSION empty and this Makefile
# will figure it out.
#
HAVE_PRAGMA_GCC_POSION=
#HAVE_PRAGMA_GCC_POSION= -DHAVE_NO_PRAGMA_GCC_POSION
# Determine if we have strlcpy()
#
# If HAVE_STRLCPY is empty, this Makefile will run the have_strlcpy program
# to determine if strlcpy() is supported. If HAVE_STRLCPY is set to
# -DHAVE_NO_STRLCPY, then calc will use internal functions to simulate
# the strlcpy() function.
#
# If in doubt, leave HAVE_STRLCPY empty and this Makefile will figure it out.
#
HAVE_STRLCPY=
#HAVE_STRLCPY= -DHAVE_NO_STRLCPY
# Determine if we have strlcat()
#
# If HAVE_STRLCAT is empty, this Makefile will run the have_strlcat program
# to determine if strlcat() is supported. If HAVE_STRLCAT is set to
# -DHAVE_NO_STRLCAT, then calc will use internal functions to simulate
# the strlcat() function.
#
# If in doubt, leave HAVE_STRLCAT empty and this Makefile will figure it out.
#
HAVE_STRLCAT=
#HAVE_STRLCAT= -DHAVE_NO_STRLCAT
# System include files
#
# ${INCDIR} where the system include (.h) files are kept
#
# If in doubt, for non-macOS hosts set:
#
# INCDIR= /usr/include
#
# However, if you are on macOS then set:
#
# INCDIR= ${PREFIX}/include
#
ifeq ($(target),Darwin)
# determine default INCDIR for macOS
#
ifeq ($(arch),powerpc)
# Default location for old systems such as Mac OS X 10.6 Snow Leopard
INCDIR= /usr/include
else # ($(arch),powerpc)
# Modern macOS such as macOS 10.11.6 and later
INCDIR= $(shell xcrun --sdk macosx --show-sdk-path 2>/dev/null)/usr/include
endif # ($(arch),powerpc)
# default INCDIR for non-macOS
#
else # ($(target),Darwin)
INCDIR= /usr/include
#INCDIR= ${PREFIX}/include
#INCDIR= /dev/env/DJDIR/include
endif # ($(target),Darwin)
# Where to install calc related things
#
# ${BINDIR} where to install calc binary files
# ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# ${CALC_INCDIR} where the calc include files are installed
#
# NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the ${T} directory.
#
# NOTE: If you change LIBDIR to a non-standard location, you will need
# to make changes to your execution environment so that executables
# will search LIBDIR when they are resolving dynamic shared libraries.
#
# On OS X, this means you need to export $DYLD_LIBRARY_PATH
# to include the LIBDIR path in the value.
#
# On Linux and BSD, this means you need to export $LD_LIBRARY_PATH
# to include the LIBDIR path in the value.
#
# You might be better off not changing LIBDIR in the first place.
#
# If in doubt, for non-macOS hosts set:
#
# BINDIR= /usr/bin
# LIBDIR= /usr/lib
# CALC_SHAREDIR= /usr/share/calc
# CALC_INCDIR= /usr/include/calc
#
# Or if you prefer everything under /usr/local:
#
# BINDIR= /usr/local/bin
# LIBDIR= /usr/local/lib
# CALC_SHAREDIR= /usr/local/share/calc
# CALC_INCDIR= /usr/local/include/calc
#
# However, if you are on macOS then set:
#
# BINDIR= ${PREFIX}/bin
# LIBDIR= ${PREFIX}/lib
# CALC_SHAREDIR= ${PREFIX}/share/calc
# CALC_INCDIR= ${PREFIX}/include/calc
#
# NOTE: Starting with macOS El Capitan OS X 10.11, root by default
# could not mkdir under system locations, so macOS must now
# use the ${PREFIX} tree.
# defaults for macOS
ifeq ($(target),Darwin)
BINDIR= ${PREFIX}/bin
LIBDIR= ${PREFIX}/lib
CALC_SHAREDIR= ${PREFIX}/share/calc
# defaults for non-macOS
else # ($(target),Darwin)
# default BINDIR for non-macOS
BINDIR= /usr/bin
#BINDIR= ${PREFIX}/bin
#BINDIR= /dev/env/DJDIR/bin
# default LIBDIR for non-macOS
LIBDIR= /usr/lib
#LIBDIR= ${PREFIX}/lib
#LIBDIR= /dev/env/DJDIR/lib
# default CALC_SHAREDIR for non-macOS
CALC_SHAREDIR= /usr/share/calc
#CALC_SHAREDIR= ${PREFIX}/lib/calc
#CALC_SHAREDIR= /dev/env/DJDIR/share/calc
endif # ($(target),Darwin)
# NOTE: Do not set CALC_INCDIR to /usr/include or ${PREFIX}/include!!!
# Always be sure that the CALC_INCDIR path ends in /calc to avoid
# conflicts with system or other application include files!!!
#
#CALC_INCDIR= ${PREFIX}/include/calc
#CALC_INCDIR= /dev/env/DJDIR/include/calc
CALC_INCDIR= ${INCDIR}/calc
# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR
# ---------------------------------------------------------------
# ${HELPDIR} where the help directory is installed
# ${CUSTOMCALDIR} where custom *.cal files are installed
# ${CUSTOMHELPDIR} where custom help files are installed
# ${CUSTOMINCDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed
#
# NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the ${T} directory.
#
# If in doubt, set:
#
# HELPDIR= ${CALC_SHAREDIR}/help
# CALC_INCDIR= ${INCDIR}/calc
# CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
# CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
# CUSTOMINCDIR= ${CALC_INCDIR}/custom
# SCRIPTDIR= ${BINDIR}/cscript
#
HELPDIR= ${CALC_SHAREDIR}/help
CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
CUSTOMINCDIR= ${CALC_INCDIR}/custom
SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed
#
# The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area.
#
# For example, if:
#
# BINDIR= /usr/bin
# LIBDIR= /usr/lib
# CALC_SHAREDIR= /usr/share/calc
#
# and if:
#
# T= /var/tmp/testing
#
# Then the installation locations will be:
#
# calc binary files: /var/tmp/testing/usr/bin
# calc link library: /var/tmp/testing/usr/lib
# calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/...
#
# If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under ${T}, as if one had to chroot under
# ${T} for calc to operate.
#
# NOTE: The ${PREFIX} is not the same as ${T}. The ${T} specifies
# a top level directory under which calc installs things.
# While usually ${T} is empty, it can be specific path
# as if calc where "chrooted" during an install.
# The ${PREFIX} value, during install, is a path between
# the top level ${T} install directory and the object
# such as an include file.
#
# See ${PREFIX} above.
#
# If in doubt, use T=
#
T=
# where man section 1 pages are installed
#
# Use MANDIR= to disable installation of the calc man (source) page.
#
# NOTE: man pages not installed by macOS must go under,
# (according to MANPATH as found in /private/etc/man.conf):
#
# MANDIR= ${PREFIX}/share/man/man1
#
#MANDIR=
#MANDIR= ${PREFIX}/man/man1
#MANDIR= /usr/man/man1
#
ifeq ($(target),Darwin)
MANDIR= ${PREFIX}/share/man/man1
else # ($(target),Darwin)
MANDIR= /usr/share/man/man1
endif # ($(target),Darwin)
#MANDIR= /dev/env/DJDIR/man/man1
#MANDIR= /usr/man/u_man/man1
#MANDIR= /usr/contrib/man/man1
# where cat (formatted man) pages are installed
#
# Use CATDIR= to disable installation of the calc cat (formatted) page.
#
CATDIR=