Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.8KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_mysqlshow.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_MYSQLSHOW
  8. #
  9. # DESCRIPTION
  10. #
  11. # Check for the program 'mysqlshow' let script continue if exists & works
  12. # pops up error message if not.
  13. #
  14. # Testing of functionality is by invoking it with root password
  15. # 'rootpass'. If it works, it should show all databases currently in
  16. # system.
  17. #
  18. # Besides checking mysql, this macro also set these environment variables
  19. # upon completion:
  20. #
  21. # MYSQLSHOW = which mysqlshow
  22. #
  23. # LICENSE
  24. #
  25. # Copyright (c) 2008 Gleen Salmon <gleensalmon@yahoo.com>
  26. #
  27. # This program is free software; you can redistribute it and/or modify it
  28. # under the terms of the GNU General Public License as published by the
  29. # Free Software Foundation; either version 2 of the License, or (at your
  30. # option) any later version.
  31. #
  32. # This program is distributed in the hope that it will be useful, but
  33. # WITHOUT ANY WARRANTY; without even the implied warranty of
  34. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  35. # Public License for more details.
  36. #
  37. # You should have received a copy of the GNU General Public License along
  38. # with this program. If not, see <https://www.gnu.org/licenses/>.
  39. #
  40. # As a special exception, the respective Autoconf Macro's copyright owner
  41. # gives unlimited permission to copy, distribute and modify the configure
  42. # scripts that are the output of Autoconf when processing the Macro. You
  43. # need not follow the terms of the GNU General Public License when using
  44. # or distributing such scripts, even though portions of the text of the
  45. # Macro appear in them. The GNU General Public License (GPL) does govern
  46. # all other use of the material that constitutes the Autoconf Macro.
  47. #
  48. # This special exception to the GPL applies to versions of the Autoconf
  49. # Macro released by the Autoconf Archive. When you make and distribute a
  50. # modified version of the Autoconf Macro, you may extend this special
  51. # exception to the GPL to apply to your modified version as well.
  52. #serial 6
  53. AU_ALIAS([AC_PROG_MYSQLSHOW], [AX_PROG_MYSQLSHOW])
  54. AC_DEFUN([AX_PROG_MYSQLSHOW],[
  55. AC_REQUIRE([AC_EXEEXT])dnl
  56. AC_PATH_PROG(MYSQLSHOW, mysqlshow$EXEEXT, nocommand)
  57. if test "$MYSQLSHOW" = nocommand; then
  58. AC_MSG_ERROR([mysqlshow not found in $PATH])
  59. fi
  60. AC_MSG_CHECKING([if mysqlshow works])
  61. if $MYSQLSHOW -u root -prootpass > /dev/null; then
  62. AC_MSG_RESULT([yes])
  63. else
  64. AC_MSG_NOTICE([Before installation, set MySQL root password to rootpass; restore your root password afterwards.])
  65. AC_MSG_ERROR([mysqlshow cannot run with root password = rootpass])
  66. fi;dnl
  67. ])