mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add C compiler and C include checks for calc
Fixed have_statfs optional executable file extension ${EXT{ in the ${UTIL_PROGS} make variable. Prevented the "fake boolean value" when <stdbool.h> is missing, from complicating C compilers post c17 standard. Test if <stdint.h> exists and set HAVE_STDINT_H accordingly in have_stdint.h. Added HAVE_STDINT_H to allow one to force this value. Test if <inttypes.h> exists and set HAVE_INTTYPES_H accordingly in have_inttypes.h. Added HAVE_INTTYPES_H to allow one to force this value. Added c_chk.c to check the compiler and C include for calc requirements. If you are unable to compile this program, or if this program when compiles does not exit 0, then your C compiler and/or C include fails to meet calc requirements. Compilers that are at least c99 MUST be able to compile this program such that when run will exit 0. The "make hsrc" file will attempt to compile and run c_chk and will warn if the C compiler and/or C include fails to meet calc requirements. The "make debug" system will run c_chk -c to print information about the C compiler and C include. Currently failure to compile cc_chk.c or c_chk exiting non-0 will just print "WARNING!!" strings to stderr.
This commit is contained in:
@@ -717,6 +717,30 @@ 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
|
||||
|
Reference in New Issue
Block a user