Skip to content

m-grant-prg/project-misc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Project Misc

Author - Copyright (C) 2019, 2021, 2023 Mark Grant


Contents

1 ... Project Description

2 ... The Macros

3 ... Macro Consumption


1 ... Project Description

This project contains:-

A number of files containing related m4 macros for use with AutoConf.

Useful git files.

Useful clang files.


2 ... The Macros

Script File: c-compiler.m4

a) ... BUILD_COMPILER_VERSION_CFLAGS(CFLAGS_Variable)

A macro to check the c compiler version in use and dynamically create a basic list of compiler warning flags and enter them in the supplied CFLAGS variable.

b) ...BUILD_COMPILER_VERSION_CPPFLAGS(CPPFLAGS_Variable)

A macro to build a list of pre-processor flags.

Script File: java-vm.m4

a) ... JAVA_VERSION_OK(Required_Java_Version, Start_Dir)

A macro to check if the available jre version is greater than or equal to the parameter supplied version. If yes, the test is passed, if no the macro errors out of configure entirely.

Script file linker.m4

a) ... BUILD_LDFLAGS(LDFLAGS_Variable)

A macro to build a list of linker flags.


3 ... Macro Consumption

Nothing fancy, just:-

a) ... Drop the script file(s) containing the desired macro(s) into say the project_root/m4extra directory of your project.

b) ... Enter the following line in your top level Makefile.am:-

ACLOCAL_AMFLAGS = -I m4 -I m4extra

(The -I m4 is the conventional m4 directory).

c) ... Invoke the macro in your configure.ac