mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-25 13:51:36 +00:00
Rework QF_PROCESS_NEED to be more general.
QF_PROCESS_NEED has been renamed to QF_PROCESS_NEED_LIBS and its guts have been moved to QF_PROCESS_NEED_subroutine, with additional modifications to allow QF_NEED to be used for other targets as well (eg, directories, executables, etc).
This commit is contained in:
parent
9281ad8521
commit
717d5368de
2 changed files with 18 additions and 14 deletions
|
@ -315,9 +315,9 @@ if test "x$BUILD_GLSL" = xyes; then
|
|||
VID_MODEL_TARGETS="$VID_MODEL_TARGETS libQFmodels_glsl.la"
|
||||
fi
|
||||
|
||||
QF_PROCESS_NEED(vid, [asm common gl glsl sdl sw sw32 svga x11])
|
||||
QF_PROCESS_NEED(qw, [client common sdl server], a)
|
||||
QF_PROCESS_NEED(nq, [client common sdl server], a)
|
||||
QF_PROCESS_NEED_LIBS(vid, [asm common gl glsl sdl sw sw32 svga x11])
|
||||
QF_PROCESS_NEED_LIBS(qw, [client common sdl server], a)
|
||||
QF_PROCESS_NEED_LIBS(nq, [client common sdl server], a)
|
||||
|
||||
AC_SUBST(CAN_BUILD_GL)
|
||||
AC_SUBST(CAN_BUILD_GLSL)
|
||||
|
|
|
@ -93,19 +93,23 @@ for qfn_lib in $2; do
|
|||
done
|
||||
])
|
||||
|
||||
AC_DEFUN([QF_PROCESS_NEED], [
|
||||
if test -n "$3"; then
|
||||
qfn_ext="$3"
|
||||
else
|
||||
qfn_ext=la
|
||||
fi
|
||||
for qfn_lib in $2; do
|
||||
if eval test x'"${$1_need_'$qfn_lib'}"' = xyes; then
|
||||
qfn_tmp="${$1_libs} lib$1_$qfn_lib.$qfn_ext"
|
||||
eval '$1_libs="$qfn_tmp"'
|
||||
AC_DEFUN([QF_PROCESS_NEED_subroutin], [
|
||||
qfn_pref="$1"
|
||||
qfn_pref=${qfn_pref:+${qfn_pref}$2_}
|
||||
qfn_suf="$3"
|
||||
for qfn_need in $5; do
|
||||
if eval test x'"${$2_need_'${qfn_need}'}"' = xyes; then
|
||||
qfn_tmp="${$2_$4} ${qfn_pref}${qfn_need}${qfn_suf}"
|
||||
eval '$2_$4="$qfn_tmp"'
|
||||
fi
|
||||
done
|
||||
AC_SUBST($1_libs)
|
||||
AC_SUBST([$2_$4])
|
||||
])
|
||||
|
||||
AC_DEFUN([QF_PROCESS_NEED_LIBS], [
|
||||
qfn_ext="$3"
|
||||
qfn_ext=${qfn_ext:-la}
|
||||
QF_PROCESS_NEED_subroutin([lib],[$1],[.${qfn_ext}],[libs],[$2])
|
||||
])
|
||||
|
||||
AC_DEFUN([QF_WITH_TARGETS], [
|
||||
|
|
Loading…
Reference in a new issue