diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-05-13 15:37:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:53:42 -0500 |
commit | 0048335d9e3e0c7db61f6a325a3d7f49037810c3 (patch) | |
tree | a96685acfe324f0b496a81a47832a9c0317de8fd /source4/build/smb_build/public.m4 | |
parent | d12e825042d1f108051eb6e205340dee444d5591 (diff) | |
download | samba-0048335d9e3e0c7db61f6a325a3d7f49037810c3.tar.gz samba-0048335d9e3e0c7db61f6a325a3d7f49037810c3.tar.bz2 samba-0048335d9e3e0c7db61f6a325a3d7f49037810c3.zip |
r686: - Add SMB_EXT_LIB_FROM_PKGCONFIG()
- Build gregedit and registry_gconf again if the required libs are found (gconf and gtk)
(This used to be commit a63b704c36f2f5b52e932b6b2c99e7d664c9bdc7)
Diffstat (limited to 'source4/build/smb_build/public.m4')
-rw-r--r-- | source4/build/smb_build/public.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source4/build/smb_build/public.m4 b/source4/build/smb_build/public.m4 index 9bfcd549b8..839c16f1a9 100644 --- a/source4/build/smb_build/public.m4 +++ b/source4/build/smb_build/public.m4 @@ -47,6 +47,11 @@ dnl 1:name, dnl 2:default_build dnl ) dnl +dnl SMB_EXT_LIB_FROM_PKGCONFIG( +dnl 1:name, +dnl 2:pkg-config name +dnl ) +dnl dnl SMB_EXT_LIB( dnl 1:name, dnl 2:libs, @@ -265,6 +270,49 @@ AC_DEFUN([SMB_EXT_LIB_ENABLE], [SMB_EXT_LIB_ENABLE_][$1]="$2" ]) +dnl SMB_EXT_LIB_FROM_PKGCONFIG( +dnl 1:name, +dnl 2:pkg-config name +dnl ) +AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], +[ + dnl Figure out the correct variables and call SMB_EXT_LIB() + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + + SMB_EXT_LIB_ENABLE($1, YES) + SMB_EXT_LIB($1, [`$PKG_CONFIG --libs-only-l $2`], + [`$PKG_CONFIG --cflags-only-other $2`], + [`$PKG_CONFIG --cflags-only-I $2`], + [`$PKG_CONFIG --libs-only-other $2`]) + + # FIXME: Dirty hack + CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $2`" + else + AC_MSG_RESULT(no) + $PKG_CONFIG --errors-to-stdout --print-errors $2 + fi + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi +]) + dnl SMB_EXT_LIB( dnl 1:name, dnl 2:libs, |