Opened 6 years ago

Closed 6 years ago

#2202 closed defect (fixed)

No option to disable json-c lookup by ./configure

Reported by: mloskot Owned by: strk
Priority: medium Milestone: PostGIS 2.1.0
Component: build/upgrade/install Version: trunk
Keywords: jsonc Cc:

Description

./configure provides only one option to control searching of json-c library files:

$ ./configure --help|grep json
  --with-jsondir=PATH     specify the json-c installation directory

Assuming json-c is optional, unlike PROJ.4 library, if one wants to build PostGIS without json-c support on a system with json-c library installed, then the ./configure always detects and adds json-c support.

There is no option like --without-jsonc or --disable-jsonc.

Attachments (1)

2202-json-lookup-configure-option.patch (5.0 KB) - added by mloskot 6 years ago.
Patch that refactors json-c lookup to support --without option. It also implements Sandro's suggestion to rename the option to reflect json-c library name.

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by mloskot

Patch that refactors json-c lookup to support --without option. It also implements Sandro's suggestion to rename the option to reflect json-c library name.

comment:1 Changed 6 years ago by strk

A vanilla ./configure bails out: configure: error: Cannot find json dev files in ""

It works fine without the patch

comment:2 Changed 6 years ago by mloskot

Owner: changed from strk to mloskot

This error is not making the json-c optional.

Currently, if I have json-c installed and I do not want to enable json-c support, the only way to achieve it is to uninstall json-c.

comment:3 Changed 6 years ago by strk

Milestone: PostGIS 2.0.3PostGIS 2.1.0

change in configure name goes to 2.1.0. If you come up with a working patch I'll apply. By working I mean that no switch enables it if available, --without disables it without complaining and --with complains if not found or uses from given path if found

comment:4 Changed 6 years ago by mloskot

Sandro, does any of the other switches for 3rd-party deps work the same way? Which one? So I will follow the patter exactly.

comment:5 Changed 6 years ago by strk

Owner: changed from mloskot to strk
Status: newassigned

I'm afraid none of the other switches work the way I described above. Taking a look at this now.

comment:6 Changed 6 years ago by strk

In r11144 (trunk) I added --without-json -- the existing switch remained. See how you like it.

comment:7 in reply to:  5 Changed 6 years ago by mloskot

Replying to strk:

I'm afraid none of the other switches work the way I described above. Taking a look at this now.

Sandro, yes, that's what confused me. Thanks for fixing it anyway.

comment:8 Changed 6 years ago by strk

mloskot: tested ? can we close this ?

comment:9 Changed 6 years ago by mloskot

Resolution: fixed
Status: assignedclosed

Works for me.

Note: See TracTickets for help on using tickets.