]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
adding pkgconfig file
authorsurajkulriya <surajkulriya@gmail.com>
Mon, 8 Mar 2021 18:34:03 +0000 (00:04 +0530)
committerMichael R Sweet <msweet@msweet.org>
Thu, 11 Mar 2021 00:25:29 +0000 (19:25 -0500)
.gitignore
Makedefs.in
Makefile
config-scripts/cups-common.m4
config-scripts/cups-directories.m4
config-scripts/cups-dnssd.m4
config-scripts/cups-gssapi.m4
config-scripts/cups-tls.m4
configure
configure.ac
cups.pc.in [new file with mode: 0644]

index e61f38637e0e12819e7656aba3a2b24d030aeadd..0eebd89634da335616a4e4fc7d7c985ee213fbe0 100644 (file)
@@ -7,6 +7,7 @@
 /config.log
 /config.status
 /configure~
+/cups.pc
 /cups-config
 /Makedefs
 /backend/dnssd
index 2bf60cfb03de828403949f0043e078694f4c5be7..f835c05ee1daafa60328863c53d224e5a0fd289c 100644 (file)
@@ -229,6 +229,7 @@ BUNDLEDIR   =       @CUPS_BUNDLEDIR@
 CACHEDIR       =       $(BUILDROOT)@CUPS_CACHEDIR@
 DATADIR                =       $(BUILDROOT)@CUPS_DATADIR@
 DOCDIR         =       $(BUILDROOT)@CUPS_DOCROOT@
+CUPS_PKGCONFPATH       =       @CUPS_PKGCONFPATH@
 ICONDIR                =       @ICONDIR@
 INCLUDEDIR     =       $(BUILDROOT)$(includedir)
 LIBDIR         =       $(BUILDROOT)$(libdir)
index 50261e32e74979192ed81b43acce81e99c864146..37eeeaa7f33807fee1dafae16550c6698ab57024 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -103,6 +103,7 @@ distclean:  clean
        $(RM) Makedefs config.h config.log config.status
        $(RM) conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
        $(RM) cups-config
+       $(RM) cups.pc
        $(RM) desktop/cups.desktop
        $(RM) doc/index.html
        $(RM) packaging/cups.list
@@ -173,6 +174,9 @@ install-data:
        echo Installing cups-config script...
        $(INSTALL_DIR) -m 755 $(BINDIR)
        $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
+       echo Installing cups.pc file...
+       $(INSTALL_DIR) -m 755 $(CUPS_PKGCONFPATH)
+       $(INSTALL_DATA) cups.pc $(CUPS_PKGCONFPATH)/cups.pc
 
 
 #
@@ -225,6 +229,9 @@ uninstall:
        echo Uninstalling cups-config script...
        $(RM) $(BINDIR)/cups-config
        -$(RMDIR) $(BINDIR)
+       echo Uninstalling cups.pc file...
+       $(RM) $(CUPS_PKGCONFPATH)/cups.pc
+       -$(RMDIR) $(CUPS_PKGCONFPATH)
 
 
 #
index 6c8744a727a82f33308fd90d84ca62083014a466..136b4908e05de36a1792d4f61db3478e268ec2d7 100644 (file)
@@ -82,6 +82,10 @@ AC_SUBST([INSTALLSTATIC])
 
 dnl Check for pkg-config, which is used for some other tests later on...
 AC_PATH_TOOL([PKGCONFIG], [pkg-config])
+PKGCONFIG_REQUIRES=""
+PKGCONFIG_LIBS=""
+AC_SUBST([PKGCONFIG_LIBS])
+AC_SUBST([PKGCONFIG_REQUIRES])
 
 dnl Check for libraries...
 AC_SEARCH_LIBS([abs], [m], [AC_DEFINE(HAVE_ABS)])
@@ -278,6 +282,8 @@ AC_CHECK_HEADER([zlib.h], [
 AC_SUBST([INSTALL_GZIP])
 AC_SUBST([LIBZ])
 
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBZ"
+
 dnl Flags for "ar" command...
 AS_CASE([host_os_name], [darwin* | *bsd*], [
     ARFLAGS="-rcv"
index 3f36b28ad594a49c83125e06675840d867226d20..8957c73126e892e55eabf760c9013efb7576932a 100644 (file)
@@ -185,6 +185,24 @@ AS_IF([test "$localedir" = "\${datarootdir}/locale"], [
 AC_DEFINE_UNQUOTED([CUPS_LOCALEDIR], ["$CUPS_LOCALEDIR"], [Location of localization files.])
 AC_SUBST([CUPS_LOCALEDIR])
 
+
+# cups.pc file...
+AC_ARG_WITH([pkgconfpath], AS_HELP_STRING([--with-pkgconfpath], [set path for cups.pc file]), [
+    pkgconfpath="$withval"
+], [
+    pkgconfpath=""
+])
+
+AS_IF([test x$pkgconfpath = x], [
+    CUPS_PKGCONFPATH="$exec_prefix/lib/pkgconfig"
+], [
+    CUPS_PKGCONFPATH="$pkgconfpath"
+])
+AC_DEFINE_UNQUOTED([CUPS_PKGCONFPATH], ["$CUPS_PKGCONFPATH"], [Location of cups.pc file.])
+AC_SUBST([CUPS_PKGCONFPATH])
+
+
+
 # Log files...
 AC_ARG_WITH([logdir], AS_HELP_STRING([--with-logdir], [set path for log files]), [
     logdir="$withval"
index 09cc13b09667a100c217201051704070c1441b49..b874764e6c63a77a33e633b0cb85f330f85f9dec 100644 (file)
@@ -60,6 +60,7 @@ AS_IF([test $with_dnssd = yes -o $with_dnssd = mdnsresponder], [
                DNSSD_BACKEND="dnssd"
                IPPFIND_BIN="ippfind"
                IPPFIND_MAN="ippfind.1"
+               PKGCONFIG_LIBS="$PKGCONFIG_LIBS $DNSSDLIBS"
            ], [
                AC_MSG_RESULT([no])
                AS_IF([test $with_dnssd = mdnsresponder], [
@@ -71,6 +72,7 @@ AS_IF([test $with_dnssd = yes -o $with_dnssd = mdnsresponder], [
     ])
 ])
 
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBS"
 dnl Then try Avahi...
 AS_IF([test $with_dnssd = avahi -o $with_dnssd = yes], [
     AS_IF([test "x$PKGCONFIG" = x], [
@@ -86,6 +88,7 @@ AS_IF([test $with_dnssd = avahi -o $with_dnssd = yes], [
            DNSSD_BACKEND="dnssd"
            IPPFIND_BIN="ippfind"
            IPPFIND_MAN="ippfind.1"
+               PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES avahi-client"
            AC_DEFINE([HAVE_AVAHI], [1], [Have Avahi client library?])
            AC_DEFINE([HAVE_DNSSD], [1], [Have DNS-SD support?])
        ], [
index 8af2e8dc2201e1f079cc0953a72856708b7ee8c5..12af60520d42cd1d48ab658f605d6f2e57990674 100644 (file)
@@ -70,7 +70,8 @@ AS_IF([test x$enable_gssapi = xyes], [
 
     SAVELIBS="$LIBS"
     LIBS="$LIBS $LIBGSSAPI"
-
+       PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBS"
+       
     AC_CHECK_FUNC([__ApplePrivate_gss_acquire_cred_ex_f], [
        AC_DEFINE([HAVE_GSS_ACQUIRE_CRED_EX_F], [1], [Have __ApplePrivate_gss_acquire_cred_ex_f function?])
     ])
@@ -113,6 +114,7 @@ AS_IF([test x$enable_gssapi = xyes], [
 
     LIBS="$SAVELIBS"
 ])
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBGSSAPI"
 
 dnl Default GSS service name...
 AC_ARG_WITH([gssservicename], AS_HELP_STRING([--with-gssservicename], [set default gss service name]), [
index 8d335a264d90aa90a7c3ebfe46ea9891c5b0eaa7..b881a6fe144d51fd6d07f51afb9f149e4922af70 100644 (file)
@@ -59,6 +59,7 @@ AS_IF([test $with_tls = yes -o $with_tls = gnutls], [
            with_tls="gnutls"
            TLSLIBS="$($PKGCONFIG --libs gnutls)"
            TLSFLAGS="$($PKGCONFIG --cflags gnutls)"
+               PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES gnutls"
            AC_DEFINE([HAVE_TLS], [1], [Do we support TLS?])
            AC_DEFINE([HAVE_GNUTLS], [1], [Do we have the GNU TLS library?])
        ], [
@@ -70,6 +71,7 @@ AS_IF([test $with_tls = yes -o $with_tls = gnutls], [
        with_tls="gnutls"
        TLSLIBS="$($LIBGNUTLSCONFIG --libs)"
        TLSFLAGS="$($LIBGNUTLSCONFIG --cflags)"
+       PKGCONFIG_LIBS="$PKGCONFIG_LIBS $TLSLIBS"
        AC_DEFINE([HAVE_TLS], [1], [Do we support TLS?])
        AC_DEFINE([HAVE_GNUTLS], [1], [Do we have the GNU TLS library?])
     ])
index 02bbd2b107154f2f9398fa7ac645e752d3e6cc66..20dd130197ff012bc6fd62ba0e4e80fc538e7f3c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,12 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for CUPS 2.4rc1.
+# Generated by GNU Autoconf 2.70 for CUPS 2.4rc1.
 #
 # Report bugs to <https://github.com/openprinting/cups/issues>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
-# Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -747,6 +746,7 @@ INSTALL_SYSV
 CUPS_SERVERBIN
 CUPS_REQUESTS
 CUPS_LOGDIR
+CUPS_PKGCONFPATH
 CUPS_LOCALEDIR
 CUPS_DOCROOT
 MENUDIR
@@ -774,6 +774,8 @@ USBQUIRKS
 LIBUSB
 LIBPAPER
 LIBMALLOC
+PKGCONFIG_REQUIRES
+PKGCONFIG_LIBS
 PKGCONFIG
 INSTALLSTATIC
 CUPS_HTMLVIEW
@@ -873,6 +875,7 @@ with_cachedir
 with_icondir
 with_menudir
 with_docdir
+with_pkgconfpath
 with_logdir
 with_rundir
 enable_shared
@@ -1621,6 +1624,7 @@ Optional Packages:
   --with-icondir          set path for application icons
   --with-menudir          set path for application menus
   --with-docdir           set path for documentation
+  --with-pkgconfpath      set path for cups.pc file
   --with-logdir           set path for log files
   --with-rundir           set transient run-time state directory
   --with-optim            set optimization flags
@@ -1754,9 +1758,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 CUPS configure 2.4rc1
-generated by GNU Autoconf 2.71
+generated by GNU Autoconf 2.70
 
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2020 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -2109,7 +2113,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by CUPS $as_me 2.4rc1, which was
-generated by GNU Autoconf 2.71.  Invocation command line was
+generated by GNU Autoconf 2.70.  Invocation command line was
 
   $ $0$ac_configure_args_raw
 
@@ -4164,10 +4168,7 @@ else
     CFLAGS=
   fi
 fi
-ac_prog_cc_stdc=no
-if test x$ac_prog_cc_stdc = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
 printf %s "checking for $CC option to enable C11 features... " >&6; }
 if test ${ac_cv_prog_cc_c11+y}
 then :
@@ -4191,28 +4192,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-fi
 
-if test "x$ac_cv_prog_cc_c11" = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c11" = x
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
-printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
-     CC="$CC $ac_cv_prog_cc_c11"
 fi
-  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
-  ac_prog_cc_stdc=c11
-fi
-fi
-if test x$ac_prog_cc_stdc = xno
+# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
+case "x$ac_cv_prog_cc_c11" in #(
+  x) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;; #(
+  xno) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;; #(
+  *) :
+    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
+    CC="$CC$ac_prog_cc_stdc_options"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c11" != xno
 then :
+  ac_prog_cc_stdc=c11
+                ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+else $as_nop
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
 printf %s "checking for $CC option to enable C99 features... " >&6; }
 if test ${ac_cv_prog_cc_c99+y}
@@ -4223,9 +4224,9 @@ else $as_nop
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_c_conftest_c99_program
+$ac_c_conftest_c89_program
 _ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
 do
   CC="$ac_save_CC $ac_arg"
   if ac_fn_c_try_compile "$LINENO"
@@ -4237,28 +4238,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-fi
 
-if test "x$ac_cv_prog_cc_c99" = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c99" = x
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
-     CC="$CC $ac_cv_prog_cc_c99"
-fi
-  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-  ac_prog_cc_stdc=c99
-fi
 fi
-if test x$ac_prog_cc_stdc = xno
+# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
+case "x$ac_cv_prog_cc_c99" in #(
+  x) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;; #(
+  xno) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;; #(
+  *) :
+    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
+    CC="$CC$ac_prog_cc_stdc_options"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno
 then :
+  ac_prog_cc_stdc=c99
+                   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else $as_nop
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
 printf %s "checking for $CC option to enable C89 features... " >&6; }
 if test ${ac_cv_prog_cc_c89+y}
@@ -4271,7 +4272,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_c_conftest_c89_program
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   if ac_fn_c_try_compile "$LINENO"
@@ -4283,25 +4285,34 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-fi
 
-if test "x$ac_cv_prog_cc_c89" = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cc_c89" = x
+fi
+# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
+case "x$ac_cv_prog_cc_c89" in #(
+  x) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;; #(
+  xno) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;; #(
+  *) :
+    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
+    CC="$CC$ac_prog_cc_stdc_options"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno
 then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; }
+  ac_prog_cc_stdc=c89
+                      ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
 else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
-     CC="$CC $ac_cv_prog_cc_c89"
+  ac_prog_cc_stdc=no
+                      ac_cv_prog_cc_stdc=no
 fi
-  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-  ac_prog_cc_stdc=c89
+
 fi
+
 fi
 
 ac_ext=c
@@ -4717,22 +4728,19 @@ else
     CXXFLAGS=
   fi
 fi
-ac_prog_cxx_stdcxx=no
-if test x$ac_prog_cxx_stdcxx = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
 printf %s "checking for $CXX option to enable C++11 features... " >&6; }
-if test ${ac_cv_prog_cxx_11+y}
+if test ${ac_cv_prog_cxx_cxx11+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
-  ac_cv_prog_cxx_11=no
+  ac_cv_prog_cxx_cxx11=no
 ac_save_CXX=$CXX
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_cxx_conftest_cxx11_program
 _ACEOF
-for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+for ac_arg in '' -std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA
 do
   CXX="$ac_save_CXX $ac_arg"
   if ac_fn_cxx_try_compile "$LINENO"
@@ -4744,35 +4752,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
 done
 rm -f conftest.$ac_ext
 CXX=$ac_save_CXX
-fi
 
-if test "x$ac_cv_prog_cxx_cxx11" = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cxx_cxx11" = x
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
-printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
-     CXX="$CXX $ac_cv_prog_cxx_cxx11"
 fi
-  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
-  ac_prog_cxx_stdcxx=cxx11
-fi
-fi
-if test x$ac_prog_cxx_stdcxx = xno
+# AC_CACHE_VAL
+ac_prog_cxx_stdcxx_options=
+case "x$ac_cv_prog_cxx_cxx11" in #(
+  x) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;; #(
+  xno) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;; #(
+  *) :
+    ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx11"
+    CXX=$CXX$ac_prog_cxx_stdcxx_options
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cxx_cxx11" != xno
 then :
+  ac_prog_cxx_stdcxx=cxx11
+                   ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+                   ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11
+else $as_nop
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
 printf %s "checking for $CXX option to enable C++98 features... " >&6; }
-if test ${ac_cv_prog_cxx_98+y}
+if test ${ac_cv_prog_cxx_cxx98+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
-  ac_cv_prog_cxx_98=no
+  ac_cv_prog_cxx_cxx98=no
 ac_save_CXX=$CXX
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -4790,25 +4799,32 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
 done
 rm -f conftest.$ac_ext
 CXX=$ac_save_CXX
-fi
 
-if test "x$ac_cv_prog_cxx_cxx98" = xno
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; }
-else $as_nop
-  if test "x$ac_cv_prog_cxx_cxx98" = x
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; }
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
-printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
-     CXX="$CXX $ac_cv_prog_cxx_cxx98"
 fi
-  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+# AC_CACHE_VAL
+ac_prog_cxx_stdcxx_options=
+case "x$ac_cv_prog_cxx_cxx98" in #(
+  x) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;; #(
+  xno) :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;; #(
+  *) :
+    ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx98"
+    CXX=$CXX$ac_prog_cxx_stdcxx_options
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cxx_cxx98" != xno
+then :
   ac_prog_cxx_stdcxx=cxx98
+                       ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+else $as_nop
+  ac_prog_cxx_stdcxx=no
+                       ac_cv_prog_cxx_stdcxx=no
 fi
+
 fi
 
 ac_ext=c
@@ -5573,6 +5589,10 @@ else
   PKGCONFIG="$ac_cv_path_PKGCONFIG"
 fi
 
+PKGCONFIG_REQUIRES=""
+PKGCONFIG_LIBS=""
+
+
 
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing abs" >&5
@@ -6682,6 +6702,8 @@ fi
 
 
 
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBZ"
+
 case host_os_name in #(
   darwin* | *bsd*) :
 
@@ -7453,6 +7475,39 @@ printf "%s\n" "#define CUPS_LOCALEDIR \"$CUPS_LOCALEDIR\"" >>confdefs.h
 
 
 
+
+# cups.pc file...
+
+# Check whether --with-pkgconfpath was given.
+if test ${with_pkgconfpath+y}
+then :
+  withval=$with_pkgconfpath;
+    pkgconfpath="$withval"
+
+else $as_nop
+
+    pkgconfpath=""
+
+fi
+
+
+if test x$pkgconfpath = x
+then :
+
+    CUPS_PKGCONFPATH="$exec_prefix/lib/pkgconfig"
+
+else $as_nop
+
+    CUPS_PKGCONFPATH="$pkgconfpath"
+
+fi
+
+printf "%s\n" "#define CUPS_PKGCONFPATH \"$CUPS_PKGCONFPATH\"" >>confdefs.h
+
+
+
+
+
 # Log files...
 
 # Check whether --with-logdir was given.
@@ -9310,7 +9365,7 @@ fi
 
     SAVELIBS="$LIBS"
     LIBS="$LIBS $LIBGSSAPI"
-
+       PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBS"
     ac_fn_c_check_func "$LINENO" "__ApplePrivate_gss_acquire_cred_ex_f" "ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f"
 if test "x$ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f" = xyes
 then :
@@ -9433,6 +9488,7 @@ fi
     LIBS="$SAVELIBS"
 
 fi
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBGSSAPI"
 
 
 # Check whether --with-gssservicename was given.
@@ -9773,6 +9829,7 @@ printf "%s\n" "yes" >&6; }
            with_tls="gnutls"
            TLSLIBS="$($PKGCONFIG --libs gnutls)"
            TLSFLAGS="$($PKGCONFIG --cflags gnutls)"
+               PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES gnutls"
 
 printf "%s\n" "#define HAVE_TLS 1" >>confdefs.h
 
@@ -9795,6 +9852,7 @@ then :
        with_tls="gnutls"
        TLSLIBS="$($LIBGNUTLSCONFIG --libs)"
        TLSFLAGS="$($LIBGNUTLSCONFIG --cflags)"
+       PKGCONFIG_LIBS="$PKGCONFIG_LIBS $TLSLIBS"
 
 printf "%s\n" "#define HAVE_TLS 1" >>confdefs.h
 
@@ -10605,6 +10663,7 @@ printf "%s\n" "#define HAVE_MDNSRESPONDER 1" >>confdefs.h
                DNSSD_BACKEND="dnssd"
                IPPFIND_BIN="ippfind"
                IPPFIND_MAN="ippfind.1"
+               PKGCONFIG_LIBS="$PKGCONFIG_LIBS $DNSSDLIBS"
 
 else $as_nop
 
@@ -10630,6 +10689,7 @@ fi
 
 fi
 
+PKGCONFIG_LIBS="$PKGCONFIG_LIBS $LIBS"
 if test $with_dnssd = avahi -o $with_dnssd = yes
 then :
 
@@ -10657,6 +10717,7 @@ printf "%s\n" "yes" >&6; }
            DNSSD_BACKEND="dnssd"
            IPPFIND_BIN="ippfind"
            IPPFIND_MAN="ippfind.1"
+               PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES avahi-client"
 
 printf "%s\n" "#define HAVE_AVAHI 1" >>confdefs.h
 
@@ -12302,7 +12363,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/cups-lpdAT.service scheduler/cups.path scheduler/cups.service scheduler/cups.socket templates/header.tmpl packaging/cups.list $LANGFILES"
+ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups.pc cups-config desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/cups-lpdAT.service scheduler/cups.path scheduler/cups.service scheduler/cups.socket templates/header.tmpl packaging/cups.list $LANGFILES"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -12804,7 +12865,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by CUPS $as_me 2.4rc1, which was
-generated by GNU Autoconf 2.71.  Invocation command line was
+generated by GNU Autoconf 2.70.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -12869,10 +12930,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
 CUPS config.status 2.4rc1
-configured by $0, generated by GNU Autoconf 2.71,
+configured by $0, generated by GNU Autoconf 2.70,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2020 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -12997,6 +13058,7 @@ do
     "conf/mime.convs") CONFIG_FILES="$CONFIG_FILES conf/mime.convs" ;;
     "conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;;
     "conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;;
+    "cups.pc") CONFIG_FILES="$CONFIG_FILES cups.pc" ;;
     "cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;;
     "desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;;
     "doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
index 78e5b619ee8a705dda23b186bbb525b534b92dde..c696f41aab62f4aacaaa7bb2c4798f0671386893 100644 (file)
@@ -73,6 +73,7 @@ AC_CONFIG_FILES([
     conf/mime.convs
     conf/pam.std
     conf/snmp.conf
+    cups.pc
     cups-config
     desktop/cups.desktop
     doc/index.html
diff --git a/cups.pc.in b/cups.pc.in
new file mode 100644 (file)
index 0000000..08cc17d
--- /dev/null
@@ -0,0 +1,36 @@
+#cups pkg-config file
+
+
+VERSION="@CUPS_VERSION@"
+APIVERSION="2.3"
+BUILD="@CUPS_BUILD@"
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+includedir=@includedir@
+libdir=@libdir@
+datarootdir=@datadir@
+#datadir=@datadir@
+sysconfdir=@sysconfdir@
+cups_datadir=@CUPS_DATADIR@
+cups_serverbin=@CUPS_SERVERBIN@
+cups_serverroot=@CUPS_SERVERROOT@
+INSTALLSTATIC=@INSTALLSTATIC@
+
+
+# flags for compiler and linker...
+CFLAGS=" -I${includedir}"
+LDFLAGS="@EXPORT_LDFLAGS@ -L${libdir}"
+Libs.private: @PKGCONFIG_LIBS@
+Name: "CUPS"
+Description: "CUPS API Library"
+Requires.private:@PKGCONFIG_REQUIRES@
+api_version=${APIVERSION}
+build=${BUILD}
+Cflags: ${CFLAGS}
+datadir= ${cups_datadir}
+
+Libs: @EXTLINKCUPS@
+
+Version: ${VERSION}
\ No newline at end of file