Fixed some configuration/compilation issues

Updated configure.ac, that was throwing some 'deprecated' warnings.
Now the configuration process gives python-pkg priority over pkg-config to look for Python libraries and flags, since some systems don't use the latter. pkg-config will still be used if python-config is not found.
Fixed several things in the source files so that they throw no warnings.