Skip to content
Snippets Groups Projects
Commit 98d3986c authored by rishwanth1995's avatar rishwanth1995
Browse files

modified configure file

parent 16caffe0
Branches
Tags
No related merge requests found
...@@ -133,12 +133,10 @@ AS_IF([test "x$ac_cv_lib_sqlite3_sqlite3_open" = "xyes"], ...@@ -133,12 +133,10 @@ AS_IF([test "x$ac_cv_lib_sqlite3_sqlite3_open" = "xyes"],
AM_CONDITIONAL([HAVE_LIBSQLITE3], AM_CONDITIONAL([HAVE_LIBSQLITE3],
[test "x$ac_cv_lib_sqlite3_sqlite3_open" = "xyes"]) [test "x$ac_cv_lib_sqlite3_sqlite3_open" = "xyes"])
dnl check for postgresql dnl check for postgresql
AC_CHECK_HEADERS([postgresql/libpq-fe.h], AC_CHECK_HEADERS([postgresql/libpq-fe.h],AC_CHECK_LIB([pq],[PQlibVersion]))
[AC_CHECK_LIB([pq] , [PQlibVersion], [HAVE_POSTGRESQL=1], [HAVE_POSTGRESQL=0])]) AM_CONDITIONAL([HAVE_POSTGRESQL],[test "x$ac_cv_lib_pq_PQlibVersion" = "xyes"])
AM_COND_IF([HAVE_POSTGRESQL],[ax_libpq=yes],[ax_libpq=no])
AM_CONDITIONAL([USE_POSTGRESQL], AM_COND_IF([HAVE_POSTGRESQL], [AC_DEFINE([HAVE_LIBPQ_], [1], [Define if using libpq.])])
[test "$HAVE_POSTGRESQL" -eq 1])
AS_IF([test "$USE_POSTGRESQL" -eq 1], [ax_libpq=yes], [ax_libpq=no])
# Check if we should link afflib. # Check if we should link afflib.
AC_ARG_WITH([afflib], AC_ARG_WITH([afflib],
......
...@@ -135,7 +135,7 @@ TSK_RETVAL_ENUM TskDbPostgreSQL::createDatabase(){ ...@@ -135,7 +135,7 @@ TSK_RETVAL_ENUM TskDbPostgreSQL::createDatabase(){
TSK_RETVAL_ENUM result = TSK_OK; TSK_RETVAL_ENUM result = TSK_OK;
// Connect to PostgreSQL server first // Connect to PostgreSQL server first
char defaultPostgresDb[32] = TEXT("postgres"); char defaultPostgresDb[32] = "postgres";
PGconn *serverConn = connectToDatabase(&defaultPostgresDb[0]); PGconn *serverConn = connectToDatabase(&defaultPostgresDb[0]);
if (!serverConn) if (!serverConn)
return TSK_ERR; return TSK_ERR;
...@@ -229,7 +229,7 @@ bool TskDbPostgreSQL::dbExists() { ...@@ -229,7 +229,7 @@ bool TskDbPostgreSQL::dbExists() {
int numDb = 0; int numDb = 0;
// Connect to PostgreSQL server first // Connect to PostgreSQL server first
char defaultPostgresDb[32] = TEXT("postgres"); char defaultPostgresDb[32] = "postgres";
PGconn *serverConn = connectToDatabase(&defaultPostgresDb[0]); PGconn *serverConn = connectToDatabase(&defaultPostgresDb[0]);
if (!serverConn) if (!serverConn)
return false; return false;
......
...@@ -40,7 +40,7 @@ using std::map; ...@@ -40,7 +40,7 @@ using std::map;
*/ */
class TskDbPostgreSQL : public TskDb { class TskDbPostgreSQL : public TskDb {
public: public:
TskDbPostgreSQL(const cha * a_dbFilePath, bool a_blkMapFlag); TskDbPostgreSQL(const char * a_dbFilePath, bool a_blkMapFlag);
~TskDbPostgreSQL(); ~TskDbPostgreSQL();
int open(bool); int open(bool);
int close(); int close();
......
...@@ -60,6 +60,12 @@ ...@@ -60,6 +60,12 @@
/* Define to 1 if you have the <libewf.h> header file. */ /* Define to 1 if you have the <libewf.h> header file. */
#undef HAVE_LIBEWF_H #undef HAVE_LIBEWF_H
/* Define to 1 if you have the `pq' library (-lpq). */
#undef HAVE_LIBPQ
/* Define if using libpq. */
#undef HAVE_LIBPQ_
/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
#undef HAVE_LIBSQLITE3 #undef HAVE_LIBSQLITE3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment