comparison acinclude.m4 @ 707:3ceec7ef374a

Use AS_HELP_STRING macro.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 16 Jun 2008 16:09:18 +0300
parents 6843b69895d9
children 92c284766c49
comparison
equal deleted inserted replaced
706:27fac414349d 707:3ceec7ef374a
72 72
73 73
74 AC_DEFUN([XS_ARG_WITH], [dnl 74 AC_DEFUN([XS_ARG_WITH], [dnl
75 # xs_arg_with ( $1:$2:$3 ) 75 # xs_arg_with ( $1:$2:$3 )
76 define([Name], [translit([$1], [a-z], [A-Z])])dnl 76 define([Name], [translit([$1], [a-z], [A-Z])])dnl
77 define([roflCopter], [Enable $2 with install-PREFIX])dnl
77 AH_TEMPLATE(HAVE_[]Name, [Define if you have and want to use $2])dnl 78 AH_TEMPLATE(HAVE_[]Name, [Define if you have and want to use $2])dnl
78 AC_ARG_WITH([$1], 79 AC_ARG_WITH([$1],
79 [ --with-$1=PREFIX Enable $2 with install-PREFIX], [dnl 80 [AS_HELP_STRING([--with-$1=PREFIX], roflCopter)], [dnl
80 if test "x$withval" = "xyes"; then 81 if test "x$withval" = "xyes"; then
81 xs_use_$1="yes" 82 xs_use_$1="yes"
82 xs_$1_library="" 83 xs_$1_library=""
83 xs_$1_includes="" 84 xs_$1_includes=""
84 else 85 else
93 ],[dnl 94 ],[dnl
94 xs_use_$1="try" 95 xs_use_$1="try"
95 xs_$1_library="" 96 xs_$1_library=""
96 xs_$1_includes="" 97 xs_$1_includes=""
97 ])dnl 98 ])dnl
99 define([roflCopter], [Where the $2 headers are located])dnl
98 AC_ARG_WITH([$1-inc], 100 AC_ARG_WITH([$1-inc],
99 [ --with-$1-inc=DIR Where the $2 headers are located], 101 [AS_HELP_STRING([--with-$1-inc=DIR], roflCopter)],
100 [xs_$1_includes="$withval"])dnl 102 [xs_$1_includes="$withval"])dnl
103 define([roflCopter], [Where the $2 library is installed])dnl
101 AC_ARG_WITH([$1-lib], 104 AC_ARG_WITH([$1-lib],
102 [ --with-$1-lib=DIR Where the $2 library is installed], 105 [AS_HELP_STRING([--with-$1-lib=DIR], roflCopter)],
103 [xs_$1_library="$withval"])dnl 106 [xs_$1_library="$withval"])dnl
104 107
105 dnl Okay, handle this 108 dnl Okay, handle this
106 xs_have_$1="no" 109 xs_have_$1="no"
107 if test "x$xs_use_$1" = "xtry"; then 110 if test "x$xs_use_$1" = "xtry"; then
325 if test "x$builders_libdir" = "x"; then 328 if test "x$builders_libdir" = "x"; then
326 eval "builders_libdir=$libdir/sidplay/builders" 329 eval "builders_libdir=$libdir/sidplay/builders"
327 fi 330 fi
328 331
329 AC_ARG_WITH([sidbuilders], 332 AC_ARG_WITH([sidbuilders],
330 [ --with-sidbuilders=DIR what the SIDPlay2 builders install PREFIX is], 333 [AS_HELP_STRING([--with-sidbuilders=DIR], [What the SIDPlay2 builders install PREFIX is])],
331 [builders_includedir="$withval/include" 334 [builders_includedir="$withval/include"
332 builders_libdir="$withval/lib/sidplay/builders"]) 335 builders_libdir="$withval/lib/sidplay/builders"])
333 336
334 AC_ARG_WITH([builders-inc], 337 AC_ARG_WITH([builders-inc],
335 [ --with-builders-inc=DIR where the SIDPlay2 builders headers are located], 338 [AS_HELP_STRING([--with-builders-inc=DIR], [Where the SIDPlay2 builders headers are located])],
336 [builders_includedir="$withval"]) 339 [builders_includedir="$withval"])
337 340
338 AC_ARG_WITH([builders-lib], 341 AC_ARG_WITH([builders-lib],
339 [ --with-builders-lib=DIR where the SIDPlay2 builders libraries are installed], 342 [AS_HELP_STRING([--with-builders-lib=DIR], [Where the SIDPlay2 builders libraries are installed])],
340 [builders_libdir="$withval"]) 343 [builders_libdir="$withval"])
341 344
342 if test "x$builders_includedir" != "x"; then 345 if test "x$builders_includedir" != "x"; then
343 BUILDERS_CFLAGS="-I$builders_includedir" 346 BUILDERS_CFLAGS="-I$builders_includedir"
344 fi 347 fi