Reputation: 3218
I am trying to write a Makefile.am
, where, if Makefile.am
will be changed depending on AC_CHECK_PROG
result of configure.ac
.
As an example, in configure.ac
:
AC_CHECK_PROG([DEPF90_CHECK],[makedepf90],[yes],[no])
AM_CONDITIONAL([FOUND_MAKEDEPF90], [test "x$DEPF90_CHECK" = xyes])
AM_COND_IF([FOUND_MAKEDEPF90],[a depend rule in makefile.am],[Some other thing in Makefile.am])
So, when makedepf90
exists, I want a depend rule in Makefile[.am].
The depend rule in makefile.am
looks like:
depend depend.mk:
makedepf90 $(vimtst_SOURCES) >depend.mk
How I can do this?
Upvotes: 3
Views: 317
Reputation: 57870
You don't need AM_COND_IF
. The AM_CONDITIONAL
rule will enable you to write this in your Makefile.am
:
if FOUND_MAKEDEPF90
depend depend.mk:
makedepf90 $(vimtst_SOURCES) >depend.mk
endif
Upvotes: 2