@@ -375,22 +375,26 @@ AC_SUBST(sigwaitinfo_LIBS)
375
375
# libopenscap links against librpm if found. Otherwise we carry own implementation of rpmvercmp.
376
376
echo
377
377
echo '* Checking for rpm library (optional dependency of libopenscap) '
378
- PKG_CHECK_MODULES([ rpm] , [ rpm >= 4.4] ,[
379
- SAVE_LIBS=$LIBS
378
+ AC_SUBST ( [ rpm_CFLAGS] )
379
+ AC_SUBST ( [ rpm_LIBS] )
380
+ PKG_CHECK_MODULES([ rpm4] , [ rpm >= 4.4] ,[
380
381
AC_DEFINE ( [ HAVE_RPMVERCMP] , [ 1] , [ Define to 1 if there is rpmvercmp available.] )
381
- AC_SUBST ( [ rpm_CFLAGS] )
382
- AC_SUBST ( [ rpm_LIBS] )
383
- LIBS=$SAVE_LIBS
382
+ rpm_CFLAGS="$rpm4_CFLAGS"
383
+ rpm_LIBS="$rpm4_LIBS"
384
384
] ,[
385
385
AC_MSG_NOTICE ( [ !!! librpm not found. The rpmvercmp function will be emulated. !!!] )
386
386
] )
387
- PKG_CHECK_MODULES([ rpm ] , [ rpm >= 4.6] ,[
387
+ PKG_CHECK_MODULES([ rpm6 ] , [ rpm >= 4.6] ,[
388
388
AC_DEFINE ( [ HAVE_RPM46] , [ 1] , [ Define to 1 if rpm is newer than 4.6.] )
389
+ rpm_CFLAGS="$rpm6_CFLAGS"
390
+ rpm_LIBS="$rpm6_LIBS"
389
391
] ,[
390
392
AC_MSG_NOTICE ( [ librpm is older than 4.6] )
391
393
] )
392
- PKG_CHECK_MODULES([ rpm ] , [ rpm >= 4.7] ,[
394
+ PKG_CHECK_MODULES([ rpm7 ] , [ rpm >= 4.7] ,[
393
395
AC_DEFINE ( [ HAVE_RPM47] , [ 1] , [ Define to 1 if rpm is newer than 4.7.] )
396
+ rpm_CFLAGS="$rpm7_CFLAGS"
397
+ rpm_LIBS="$rpm7_LIBS"
394
398
] ,[
395
399
AC_MSG_NOTICE ( [ librpm is older than 4.7] )
396
400
] )
0 commit comments