Reputation: 53
In a cross environment, AC_PROG_CC finds the name of the target C compiler. In my setup I need to build some tools which run on the build machine, not on the target, so I also need a build system C compiler. I wonder if there is something like AC_PROG_CC to find the name of the build C compiler and also to set proper CFLAGS and linker flags.
Or should I have a separate configure file for the tools which run on the host and call autoconf recursively?
Many thanks for sharing your insights in this!
Upvotes: 1
Views: 496
Reputation: 16315
In my setup I need to build some tools which run on the build machine, not on the target, so I also need a build system C compiler. I wonder if there is something like
AC_PROG_CC
to find the name of the build C compiler and also to set properCFLAGS
and linker flags.
AX_PROG_CC_FOR_BUILD is probably what you need since you want to set CFLAGS
.
Or should I have a separate configure file for the tools which run on the host and call autoconf recursively?
That's sort of what AX_PROC_CC_FOR_BUILD
does.
Upvotes: 2