Ok. I presume there is a package ready for you that doesn't need to get build just running:
sudo apt-get install cups-pdf
The version of the package is 2.6.1. The same you are trying to build! If you still want to continue, lets check the instructions:
Edit src/cups-pdf.h if you do not like /etc/cups as location for your
configuration files.
This probably is ok.
To compile CUPS-PDF, invoke gcc in the src/ directory:
gcc -O9 -s -lcups -o cups-pdf cups-pdf.c
Note: you will have to have the deveopment package for CUPS installed
in order to build CUPS-PDF
You are not doing this correctly. You first need to install the CUPS development libraries:
sudo apt-get install libcups2-dev
Then compile it with the command above:
gcc -O9 -s -lcups -o cups-pdf cups-pdf.c
cups-pdf.c: In function ‘read_config_ppd’:
cups-pdf.c:289:3: warning: ‘ppdFirstOption’ is deprecated (declared at /usr/include/cups/ppd.h:431) [-Wdeprecated-declarations]
option = ppdFirstOption(ppd_file);
^
cups-pdf.c:292:5: warning: ‘ppdNextOption’ is deprecated (declared at /usr/include/cups/ppd.h:433) [-Wdeprecated-declarations]
option = ppdNextOption(ppd_file);
^
Those are build warnings, you can ignore them.
To install the binary, simply copy cups-pdf to the backend directory
of CUPS (usually /usr/lib/cups/backend or /usr/lib64/...).
If you have a 64-bit system, the correct is /usr/lib64, if you have 32-bits the correct is /usr/lib.
Now copy extra/cups-pdf.conf to /etc/cups (or whatever location you
selected in cups-pdf.h above). Here you can set all properties of
CUPS-PDF at runtime without the need for restarting any services.
(The defaults should work fine on most systems.)
This is OK.
If you want to use the color PostScript driver that comes with
CUPS-PDF go to the extra/ subdirectory and copy CUPS-PDF_opt.ppd to
your CUPS model directory (usually /usr/share/cups/model [ /Generic ] ).
If you do not want to set any options via PPD (see section 3), use
CUPS-PDF_noopt.ppd instead.
Ok too. Now, I cheated and installed the package instead and it worked. If it's not working for you it must be due Ubuntu/Debian patchs. Apply those patches and try again.