comparison m4/acinclude.m4 @ 23017:0f22914be30e

* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
author John W. Eaton <jwe@octave.org>
date Sat, 07 Jan 2017 14:15:09 -0500
parents ee9aa83dce51
children 6094018f5e72
comparison
equal deleted inserted replaced
23016:a2fc803e9556 23017:0f22914be30e
648 dnl OCTAVE_CHECK_LIB(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, 648 dnl OCTAVE_CHECK_LIB(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC,
649 dnl LANG, DOC-STRING, EXTRA-CHECK, PKG-CONFIG-NAME, 649 dnl LANG, DOC-STRING, EXTRA-CHECK, PKG-CONFIG-NAME,
650 dnl REQUIRED) 650 dnl REQUIRED)
651 dnl 651 dnl
652 AC_DEFUN([OCTAVE_CHECK_LIB], [ 652 AC_DEFUN([OCTAVE_CHECK_LIB], [
653 AC_ARG_WITH([$1-includedir], 653 AC_ARG_WITH([m4_tolower($1)-includedir],
654 [AS_HELP_STRING([--with-$1-includedir=DIR], 654 [AS_HELP_STRING([--with-m4_tolower($1)-includedir=DIR],
655 [look for $2 include files in DIR])], 655 [look for $2 include files in DIR])],
656 [m4_toupper([$1])_CPPFLAGS="-I$withval"]) 656 [m4_toupper([$1])_CPPFLAGS="-I$withval"])
657 AC_SUBST(m4_toupper([$1])_CPPFLAGS) 657 AC_SUBST(m4_toupper([$1])_CPPFLAGS)
658 658
659 AC_ARG_WITH([$1-libdir], 659 AC_ARG_WITH([m4_tolower($1)-libdir],
660 [AS_HELP_STRING([--with-$1-libdir=DIR], 660 [AS_HELP_STRING([--with-m4_tolower($1)-libdir=DIR],
661 [look for $2 libraries in DIR])], 661 [look for $2 libraries in DIR])],
662 [m4_toupper([$1])_LDFLAGS="-L$withval"]) 662 [m4_toupper([$1])_LDFLAGS="-L$withval"])
663 AC_SUBST(m4_toupper([$1])_LDFLAGS) 663 AC_SUBST(m4_toupper([$1])_LDFLAGS)
664 664
665 AC_ARG_WITH([$1], 665 AC_ARG_WITH([m4_tolower($1)],
666 [ifelse([$#], 10, 666 [ifelse([$#], 10,
667 [m4_ifblank([$7], 667 [m4_ifblank([$7],
668 [AS_HELP_STRING([--with-$1=<lib>], [use $2 library <lib>])], 668 [AS_HELP_STRING([--with-m4_tolower($1)=<lib>], [use $2 library <lib>])],
669 [AS_HELP_STRING([--with-$1], [$7])])], 669 [AS_HELP_STRING([--with-m4_tolower($1)], [$7])])],
670 [m4_ifblank([$7], 670 [m4_ifblank([$7],
671 [AS_HELP_STRING([--without-$1], [don't use $2 library])], 671 [AS_HELP_STRING([--without-m4_tolower($1)], [don't use $2 library])],
672 [AS_HELP_STRING([--without-$1], [$7])])])], 672 [AS_HELP_STRING([--without-m4_tolower($1)], [$7])])])],
673 with_$1=$withval, with_$1=yes) 673 with_$1=$withval, with_$1=yes)
674 674
675 ac_octave_$1_pkg_check=no 675 ac_octave_$1_pkg_check=no
676 m4_toupper([$1])_LIBS= 676 m4_toupper([$1])_LIBS=
677 warn_$1="$3" 677 warn_$1="$3"
678 case $with_$1 in 678 case $with_$1 in
679 no) 679 no)
680 ifelse([$#], 10, 680 ifelse([$#], 10,
681 [AC_MSG_ERROR([--without-$1 specified but $2 is required.])], 681 [AC_MSG_ERROR([--without-m4_tolower($1) specified but $2 is required.])],
682 [warn_$1="--without-$1 specified. Functions or features that depend on $2 will be disabled." 682 [warn_$1="--without-m4_tolower($1) specified. Functions or features that depend on $2 will be disabled."
683 m4_toupper([$1])_LIBS=]) 683 m4_toupper([$1])_LIBS=])
684 ;; 684 ;;
685 yes | "") 685 yes | "")
686 ac_octave_$1_pkg_check=yes 686 ac_octave_$1_pkg_check=yes
687 m4_toupper([$1])_LIBS="-l$1" 687 m4_toupper([$1])_LIBS="-l$1"