Re: [Rpm-maint] [rpm-software-management/rpm] Add RPM_CHECK_LIB to acinclude.m4 (#257)

2017-10-23 Thread Panu Matilainen
Closed #257.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/257#event-1305239481___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add RPM_CHECK_LIB to acinclude.m4 (#257)

2017-10-23 Thread Panu Matilainen
Thanks but no thanks, a helper that's practically as long as our entire 
configure.ac seems like a huge overkill with the relatively few external 
dependencies we have.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/257#issuecomment-338603492___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add RPM_CHECK_LIB to acinclude.m4 (#257)

2017-07-22 Thread Jeff Johnson
The RPM+UUID patch in issue #269 illustrates another, more subtle usage feature 
of RPM_CHECK_LIB.

There are two uuid.h files on a linux system: one from ossp-uuid, the other 
from ext4.

Using --with-uuid=system (rather than --with-uuid=external) finds the correct 
uuid.h.

Think about the hack-o-rounds that usually get implemented in AutoFU to handle 
annoying detection weirdnesses like a file name collision ;-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/257#issuecomment-317181712___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add RPM_CHECK_LIB to acinclude.m4 (#257)

2017-07-18 Thread Jeff Johnson
Here is a moderately complex real world example of how to use: detecting ZSTD 
either externally or internally.

In configure.ac:
```
dnl # Facebook Zstd
RPM_CHECK_LIB(
[Facebook Zstd], [zstd],
[zstd], [ZSTD_versionNumber], [zstd.h],
[no,external:internal:none], [zstd:lib:lib],
[
], [])
```

When the generated configure is invoked with --with-zstd=internal (with a 
github zstd git checkout in the top level directory) succeeds, then these 
values are available in Makefile's for adding to the usual libtool variables:

```
WITH_ZSTD = yes
WITH_ZSTD_CPPFLAGS =  -I$(top_srcdir)/$(WITH_ZSTD_SUBDIR)/lib 
-I$(top_builddir)/$(WITH_ZSTD_SUBDIR)/lib -I$(top_srcdir)/$(WITH_ZSTD_SUBDIR) 
-I$(top_builddir)/$(WITH_ZSTD_SUBDIR)
WITH_ZSTD_LDFLAGS =  -L$(top_builddir)/$(WITH_ZSTD_SUBDIR)/lib 
-L$(top_builddir)/$(WITH_ZSTD_SUBDIR)
WITH_ZSTD_LIBS =  -lzstd
WITH_ZSTD_SUBDIR = zstd
```

The equivalent Makefile values for configure --with-zstd=external success:
```
WITH_ZSTD = yes
WITH_ZSTD_CPPFLAGS =
WITH_ZSTD_LDFLAGS =
WITH_ZSTD_LIBS =
WITH_ZSTD_SUBDIR =
...
LIBS = ... -lzstd
```


And config.h of course contains
```
/* Define as 1 if building with Facebook Zstd library */
#define WITH_ZSTD 1
...
/* Define to 1 if you have the `zstd' library (-lzstd). */
#define HAVE_LIBZSTD 1
...
/* Define to 1 if you have the  header file. */
#define HAVE_ZSTD_H 1
```

Note: I've left out the definition's for HAVE_LIBZSTD and HAVE_ZSTD_H when 
using --with-zstd=internal for simplicity of explanation. In practice, these 
definitions are seldom needed with an internal zest source tree.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/257#issuecomment-316087315___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add RPM_CHECK_LIB to acinclude.m4 (#257)

2017-07-18 Thread Jeff Johnson
The RPM_CHECK_LIB macro: add to acinclude.m4.
[rpm_check_lib.m4.gz](https://github.com/rpm-software-management/rpm/files/1156106/rpm_check_lib.m4.gz)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/257#issuecomment-316076403___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint