@@ -78,6 +78,7 @@ set_defaults () {
7878 enable_debug=1
7979 enable_annot=1
8080 with_sqlite=1
81+ with_pgsql=1
8182 with_camlzip=1
8283 with_dbm=1
8384 with_preempt=1
@@ -107,7 +108,7 @@ full_pwd=`pwd`
107108
108109# # Which options exist? eoptions for enable/disable, woptions for with/without:
109110eoptions=" debug annot natdynlink"
110- woptions=" sqlite dbm camlzip preempt"
111+ woptions=" pgsql sqlite dbm camlzip preempt"
111112
112113print_options () {
113114 for opt in $eoptions ; do
@@ -184,6 +185,7 @@ usage: ./configure [ options ]
184185 --enable-natdynlink, --disable-natdynlink Enable/disable nativecode dynamic linking
185186
186187 --with-sqlite, --without-sqlite Compile ocsipersist with SQLite for persistent storage
188+ --with-pgsql, --without-pgsql Compile ocsipersist with PostgreSQL for persistent storage
187189 --with-dbm, --without-dbm Compile ocsipersist with DBM for persistent storage
188190 --with-camlzip, --without-camlzip Compile deflatemod extension, requires camlzip
189191
@@ -424,6 +426,12 @@ check_library cryptokit "See: http://pauillac.inria.fr/~xleroy/software.html#cry
424426
425427check_library tyxml " See: http://ocsigen.org/tyxml/"
426428
429+ # Check PostgreSQL
430+ case " $with_pgsql " in
431+ 1) if test_library pgocaml; then with_pgsql=1; else with_pgsql=0; fi ;;
432+ 2) check_library pgocaml " https://github.com/darioteixeira/pgocaml" ;;
433+ esac
434+
427435# Check Sqlite3
428436case " $with_sqlite " in
429437 1) if test_library sqlite3; then with_sqlite=1; else with_sqlite=0; fi ;;
@@ -514,6 +522,11 @@ if [ $with_sqlite -gt 0 ] ; then
514522else
515523 with_sqlite=" NO"
516524fi
525+ if [ $with_pgsql -gt 0 ] ; then
526+ with_pgsql=" YES"
527+ else
528+ with_pgsql=" NO"
529+ fi
517530if [ $with_camlzip -gt 0 ] ; then
518531 with_camlzip=" YES"
519532else
@@ -569,6 +582,9 @@ CAMLZIPNAME:=$zipname
569582# Do you want ocsipersist with sqlite? YES/NO
570583OCSIPERSISTSQLITE:=$with_sqlite
571584
585+ # Do you want ocsipersist with pgsql? YES/NO
586+ OCSIPERSISTPGSQL:=$with_pgsql
587+
572588# Do you want ocsipersist with dbm? YES/NO
573589OCSIPERSISTDBM:=$with_dbm
574590
0 commit comments