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.

45 lines
1.5KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_with_build_path.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_WITH_BUILD_PATH
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro adds a "--with-build-path" option to the configure script.
  12. # This configure option provides a convenient way to add "-I" options to
  13. # CPPFLAGS and "-L" options to LDFLAGS, at configure time.
  14. #
  15. # Invoking "./configure --with-build-path=DIR" results in "-I DIR/include"
  16. # being added to CPPFLAGS if DIR/include exists, and "-L DIR/lib" being
  17. # added to LDFLAGS if DIR/lib exists.
  18. #
  19. # Separate multiple directories using colons; e.g.
  20. # "--with-build-path=DIR1:DIR2:DIR3".
  21. #
  22. # LICENSE
  23. #
  24. # Copyright (c) 2008 Steve M. Robbins <smr@debian.org>
  25. #
  26. # Copying and distribution of this file, with or without modification, are
  27. # permitted in any medium without royalty provided the copyright notice
  28. # and this notice are preserved. This file is offered as-is, without any
  29. # warranty.
  30. #serial 6
  31. AU_ALIAS([SMR_WITH_BUILD_PATH], [AX_WITH_BUILD_PATH])
  32. AC_DEFUN([AX_WITH_BUILD_PATH],
  33. [
  34. AC_ARG_WITH([build-path],
  35. [ --with-build-path=DIR build using DIR/include and DIR/lib],
  36. [
  37. for d in `echo $withval | tr : ' '`; do
  38. test -d $d/include && CPPFLAGS="$CPPFLAGS -I$d/include"
  39. test -d $d/lib && LDFLAGS="$LDFLAGS -L$d/lib"
  40. done
  41. ])
  42. ])