dnl # +----------------------------------------------------------------------+ dnl # | Aubit 4gl Language Compiler Version $.0 | dnl # +----------------------------------------------------------------------+ dnl # | Copyright (c) 2000-1 Aubit Development Team (See Credits file) | dnl # +----------------------------------------------------------------------+ dnl # | This program is free software; you can redistribute it and/or modify | dnl # | it under the terms of one of the following licenses: | dnl # | | dnl # | A) the GNU General Public License as published by the Free Software | dnl # | Foundation; either version 2 of the License, or (at your option) | dnl # | any later version. | dnl # | | dnl # | B) the Aubit License as published by the Aubit Development Team and | dnl # | included in the distribution in the file: LICENSE | dnl # | | dnl # | This program is distributed in the hope that it will be useful, | dnl # | but WITHOUT ANY WARRANTY; without even the implied warranty of | dnl # | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | dnl # | GNU General Public License for more details. | dnl # | | dnl # | You should have received a copy of both licenses referred to here. | dnl # | If you did not, or have any questions about Aubit licensing, please | dnl # | contact afalout@ihug.co.nz | dnl # +----------------------------------------------------------------------+ dnl # dnl # $Id: configure.in,v 1.444 2012/11/27 18:34:44 locbook Exp $ dnl # dnl #TODO: check that WARN_LD_LIBRARY_PATH is set ONLY if user specified custom withval dnl #and then check that it is no already in LD_LIBRARY_PATH or ldconfig file. Only dnl #then issue a warning. dnl # dnl # dnl #Process this file with autoconf to produce a configure script. dnl #This script is used to configure BOTH source code and binary distributions #Note: all command line switches like "--xxxx-wwwww" are automativaly #converted to shell variables in "xxxxx_wwwww" format. #--disable-xxx are not assigned "yes" by default #--with-xxx are assigned "yes" if no value was assigned on command line ## ================================================================== ## Initialise ## ================================================================== #Workaround for Informix created libphtread mess: export LD_LIBRARY_PATH=/lib:$LD_LIBRARY_PATH #We need autoconf at least version 2.50 AC_PREREQ(2.50) AC_REVISION($Id: configure.in,v 1.444 2012/11/27 18:34:44 locbook Exp $) #FIXME: Some versions of autoconf are complaining that $AUBIT_VERSION and #$AUBIT_BUILD are not constants. Maybe we should drop stuff in tools/project #alltogether, use Autoconf instead? dnl source directory sanity check using an arbitrary source file AC_INIT([Aubit4gl],[$AUBIT_VERSION.$AUBIT_BUILD],[aubit4gl-discuss@lists.sourceforge.net]) #Need to be here too, to be used in AC_INIT call: #>>>>>>>>>>>>>>>>FIXME - DOES NOT WORK HERE - works only after AC_INIT!!!!<<<<<<<<<<<<<<<<<<<<<<<< if test -f "tools/project/version" ; then TMPaaa=`grep -c '=' tools/project/version` if test "$TMPaaa" -gt 0 ; then AC_MSG_ERROR( tools/project/version CVS merge conflict. Stop.) fi TMPaaa=`grep -c '=' tools/project/build` if test "$TMPaaa" -gt 0 ; then AC_MSG_ERROR( tools/project/build CVS merge conflict. Stop.) fi AUBIT_VERSION=`cat tools/project/version` AUBIT_BUILD=`cat tools/project/build` #Cant test version since its a decimal not integer #if test "$AUBIT_VERSION" -lt 0 -o "$AUBIT_VERSION" = ""; then if test "$AUBIT_VERSION" = "" ; then AC_MSG_ERROR( tools/project/version file is empty. Stop.) fi if test "$AUBIT_BUILD" = "" ; then AC_MSG_ERROR( tools/project/build file is empty. Stop.) fi if test "$AUBIT_BUILD" -lt 0 ; then AC_MSG_ERROR( tools/project/build file is invalid. Stop.) fi AC_MSG_CHECKING(Aubit version) AC_MSG_RESULT(-$AUBIT_VERSION.$AUBIT_BUILD-) else echo "Configuring binary installation" fi ############################################################ # WARNING - any code you add to this file (including 'echo') #will work ONLY at this point (after AC_INIT) ############################################################ ########################################################################## ## ## ## Check whether config.cache belongs to this machine ## ## ## ########################################################################## AC_MSG_CHECKING(cached information) hostcheck="$host" AC_CACHE_VAL(ac_cv_hostcheck, [ ac_cv_hostcheck="$hostcheck" ]) if test "$ac_cv_hostcheck" != "$hostcheck"; then AC_MSG_RESULT(changed) AC_MSG_WARN([Running on a different architecture.]) AC_MSG_WARN([Cant use cached values.]) AC_MSG_ERROR([Please remove the invalid config.cache file, then try again.]) else AC_MSG_RESULT(ok) fi ########################################################################## ## ## ## Save configuration for later reuse ## ## ## ########################################################################## echo creating config.nice rm -f config.nice cat >config.nice<> config.nice for arg in $ac_configure_args do echo "$arg \\" >> config.nice done echo '"$@"' >> config.nice chmod +x config.nice ########################################################################## #needed to initialize AutoMake functionallity, that will create Makefile.in #files from Makefile.am: #AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE(Aubit4gl, $AUBIT_VERSION.$AUBIT_BUILD) aubitdir=`pwd` #define emphasis (bold) characters for terminal display if test -f "$aubitdir/bin/shtool"; then a4gl_shtool="$aubitdir/bin/shtool" else if test -f "$aubitdir/tools/project/shtool"; then a4gl_shtool="$aubitdir/tools/project/shtool" fi fi if test "$a4gl_shtool" != ""; then T_MD=`$a4gl_shtool echo -n -e %B` T_ME=`$a4gl_shtool echo -n -e %b` fi #An example of using --enable-xxx : #AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging], #if test "$enableval" = "yes" ; then # WITH_DEBUG=yes #fi) #AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) #Store parameters this script was invoked with CONFIGURE_COMMAND="$ac_configure_args" #location of additional Autoconf files AC_CONFIG_AUX_DIR(etc/config) STD_CFLAGS=$CFLAGS #Purpose of 'aubitconf' script is to hold all the command line switches #to 'configure' on your system, and is local to your system. If found in #path, it will be invoked instead of just plain 'configure' #aubitconf script will typically have only one line, for example: #./configure --with-aubitconf --with-informix --with-jabber -with-iodbc=/blah/huh/iodbc $@ ...etc if test "$AUBITCONF_FLAG" != "running"; then ## ================================================================== ## check what the byte ordering is: prepare test file ## ================================================================== #This must be done on first pass only, since after we invoke #aubitconf, "echo -e" will not work ... ## rm -f ./order.c ./order ./order.exe ./order.o ./order.tmp ## ## echo "" > order.c ## echo "main() {" >> order.c ## echo "short a;" >> order.c ## echo "char *ptr;" >> order.c ## echo "a=1;" >> order.c ## echo "ptr=(char *)&a;" >> order.c ## ### if test "$COMSPEC" = ""; then ## #echo "-------------------NOT On Windows" ## echo 'printf("%d%d",ptr\1330\135,ptr\1331\135);' > order.tmp ## xx=`cat order.tmp` ## echo -e "$xx" >> order.c ### else ### #echo "-------------------On Windows" ### #echo 'printf("%d%d",ptr[0],ptr[1]);' > order.tmp ### #This craps out on CygWin ### echo -e 'printf("%d%d",ptr\1330\135,ptr\1331\135);' >> order.c ### fi ## ## echo "}" >> order.c ## echo "" >> order.c ## ## #Above code is obsolete; see AC_C_BIGENDIAN later in the code ## ## ############################## PHP_CONFIGURE_PART(Looking for configure parameters file:) AC_PATH_PROG(AUBITCONF, aubitconf, no) if test "$AUBITCONF" != "no"; then #use this instead : #if test "$with_all" = ""; then with_all=yes ;fi #AC_ARG_WITH(all, #[ --with-all[=yes/no] Try to autodetect all available features. Defaults to # 'yes'. Same as specifying --with-(sapdb pgsql sqlite #[ # ...code... #],[ # AC_MSG_RESULT(Autodetect (--with-all) not specified.) #]) if test "$with_aubitconf" != "no" ; then PHP_CONFIGURE_PART(Redirecting to 'aubitconf':) if test "$CONFIGURE_COMMAND" != ""; then cat< 1) in ./configure I get a core dump when trying to figure command line length. #> I do a "export lt_cv_sys_max_cmd_len=200" before configure and that #> seems to clear it up. export lt_cv_sys_max_cmd_len=200 ;; esac #if test "$AUBIT_SOURCE" = "1" ; then #Skipping this block causes : #configure: WARNING: pdflib.h: accepted by the compiler, rejected by the preprocessor! # #configure:18595: checking pdflib.h usability #configure:18607: gcc -c -g -O2 conftest.c >&5 #configure:18613: $? = 0 #configure:18617: test -z # || test ! -s conftest.err #configure:18620: $? = 0 #configure:18623: test -s conftest.o #configure:18626: $? = 0 #configure:18636: result: yes #configure:18640: checking pdflib.h presence #configure:18650: conftest.c #./configure: line 18651: conftest.c: command not found #Should be like this: #configure:16507: checking sxml.h usability #configure:16519: gcc -c -g -O2 -I/usr/local/include conftest.c >&5 #configure:16525: $? = 0 #configure:16529: test -z # || test ! -s conftest.err #configure:16532: $? = 0 #configure:16535: test -s conftest.o #configure:16538: $? = 0 #configure:16548: result: yes #configure:16552: checking sxml.h presence #configure:16562: gcc -E -I/usr/local/include conftest.c #configure:16568: $? = 0 #configure:16588: result: yes #this would try to make etc/config/ltmain.sh (do we care?) AC_PROG_LIBTOOL AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) #fi ## ================================================================== ## Define what will get substituted ## ================================================================== #Identification AC_SUBST(aubitdir) AC_SUBST(aubitdir_src) AC_SUBST(COMPILE_DATE) AC_SUBST(AUBIT_VERSION) AC_SUBST(AUBIT_BUILD) AC_SUBST(AUBIT_WEBSITE) AC_SUBST(AUBIT_PUBLISHER) AC_SUBST(FULLNAME) AC_SUBST(SHORTNAME) AC_SUBST(MACHTYPE) AC_SUBST(GREP_WORD) #aubitrc: AC_SUBST(AUBITETC) AC_SUBST(A4GL_SQLTYPE) AC_SUBST(A4GL_SQLTYPE_DETECTED) AC_SUBST(A4GL_SQLTYPE_COMPILE_ONLY_DETECTED) AC_SUBST(STD_CFLAGS) AC_SUBST(A4GL_PDFTYPE) AC_SUBST(A4GL_PDFTYPE_DETECTED) AC_SUBST(A4GL_RPCTYPE) AC_SUBST(A4GL_RPCTYPE_DETECTED) AC_SUBST(A4GL_UI) AC_SUBST(A4GL_UI_DETECTED) AC_SUBST(A4GL_LEXTYPE) AC_SUBST(A4GL_LEXTYPE_DETECTED) AC_SUBST(A4GL_LEXDIALECT) AC_SUBST(A4GL_LEXDIALECT_DETECTED) AC_SUBST(A4GL_FORMTYPE) AC_SUBST(A4GL_FORMTYPE_DETECTED) AC_SUBST(A4GL_MSGTYPE) AC_SUBST(A4GL_MSGTYPE_DETECTED) AC_SUBST(A4GL_PACKER) AC_SUBST(A4GL_PACKER_DETECTED) AC_SUBST(A4GL_DBPATH) AC_SUBST(SQLUID) AC_SUBST(SQLPWD) #SQL AC_SUBST(ODBC_LIB_NAME) #Informix ESQL/C AC_SUBST(IFMX_ESQLC) AC_SUBST(IFX_ESQL_FLAGS) AC_SUBST(IFX_LIBS) AC_SUBST(IFX_LFLAGS) AC_SUBST(IFX_INCLUDE) AC_SUBST(IFX_C_MAKE) AC_SUBST(INFORMIXDIR) AC_SUBST(INFORMIXDIR_UNQUOTED) AC_SUBST(INFORMIXC) AC_SUBST(A4GL_SQLTYPE_EC_VALID_INFORMIX) #Informix ODBC AC_SUBST(HAVE_IFXODBC) #MySQL AC_SUBST(MYSQL_LFLAGS) AC_SUBST(MYSQL_IFLAGS) AC_SUBST(SQL_MYSQL_EMB) AC_SUBST(SQL_MYSQL) #SAP DB ESQL/C AC_SUBST(SAPDB_ESQLC) AC_SUBST(SAPDBROOT) AC_SUBST(SAPDB_LFLAGS) AC_SUBST(SAPDB_INCLUDE) AC_SUBST(SAPDB_INCDIR) AC_SUBST(SAPDB_LIBDIR) AC_SUBST(A4GL_SQLTYPE_EC_VALID_SAPDB) #SAP DB ODBC AC_SUBST(HAVE_SAPODBC) AC_SUBST(SAPODBC_INCLUDE) AC_SUBST(SAPODBC_LFLAGS) AC_SUBST(SAPDB_ODBC_ADDLIBS) #PG ODBC AC_SUBST(HAVE_PGODBC) AC_SUBST(PGODBC_INCLUDE) AC_SUBST(PGODBC_LFLAGS) AC_SUBST(PGODBC_LIBNAME) AC_SUBST(LIBPQ_FE_H_IFLAGS) #PG ESQL AC_SUBST(PGSQL_INCLUDE) AC_SUBST(PGSQL_LFLAGS) AC_SUBST(PGSQL_LIBS) AC_SUBST(PGSQL_INCDIR) AC_SUBST(PGSQL_LIBDIR) AC_SUBST(PG_ESQLC) AC_SUBST(ECPG_INCDIR) AC_SUBST(ECPG_LIBDIR) AC_SUBST(ECPG_LFLAGS) AC_SUBST(ECPG_IFLAGS) AC_SUBST(ECPG_HAVE_ECPGGET_PGCONN) AC_SUBST(ECPG_HAVE_ECPG_GET_CONNECTION) AC_SUBST(ECPG_HAVE_ECPGGET_CONNECTION) AC_SUBST(POSTGRESDIR) AC_SUBST(HAVE_PGSQL_LIB) AC_SUBST(PG_ESQLC_HASV3) #AC_SUBST(HAVE_PG_INFORMIX_ESQL_DECIMAL_H) #AC_SUBST(HAVE_POSTGRESQL_INFORMIX_ESQL_DECIMAL_H) #AC_SUBST(HAVE_PGSQL_INFORMIX_ESQL_DECIMAL_H) AC_SUBST(A4GL_SQLTYPE_EC_VALID_POSTGRES) #UnixODBC AC_SUBST(HAVE_UNIXODBC) AC_SUBST(UNIXODBC_INCLUDE) AC_SUBST(UNIXODBC_LFLAGS) AC_SUBST(UNIXODBC_LIBS) #Iodbc AC_SUBST(HAVE_IODBC) AC_SUBST(IODBC_INCLUDE) AC_SUBST(IODBC_LFLAGS) AC_SUBST(IODBC_LIBS) #GTK+ AC_SUBST(GTKBUILD) AC_SUBST(GTK_LIB_PATH) AC_SUBST(GTK_INC_PATH) AC_SUBST(GTKLIBS) AC_SUBST(GTK_NAME) AC_SUBST(GDK_NAME) AC_SUBST(GLIB_NAME) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GTK_VERSION) AC_SUBST(HAS_GLADE_2) #Sun RPC/XDR AC_SUBST(RPCGEN) AC_SUBST(RPCLIB_INCLUDE) AC_SUBST(RPCLIB_LFLAGS) AC_SUBST(RPCLIB_NAME) AC_SUBST(USE_RPCGEN) AC_SUBST(HAVE_RPCLIB) #XML RPC AC_SUBST(XML_RPC) AC_SUBST(XMLRPC_C_CONFIG) AC_SUBST(XMLRPC_LFLAGS) AC_SUBST(XMLRPC_IFLAGS) AC_SUBST(XMLRPC_LIBS) #PDF AC_SUBST(USE_PDF) AC_SUBST(PDFBUILD) AC_SUBST(PDFLIB_I_FLAGS) AC_SUBST(PDFLIB_L_FLAGS) #DoxyGen AC_SUBST(DOXYGEN) AC_SUBST(HAVE_DOT) AC_SUBST(DOT_PATH) AC_SUBST(DOXY_BIN_ABSPATH) #http server AC_SUBST(CGI_DIR) AC_SUBST(APACHECTL) AC_SUBST(HTTPD) AC_SUBST(APACHE_CONF) AC_SUBST(WWW_HOST_NAME) AC_SUBST(WWW_DOCUMENT_ROOT) #RPM AC_SUBST(RPM) AC_SUBST(AUTOSPEC) AC_SUBST(RPMBUILDROOT) AC_SUBST(RPM_A4GL_DEFAULT_PREFIX) #ORBit CORBA: AC_SUBST(HAS_ORBIT_TYPE) AC_SUBST(ORBIT_IDL) AC_SUBST(ORBIT_NAME) AC_SUBST(ORBIT_VERSION) AC_SUBST(CAPI_LDFLAGS) AC_SUBST(CAPI_CFLAGS) AC_SUBST(ORBIT_CONFIG) #Jabber/Iksemel lib AC_SUBST(JABBERBUILD) AC_SUBST(IKSEMEL_L_FLAGS) AC_SUBST(IKSEMEL_I_FLAGS) #exdatatype AC_SUBST(EXDATA_MPZ) AC_SUBST(EXDTYPE) AC_SUBST(EXDTYPE_DETECTED) AC_SUBST(MPZ_LFLAGS) AC_SUBST(MPZ_IFLAGS) #other AC_SUBST(DBGFLAG) AC_SUBST(INGRES_INST_PATH) AC_SUBST(HAVE_INGRES_ESQLC) AC_SUBST(INGRES_ESQLC) AC_SUBST(A4GL_SQLTYPE_EC_VALID_INGRES) AC_SUBST(POP_INC_PATH) AC_SUBST(POP_LIB_PATH) AC_SUBST(SMTP_INC_PATH) AC_SUBST(SMTP_LIB_PATH) AC_SUBST(HAVE_ZLIB) AC_SUBST(HAVE_LIBDL) AC_SUBST(USE_LIBDL) AC_SUBST(ZLIB_INC_PATH) AC_SUBST(ZLIB_LIB_PATH) AC_SUBST(INSTALL_MISSING_OPTIONAL) AC_SUBST(PERL) AC_SUBST(PERLBUILD) AC_SUBST(LDCONFIG) AC_SUBST(target) AC_SUBST(target_cpu) AC_SUBST(ADD_LD_LIBRARY_PATH) AC_SUBST(WARN_LD_LIBRARY_REASON) AC_SUBST(APIC) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_SHARED) #AC_SUBST(YACC) AC_SUBST(BISON) AC_SUBST(BISON_EXE) AC_SUBST(PCODE_ENABLED) AC_SUBST(LEX) AC_SUBST(LCLINTEXE) AC_SUBST(EXPECT) AC_SUBST(SO_EXT) AC_SUBST(SO_EXT_LINKABLE) AC_SUBST(GETOPT_LONG) AC_SUBST(ARCHEXT) AC_SUBST(CONFIGURE_COMMAND) AC_SUBST(GCC_VERSION_MAJOR) AC_SUBST(GCC_VERSION_MINOR) AC_SUBST(GCC_MINGW) AC_SUBST(GCC_HOME_WINPATH) AC_SUBST(GCC_HOME_CYGPATH) AC_SUBST(CYGWIN_PATH_WIN) AC_SUBST(HAS_CHECK) AC_SUBST(WGET) AC_SUBST(REDHAT_VER) AC_SUBST(REDHAT_NAME) AC_SUBST(STRIP_EXECUTABLES) AC_SUBST(STRIP) AC_SUBST(WINDOWS_DRIVE) AC_SUBST(SYSDRIVE) AC_SUBST(WINDIR) AC_SUBST(CYGWIN_PATH) AC_SUBST(EFENCE) AC_SUBST(CINT) AC_SUBST(CINTSYSDIR) AC_SUBST(SQLITE_LDPATH) AC_SUBST(SQLITE_LDPATH2) AC_SUBST(SQLITE_LIBNAME) AC_SUBST(SQLITE_ROOT) AC_SUBST(SQLITE_ODBC) AC_SUBST(SQLITE_ODBC_VER) AC_SUBST(SQLITE_ODBC_LIBNAME_SHARED) AC_SUBST(SQLITE_ODBC_LIBNAME_STATIC) AC_SUBST(SQLITE_ODBC_LIBDIR) AC_SUBST(Q_ESQLC) AC_SUBST(AUBIT_LICENSE) AC_SUBST(AUBIT_COPYRIGHT_MSG) AC_SUBST(PCRE_INC_PATH) AC_SUBST(PCRE_LIB_PATH) AC_SUBST(MSYS_ROOTDIR) AC_SUBST(MINGW_ROOTDIR) AC_SUBST(HAVE_MQLIB) AC_SUBST(HAVE_SXMLLIB) AC_SUBST(I4GL_PCOMPILER) AC_SUBST(enable_minimal) #Inno Setup: AC_SUBST(IS_SOURCE) #AC_SUBST(IS_SOURCE_GTK) AC_SUBST(INNO_ROOTDIR) AC_SUBST(INNO_VERSION) AC_SUBST(ISTOOL_ROOTDIR) #Autopackage: AC_SUBST(BINRELOC) AC_SUBST(APGCC) AC_SUBST(APGPP) AC_SUBST(MAKEINSTALLER) AC_SUBST(OBJDUMP) #curses: AC_SUBST(CURSES_LIB_PATH) AC_SUBST(CURSES_INC_PATH) AC_SUBST(HAVE_CURSES) AC_SUBST(HAVE_WIDE_NCURSES) AC_SUBST(CURSES_LIB_NAME) AC_SUBST(HAVE_PDCURSES) AC_SUBST(HAS_PDCURSES_STATIC_OBJS) AC_SUBST(PD_CURSES_LIB_PATH) AC_SUBST(PD_CURSES_INC_PATH) AC_SUBST(PD_CURSES_LIB_NAME) AC_SUBST(PD_CURSES_DRIVE) AC_SUBST(PD_CURSES_CYGDRIVE) AC_SUBST(XCURSES_CFLAGS) AC_SUBST(XCURSES_LIBS) AC_SUBST(HAVE_LIBQRENCODE) AC_SUBST(HAVE_PDFLIB8) AC_SUBST(HAVE_STDCPP) #debug AC_SUBST(DEBUG_BISON) AC_SUBST(YYDEBUG) AC_SUBST(AIX_OBJECT_MODE) AC_SUBST(INCLINES) AC_SUBST(VALGRIND) #Install/deinstall files lists AC_SUBST(FORMS_DESTINATION) AC_SUBST(HELP_DESTINATION) AC_SUBST(COMP_FORM_EXT) AC_SUBST(AMAKE_SH) AC_SUBST(AMAKE_BIN_EXE) AC_SUBST(ALL_SH) AC_SUBST(RUNTIME_RESOURCE) AC_SUBST(COMP_EXE) AC_SUBST(LIB_EXPORTLIB) AC_SUBST(COMP_LIBS) AC_SUBST(PLUGIN_YES) AC_SUBST(PLUGIN_YES_LINKABLE) AC_SUBST(ALL_LIBS) AC_SUBST(ALL_PLUGINS) AC_SUBST(ALL_DOC) AC_SUBST(ALL_EXAMP) AC_SUBST(ALL_EXAMP_GUI) AC_SUBST(RUNTIME_EXE) AC_SUBST(ALL_MAKEFILE) AC_SUBST(CONVSQL_FILES) AC_SUBST(FGLPC_SETTINGS_FILES) AC_SUBST(IMPORT_FILES) AC_SUBST(AMAKE_INCL_FILES) AC_SUBST(ALL_INC) AC_SUBST(ROOT_FILES) AC_SUBST(ETC_FILES) AC_SUBST(INCL_MAKE) AC_SUBST(EXTRAFILE_1) AC_SUBST(EXTRAFILE_2) AC_SUBST(EXTRAFILE_3) AC_SUBST(EXTRAFILE_4) AC_SUBST(EXTRAFILE_5) AC_SUBST(EXTRAFILE_6) AC_SUBST(EXTRAFILE_7) AC_SUBST(EXTRAFILE_8) AC_SUBST(EXTRAFILE_9) AC_SUBST(EXTRAFILE_10) EXTRAFILE_SIZE=10 #files to be packaged into RPM, that are built optionaly because of external #dependencied. Also used for install/deinstall, and to tell make which files to #build: AC_SUBST(RPMFILE_1) AC_SUBST(RPMFILE_2) AC_SUBST(RPMFILE_3) AC_SUBST(RPMFILE_4) AC_SUBST(RPMFILE_5) AC_SUBST(RPMFILE_6) AC_SUBST(RPMFILE_7) AC_SUBST(RPMFILE_8) AC_SUBST(RPMFILE_9) AC_SUBST(RPMFILE_10) AC_SUBST(RPMFILE_11) AC_SUBST(RPMFILE_12) AC_SUBST(RPMFILE_13) AC_SUBST(RPMFILE_14) AC_SUBST(RPMFILE_15) AC_SUBST(RPMFILE_16) AC_SUBST(RPMFILE_17) AC_SUBST(RPMFILE_18) AC_SUBST(RPMFILE_19) AC_SUBST(RPMFILE_20) AC_SUBST(RPMFILE_21) AC_SUBST(RPMFILE_22) AC_SUBST(RPMFILE_23) AC_SUBST(RPMFILE_24) AC_SUBST(RPMFILE_25) AC_SUBST(RPMFILE_26) AC_SUBST(RPMFILE_27) AC_SUBST(RPMFILE_28) AC_SUBST(RPMFILE_29) AC_SUBST(RPMFILE_30) AC_SUBST(RPMFILE_31) AC_SUBST(RPMFILE_32) AC_SUBST(RPMFILE_33) AC_SUBST(RPMFILE_34) AC_SUBST(RPMFILE_35) AC_SUBST(RPMFILE_36) AC_SUBST(RPMFILE_37) AC_SUBST(RPMFILE_38) AC_SUBST(RPMFILE_39) AC_SUBST(RPMFILE_40) AC_SUBST(RPMFILE_41) AC_SUBST(RPMFILE_42) AC_SUBST(RPMFILE_43) AC_SUBST(RPMFILE_44) AC_SUBST(RPMFILE_45) AC_SUBST(RPMFILE_46) AC_SUBST(RPMFILE_47) AC_SUBST(RPMFILE_48) AC_SUBST(RPMFILE_49) AC_SUBST(RPMFILE_50) RPMFILE_SIZE=50 #files to be packaged into Windows installer (InnoSetup), that are built optionaly because of external #dependencies. Cannot use RPMFILE_xx for this since they are needed for lib makefile and install/deinstall AC_SUBST(ISFILE_1) AC_SUBST(ISFILE_2) AC_SUBST(ISFILE_3) AC_SUBST(ISFILE_4) AC_SUBST(ISFILE_5) AC_SUBST(ISFILE_6) AC_SUBST(ISFILE_7) AC_SUBST(ISFILE_8) AC_SUBST(ISFILE_9) AC_SUBST(ISFILE_10) AC_SUBST(ISFILE_11) AC_SUBST(ISFILE_12) AC_SUBST(ISFILE_13) AC_SUBST(ISFILE_14) AC_SUBST(ISFILE_15) AC_SUBST(ISFILE_16) AC_SUBST(ISFILE_17) AC_SUBST(ISFILE_18) AC_SUBST(ISFILE_19) AC_SUBST(ISFILE_20) AC_SUBST(ISFILE_21) AC_SUBST(ISFILE_22) AC_SUBST(ISFILE_23) AC_SUBST(ISFILE_24) AC_SUBST(ISFILE_25) AC_SUBST(ISFILE_26) AC_SUBST(ISFILE_27) AC_SUBST(ISFILE_28) AC_SUBST(ISFILE_29) AC_SUBST(ISFILE_30) AC_SUBST(ISFILE_31) AC_SUBST(ISFILE_32) AC_SUBST(ISFILE_33) AC_SUBST(ISFILE_34) AC_SUBST(ISFILE_35) AC_SUBST(ISFILE_36) AC_SUBST(ISFILE_37) AC_SUBST(ISFILE_38) AC_SUBST(ISFILE_39) AC_SUBST(ISFILE_40) AC_SUBST(ISFILE_41) AC_SUBST(ISFILE_42) AC_SUBST(ISFILE_43) AC_SUBST(ISFILE_44) AC_SUBST(ISFILE_45) AC_SUBST(ISFILE_46) AC_SUBST(ISFILE_47) AC_SUBST(ISFILE_48) AC_SUBST(ISFILE_49) AC_SUBST(ISFILE_50) ISFILE_SIZE=50 AC_SUBST(IS_THIRDPARTY_1) AC_SUBST(IS_THIRDPARTY_2) AC_SUBST(IS_THIRDPARTY_3) AC_SUBST(IS_THIRDPARTY_4) AC_SUBST(IS_THIRDPARTY_5) AC_SUBST(IS_THIRDPARTY_6) AC_SUBST(IS_THIRDPARTY_7) AC_SUBST(IS_THIRDPARTY_8) AC_SUBST(IS_THIRDPARTY_9) AC_SUBST(IS_THIRDPARTY_10) AC_SUBST(IS_THIRDPARTY_11) AC_SUBST(IS_THIRDPARTY_12) AC_SUBST(IS_THIRDPARTY_13) AC_SUBST(IS_THIRDPARTY_14) AC_SUBST(IS_THIRDPARTY_15) AC_SUBST(IS_THIRDPARTY_16) AC_SUBST(IS_THIRDPARTY_17) AC_SUBST(IS_THIRDPARTY_18) AC_SUBST(IS_THIRDPARTY_19) AC_SUBST(IS_THIRDPARTY_20) AC_SUBST(IS_THIRDPARTY_21) AC_SUBST(IS_THIRDPARTY_22) AC_SUBST(IS_THIRDPARTY_23) AC_SUBST(IS_THIRDPARTY_24) AC_SUBST(IS_THIRDPARTY_25) AC_SUBST(IS_THIRDPARTY_26) AC_SUBST(IS_THIRDPARTY_27) AC_SUBST(IS_THIRDPARTY_28) AC_SUBST(IS_THIRDPARTY_29) AC_SUBST(IS_THIRDPARTY_30) AC_SUBST(IS_THIRDPARTY_31) AC_SUBST(IS_THIRDPARTY_32) AC_SUBST(IS_THIRDPARTY_33) AC_SUBST(IS_THIRDPARTY_34) AC_SUBST(IS_THIRDPARTY_35) AC_SUBST(IS_THIRDPARTY_36) AC_SUBST(IS_THIRDPARTY_37) AC_SUBST(IS_THIRDPARTY_38) AC_SUBST(IS_THIRDPARTY_39) AC_SUBST(IS_THIRDPARTY_40) AC_SUBST(IS_THIRDPARTY_41) AC_SUBST(IS_THIRDPARTY_42) AC_SUBST(IS_THIRDPARTY_43) AC_SUBST(IS_THIRDPARTY_44) AC_SUBST(IS_THIRDPARTY_45) AC_SUBST(IS_THIRDPARTY_46) AC_SUBST(IS_THIRDPARTY_47) AC_SUBST(IS_THIRDPARTY_48) AC_SUBST(IS_THIRDPARTY_49) AC_SUBST(IS_THIRDPARTY_50) IS_THIRDPARTY_SIZE=50 #List of libraries that we allways make. Here so we don't have to maintain it #separately for RPM config file, install/deinstall and lib Makefile: AC_SUBST(LIBFILE_1) AC_SUBST(LIBFILE_2) AC_SUBST(LIBFILE_3) AC_SUBST(LIBFILE_4) AC_SUBST(LIBFILE_5) AC_SUBST(LIBFILE_6) AC_SUBST(LIBFILE_7) AC_SUBST(LIBFILE_8) AC_SUBST(LIBFILE_9) AC_SUBST(LIBFILE_10) AC_SUBST(LIBFILE_11) AC_SUBST(LIBFILE_12) AC_SUBST(LIBFILE_13) AC_SUBST(LIBFILE_14) AC_SUBST(LIBFILE_15) AC_SUBST(LIBFILE_16) AC_SUBST(LIBFILE_17) AC_SUBST(LIBFILE_18) AC_SUBST(LIBFILE_19) AC_SUBST(LIBFILE_20) AC_SUBST(LIBFILE_21) AC_SUBST(LIBFILE_22) AC_SUBST(LIBFILE_23) AC_SUBST(LIBFILE_24) AC_SUBST(LIBFILE_25) AC_SUBST(LIBFILE_26) AC_SUBST(LIBFILE_27) AC_SUBST(LIBFILE_28) AC_SUBST(LIBFILE_29) AC_SUBST(LIBFILE_30) AC_SUBST(LIBFILE_31) AC_SUBST(LIBFILE_32) AC_SUBST(LIBFILE_33) AC_SUBST(LIBFILE_34) AC_SUBST(LIBFILE_35) AC_SUBST(LIBFILE_36) AC_SUBST(LIBFILE_37) AC_SUBST(LIBFILE_38) AC_SUBST(LIBFILE_39) AC_SUBST(LIBFILE_40) AC_SUBST(LIBFILE_41) AC_SUBST(LIBFILE_42) AC_SUBST(LIBFILE_43) AC_SUBST(LIBFILE_44) AC_SUBST(LIBFILE_45) AC_SUBST(LIBFILE_46) AC_SUBST(LIBFILE_47) AC_SUBST(LIBFILE_48) AC_SUBST(LIBFILE_49) AC_SUBST(LIBFILE_50) LIBFILE_SIZE=50 #List of libraries that we allways make. For Windows installer. AC_SUBST(ISLIBFILE_1) AC_SUBST(ISLIBFILE_2) AC_SUBST(ISLIBFILE_3) AC_SUBST(ISLIBFILE_4) AC_SUBST(ISLIBFILE_5) AC_SUBST(ISLIBFILE_6) AC_SUBST(ISLIBFILE_7) AC_SUBST(ISLIBFILE_8) AC_SUBST(ISLIBFILE_9) AC_SUBST(ISLIBFILE_10) AC_SUBST(ISLIBFILE_11) AC_SUBST(ISLIBFILE_12) AC_SUBST(ISLIBFILE_13) AC_SUBST(ISLIBFILE_14) AC_SUBST(ISLIBFILE_15) AC_SUBST(ISLIBFILE_16) AC_SUBST(ISLIBFILE_17) AC_SUBST(ISLIBFILE_18) AC_SUBST(ISLIBFILE_19) AC_SUBST(ISLIBFILE_20) AC_SUBST(ISLIBFILE_21) AC_SUBST(ISLIBFILE_22) AC_SUBST(ISLIBFILE_23) AC_SUBST(ISLIBFILE_24) AC_SUBST(ISLIBFILE_25) AC_SUBST(ISLIBFILE_26) AC_SUBST(ISLIBFILE_27) AC_SUBST(ISLIBFILE_28) AC_SUBST(ISLIBFILE_29) AC_SUBST(ISLIBFILE_30) AC_SUBST(ISLIBFILE_31) AC_SUBST(ISLIBFILE_32) AC_SUBST(ISLIBFILE_33) AC_SUBST(ISLIBFILE_34) AC_SUBST(ISLIBFILE_35) AC_SUBST(ISLIBFILE_36) AC_SUBST(ISLIBFILE_37) AC_SUBST(ISLIBFILE_38) AC_SUBST(ISLIBFILE_39) AC_SUBST(ISLIBFILE_40) AC_SUBST(ISLIBFILE_41) AC_SUBST(ISLIBFILE_42) AC_SUBST(ISLIBFILE_43) AC_SUBST(ISLIBFILE_44) AC_SUBST(ISLIBFILE_45) AC_SUBST(ISLIBFILE_46) AC_SUBST(ISLIBFILE_47) AC_SUBST(ISLIBFILE_48) AC_SUBST(ISLIBFILE_49) AC_SUBST(ISLIBFILE_50) ISLIBFILE_SIZE=50 #Executables (RPM) AC_SUBST(EXEFILE_1) AC_SUBST(EXEFILE_2) AC_SUBST(EXEFILE_3) AC_SUBST(EXEFILE_4) AC_SUBST(EXEFILE_5) AC_SUBST(EXEFILE_6) AC_SUBST(EXEFILE_7) AC_SUBST(EXEFILE_8) AC_SUBST(EXEFILE_9) AC_SUBST(EXEFILE_10) AC_SUBST(EXEFILE_11) AC_SUBST(EXEFILE_12) AC_SUBST(EXEFILE_13) AC_SUBST(EXEFILE_14) AC_SUBST(EXEFILE_15) AC_SUBST(EXEFILE_16) AC_SUBST(EXEFILE_17) AC_SUBST(EXEFILE_18) AC_SUBST(EXEFILE_19) AC_SUBST(EXEFILE_20) AC_SUBST(EXEFILE_21) AC_SUBST(EXEFILE_22) AC_SUBST(EXEFILE_23) AC_SUBST(EXEFILE_24) AC_SUBST(EXEFILE_25) AC_SUBST(EXEFILE_26) AC_SUBST(EXEFILE_27) AC_SUBST(EXEFILE_28) AC_SUBST(EXEFILE_29) AC_SUBST(EXEFILE_30) AC_SUBST(EXEFILE_31) AC_SUBST(EXEFILE_32) AC_SUBST(EXEFILE_33) AC_SUBST(EXEFILE_34) AC_SUBST(EXEFILE_35) AC_SUBST(EXEFILE_36) AC_SUBST(EXEFILE_37) AC_SUBST(EXEFILE_38) AC_SUBST(EXEFILE_39) AC_SUBST(EXEFILE_40) AC_SUBST(EXEFILE_41) AC_SUBST(EXEFILE_42) AC_SUBST(EXEFILE_43) AC_SUBST(EXEFILE_44) AC_SUBST(EXEFILE_45) AC_SUBST(EXEFILE_46) AC_SUBST(EXEFILE_47) AC_SUBST(EXEFILE_48) AC_SUBST(EXEFILE_49) AC_SUBST(EXEFILE_50) EXEFILE_SIZE=50 #executables (Windows) AC_SUBST(ISEXEFILE_1) AC_SUBST(ISEXEFILE_2) AC_SUBST(ISEXEFILE_3) AC_SUBST(ISEXEFILE_4) AC_SUBST(ISEXEFILE_5) AC_SUBST(ISEXEFILE_6) AC_SUBST(ISEXEFILE_7) AC_SUBST(ISEXEFILE_8) AC_SUBST(ISEXEFILE_9) AC_SUBST(ISEXEFILE_10) AC_SUBST(ISEXEFILE_11) AC_SUBST(ISEXEFILE_12) AC_SUBST(ISEXEFILE_13) AC_SUBST(ISEXEFILE_14) AC_SUBST(ISEXEFILE_15) AC_SUBST(ISEXEFILE_16) AC_SUBST(ISEXEFILE_17) AC_SUBST(ISEXEFILE_18) AC_SUBST(ISEXEFILE_19) AC_SUBST(ISEXEFILE_20) AC_SUBST(ISEXEFILE_21) AC_SUBST(ISEXEFILE_22) AC_SUBST(ISEXEFILE_23) AC_SUBST(ISEXEFILE_24) AC_SUBST(ISEXEFILE_25) AC_SUBST(ISEXEFILE_26) AC_SUBST(ISEXEFILE_27) AC_SUBST(ISEXEFILE_28) AC_SUBST(ISEXEFILE_29) AC_SUBST(ISEXEFILE_30) AC_SUBST(ISEXEFILE_31) AC_SUBST(ISEXEFILE_32) AC_SUBST(ISEXEFILE_33) AC_SUBST(ISEXEFILE_34) AC_SUBST(ISEXEFILE_35) AC_SUBST(ISEXEFILE_36) AC_SUBST(ISEXEFILE_37) AC_SUBST(ISEXEFILE_38) AC_SUBST(ISEXEFILE_39) AC_SUBST(ISEXEFILE_40) AC_SUBST(ISEXEFILE_41) AC_SUBST(ISEXEFILE_42) AC_SUBST(ISEXEFILE_43) AC_SUBST(ISEXEFILE_44) AC_SUBST(ISEXEFILE_45) AC_SUBST(ISEXEFILE_46) AC_SUBST(ISEXEFILE_47) AC_SUBST(ISEXEFILE_48) AC_SUBST(ISEXEFILE_49) AC_SUBST(ISEXEFILE_50) ISEXEFILE_SIZE=50 #Shell scripts: AC_SUBST(SHFILE_1) AC_SUBST(SHFILE_2) AC_SUBST(SHFILE_3) AC_SUBST(SHFILE_4) AC_SUBST(SHFILE_5) AC_SUBST(SHFILE_6) AC_SUBST(SHFILE_7) AC_SUBST(SHFILE_8) AC_SUBST(SHFILE_9) AC_SUBST(SHFILE_10) AC_SUBST(SHFILE_11) AC_SUBST(SHFILE_12) AC_SUBST(SHFILE_13) AC_SUBST(SHFILE_14) AC_SUBST(SHFILE_15) AC_SUBST(SHFILE_16) AC_SUBST(SHFILE_17) AC_SUBST(SHFILE_18) AC_SUBST(SHFILE_19) AC_SUBST(SHFILE_20) SHFILE_SIZE=20 AC_SUBST(ISSHFILE_1) AC_SUBST(ISSHFILE_2) AC_SUBST(ISSHFILE_3) AC_SUBST(ISSHFILE_4) AC_SUBST(ISSHFILE_5) AC_SUBST(ISSHFILE_6) AC_SUBST(ISSHFILE_7) AC_SUBST(ISSHFILE_8) AC_SUBST(ISSHFILE_9) AC_SUBST(ISSHFILE_10) AC_SUBST(ISSHFILE_11) AC_SUBST(ISSHFILE_12) AC_SUBST(ISSHFILE_13) AC_SUBST(ISSHFILE_14) AC_SUBST(ISSHFILE_15) AC_SUBST(ISSHFILE_16) AC_SUBST(ISSHFILE_17) AC_SUBST(ISSHFILE_18) AC_SUBST(ISSHFILE_19) AC_SUBST(ISSHFILE_20) ISSHFILE_SIZE=20 #Include files: AC_SUBST(INCFILE_1) AC_SUBST(INCFILE_2) AC_SUBST(INCFILE_3) AC_SUBST(INCFILE_4) AC_SUBST(INCFILE_5) AC_SUBST(INCFILE_6) AC_SUBST(INCFILE_7) AC_SUBST(INCFILE_8) AC_SUBST(INCFILE_9) AC_SUBST(INCFILE_10) AC_SUBST(INCFILE_11) AC_SUBST(INCFILE_12) AC_SUBST(INCFILE_13) AC_SUBST(INCFILE_14) AC_SUBST(INCFILE_15) AC_SUBST(INCFILE_16) AC_SUBST(INCFILE_17) AC_SUBST(INCFILE_18) AC_SUBST(INCFILE_19) AC_SUBST(INCFILE_20) AC_SUBST(INCFILE_21) AC_SUBST(INCFILE_22) AC_SUBST(INCFILE_23) AC_SUBST(INCFILE_24) AC_SUBST(INCFILE_25) AC_SUBST(INCFILE_26) AC_SUBST(INCFILE_27) AC_SUBST(INCFILE_28) AC_SUBST(INCFILE_29) AC_SUBST(INCFILE_30) AC_SUBST(INCFILE_31) AC_SUBST(INCFILE_32) AC_SUBST(INCFILE_33) AC_SUBST(INCFILE_34) AC_SUBST(INCFILE_35) AC_SUBST(INCFILE_36) AC_SUBST(INCFILE_37) AC_SUBST(INCFILE_38) AC_SUBST(INCFILE_39) AC_SUBST(INCFILE_40) AC_SUBST(INCFILE_41) AC_SUBST(INCFILE_42) AC_SUBST(INCFILE_43) AC_SUBST(INCFILE_44) AC_SUBST(INCFILE_45) AC_SUBST(INCFILE_46) AC_SUBST(INCFILE_47) AC_SUBST(INCFILE_48) AC_SUBST(INCFILE_49) AC_SUBST(INCFILE_50) INCFILE_SIZE=50 AC_SUBST(ISINCFILE_1) AC_SUBST(ISINCFILE_2) AC_SUBST(ISINCFILE_3) AC_SUBST(ISINCFILE_4) AC_SUBST(ISINCFILE_5) AC_SUBST(ISINCFILE_6) AC_SUBST(ISINCFILE_7) AC_SUBST(ISINCFILE_8) AC_SUBST(ISINCFILE_9) AC_SUBST(ISINCFILE_10) AC_SUBST(ISINCFILE_11) AC_SUBST(ISINCFILE_12) AC_SUBST(ISINCFILE_13) AC_SUBST(ISINCFILE_14) AC_SUBST(ISINCFILE_15) AC_SUBST(ISINCFILE_16) AC_SUBST(ISINCFILE_17) AC_SUBST(ISINCFILE_18) AC_SUBST(ISINCFILE_19) AC_SUBST(ISINCFILE_20) ISINCFILE_SIZE=20 #Examples: AC_SUBST(EXAMPFILE_1) AC_SUBST(EXAMPFILE_2) AC_SUBST(EXAMPFILE_3) AC_SUBST(EXAMPFILE_4) AC_SUBST(EXAMPFILE_5) AC_SUBST(EXAMPFILE_6) AC_SUBST(EXAMPFILE_7) AC_SUBST(EXAMPFILE_8) AC_SUBST(EXAMPFILE_9) AC_SUBST(EXAMPFILE_10) AC_SUBST(EXAMPFILE_11) AC_SUBST(EXAMPFILE_12) AC_SUBST(EXAMPFILE_13) AC_SUBST(EXAMPFILE_14) AC_SUBST(EXAMPFILE_15) AC_SUBST(EXAMPFILE_16) AC_SUBST(EXAMPFILE_17) AC_SUBST(EXAMPFILE_18) AC_SUBST(EXAMPFILE_19) AC_SUBST(EXAMPFILE_20) AC_SUBST(EXAMPFILE_21) AC_SUBST(EXAMPFILE_22) AC_SUBST(EXAMPFILE_23) AC_SUBST(EXAMPFILE_24) AC_SUBST(EXAMPFILE_25) AC_SUBST(EXAMPFILE_26) AC_SUBST(EXAMPFILE_27) AC_SUBST(EXAMPFILE_28) AC_SUBST(EXAMPFILE_29) AC_SUBST(EXAMPFILE_30) AC_SUBST(EXAMPFILE_31) AC_SUBST(EXAMPFILE_32) AC_SUBST(EXAMPFILE_33) AC_SUBST(EXAMPFILE_34) AC_SUBST(EXAMPFILE_35) AC_SUBST(EXAMPFILE_36) AC_SUBST(EXAMPFILE_37) AC_SUBST(EXAMPFILE_38) AC_SUBST(EXAMPFILE_39) AC_SUBST(EXAMPFILE_40) AC_SUBST(EXAMPFILE_41) AC_SUBST(EXAMPFILE_42) AC_SUBST(EXAMPFILE_43) AC_SUBST(EXAMPFILE_44) AC_SUBST(EXAMPFILE_45) AC_SUBST(EXAMPFILE_46) AC_SUBST(EXAMPFILE_47) AC_SUBST(EXAMPFILE_48) AC_SUBST(EXAMPFILE_49) AC_SUBST(EXAMPFILE_50) AC_SUBST(EXAMPFILE_51) AC_SUBST(EXAMPFILE_52) AC_SUBST(EXAMPFILE_53) AC_SUBST(EXAMPFILE_54) AC_SUBST(EXAMPFILE_55) AC_SUBST(EXAMPFILE_56) AC_SUBST(EXAMPFILE_57) AC_SUBST(EXAMPFILE_58) AC_SUBST(EXAMPFILE_59) AC_SUBST(EXAMPFILE_60) EXAMPFILE_SIZE=60 AC_SUBST(ISEXAMPFILE_1) AC_SUBST(ISEXAMPFILE_2) AC_SUBST(ISEXAMPFILE_3) AC_SUBST(ISEXAMPFILE_4) AC_SUBST(ISEXAMPFILE_5) AC_SUBST(ISEXAMPFILE_6) AC_SUBST(ISEXAMPFILE_7) AC_SUBST(ISEXAMPFILE_8) AC_SUBST(ISEXAMPFILE_9) AC_SUBST(ISEXAMPFILE_10) AC_SUBST(ISEXAMPFILE_11) AC_SUBST(ISEXAMPFILE_12) AC_SUBST(ISEXAMPFILE_13) AC_SUBST(ISEXAMPFILE_14) AC_SUBST(ISEXAMPFILE_15) AC_SUBST(ISEXAMPFILE_16) AC_SUBST(ISEXAMPFILE_17) AC_SUBST(ISEXAMPFILE_18) AC_SUBST(ISEXAMPFILE_19) AC_SUBST(ISEXAMPFILE_20) AC_SUBST(ISEXAMPFILE_21) AC_SUBST(ISEXAMPFILE_22) AC_SUBST(ISEXAMPFILE_23) AC_SUBST(ISEXAMPFILE_24) AC_SUBST(ISEXAMPFILE_25) AC_SUBST(ISEXAMPFILE_26) AC_SUBST(ISEXAMPFILE_27) AC_SUBST(ISEXAMPFILE_28) AC_SUBST(ISEXAMPFILE_29) AC_SUBST(ISEXAMPFILE_30) AC_SUBST(ISEXAMPFILE_31) AC_SUBST(ISEXAMPFILE_32) AC_SUBST(ISEXAMPFILE_33) AC_SUBST(ISEXAMPFILE_34) AC_SUBST(ISEXAMPFILE_35) AC_SUBST(ISEXAMPFILE_36) AC_SUBST(ISEXAMPFILE_37) AC_SUBST(ISEXAMPFILE_38) AC_SUBST(ISEXAMPFILE_39) AC_SUBST(ISEXAMPFILE_40) AC_SUBST(ISEXAMPFILE_41) AC_SUBST(ISEXAMPFILE_42) AC_SUBST(ISEXAMPFILE_43) AC_SUBST(ISEXAMPFILE_44) AC_SUBST(ISEXAMPFILE_45) AC_SUBST(ISEXAMPFILE_46) AC_SUBST(ISEXAMPFILE_47) AC_SUBST(ISEXAMPFILE_48) AC_SUBST(ISEXAMPFILE_49) AC_SUBST(ISEXAMPFILE_50) AC_SUBST(ISEXAMPFILE_51) AC_SUBST(ISEXAMPFILE_52) AC_SUBST(ISEXAMPFILE_53) AC_SUBST(ISEXAMPFILE_54) AC_SUBST(ISEXAMPFILE_55) AC_SUBST(ISEXAMPFILE_56) AC_SUBST(ISEXAMPFILE_57) AC_SUBST(ISEXAMPFILE_58) AC_SUBST(ISEXAMPFILE_59) AC_SUBST(ISEXAMPFILE_60) ISEXAMPFILE_SIZE=60 #Makefiles: AC_SUBST(MAKEFILE_1) AC_SUBST(MAKEFILE_2) AC_SUBST(MAKEFILE_3) AC_SUBST(MAKEFILE_4) AC_SUBST(MAKEFILE_5) AC_SUBST(MAKEFILE_6) AC_SUBST(MAKEFILE_7) AC_SUBST(MAKEFILE_8) AC_SUBST(MAKEFILE_9) AC_SUBST(MAKEFILE_10) AC_SUBST(MAKEFILE_11) AC_SUBST(MAKEFILE_12) AC_SUBST(MAKEFILE_13) AC_SUBST(MAKEFILE_14) AC_SUBST(MAKEFILE_15) AC_SUBST(MAKEFILE_16) AC_SUBST(MAKEFILE_17) AC_SUBST(MAKEFILE_18) AC_SUBST(MAKEFILE_19) AC_SUBST(MAKEFILE_20) MAKEFILE_SIZE=20 AC_SUBST(ISMAKEFILE_1) AC_SUBST(ISMAKEFILE_2) AC_SUBST(ISMAKEFILE_3) AC_SUBST(ISMAKEFILE_4) AC_SUBST(ISMAKEFILE_5) AC_SUBST(ISMAKEFILE_6) AC_SUBST(ISMAKEFILE_7) AC_SUBST(ISMAKEFILE_8) AC_SUBST(ISMAKEFILE_9) AC_SUBST(ISMAKEFILE_10) AC_SUBST(ISMAKEFILE_11) AC_SUBST(ISMAKEFILE_12) AC_SUBST(ISMAKEFILE_13) AC_SUBST(ISMAKEFILE_14) AC_SUBST(ISMAKEFILE_15) AC_SUBST(ISMAKEFILE_16) AC_SUBST(ISMAKEFILE_17) AC_SUBST(ISMAKEFILE_18) AC_SUBST(ISMAKEFILE_19) AC_SUBST(ISMAKEFILE_20) ISMAKEFILE_SIZE=20 #Documentation files: AC_SUBST(DOCFILE_1) AC_SUBST(DOCFILE_2) AC_SUBST(DOCFILE_3) AC_SUBST(DOCFILE_4) AC_SUBST(DOCFILE_5) AC_SUBST(DOCFILE_6) AC_SUBST(DOCFILE_7) AC_SUBST(DOCFILE_8) AC_SUBST(DOCFILE_9) AC_SUBST(DOCFILE_10) AC_SUBST(DOCFILE_11) AC_SUBST(DOCFILE_12) AC_SUBST(DOCFILE_13) AC_SUBST(DOCFILE_14) AC_SUBST(DOCFILE_15) AC_SUBST(DOCFILE_16) AC_SUBST(DOCFILE_17) AC_SUBST(DOCFILE_18) AC_SUBST(DOCFILE_19) AC_SUBST(DOCFILE_20) DOCFILE_SIZE=20 AC_SUBST(ISDOCFILE_1) AC_SUBST(ISDOCFILE_2) AC_SUBST(ISDOCFILE_3) AC_SUBST(ISDOCFILE_4) AC_SUBST(ISDOCFILE_5) AC_SUBST(ISDOCFILE_6) AC_SUBST(ISDOCFILE_7) AC_SUBST(ISDOCFILE_8) AC_SUBST(ISDOCFILE_9) AC_SUBST(ISDOCFILE_10) AC_SUBST(ISDOCFILE_11) AC_SUBST(ISDOCFILE_12) AC_SUBST(ISDOCFILE_13) AC_SUBST(ISDOCFILE_14) AC_SUBST(ISDOCFILE_15) AC_SUBST(ISDOCFILE_16) AC_SUBST(ISDOCFILE_17) AC_SUBST(ISDOCFILE_18) AC_SUBST(ISDOCFILE_19) AC_SUBST(ISDOCFILE_20) ISDOCFILE_SIZE=20 #Configuration files: AC_SUBST(CONFFILE_1) AC_SUBST(CONFFILE_2) AC_SUBST(CONFFILE_3) AC_SUBST(CONFFILE_4) AC_SUBST(CONFFILE_5) AC_SUBST(CONFFILE_6) AC_SUBST(CONFFILE_7) AC_SUBST(CONFFILE_8) AC_SUBST(CONFFILE_9) AC_SUBST(CONFFILE_10) AC_SUBST(CONFFILE_11) AC_SUBST(CONFFILE_12) AC_SUBST(CONFFILE_13) AC_SUBST(CONFFILE_14) AC_SUBST(CONFFILE_15) AC_SUBST(CONFFILE_16) AC_SUBST(CONFFILE_17) AC_SUBST(CONFFILE_18) AC_SUBST(CONFFILE_19) AC_SUBST(CONFFILE_20) CONFFILE_SIZE=20 AC_SUBST(ISCONFFILE_1) AC_SUBST(ISCONFFILE_2) AC_SUBST(ISCONFFILE_3) AC_SUBST(ISCONFFILE_4) AC_SUBST(ISCONFFILE_5) AC_SUBST(ISCONFFILE_6) AC_SUBST(ISCONFFILE_7) AC_SUBST(ISCONFFILE_8) AC_SUBST(ISCONFFILE_9) AC_SUBST(ISCONFFILE_10) AC_SUBST(ISCONFFILE_11) AC_SUBST(ISCONFFILE_12) AC_SUBST(ISCONFFILE_13) AC_SUBST(ISCONFFILE_14) AC_SUBST(ISCONFFILE_15) AC_SUBST(ISCONFFILE_16) AC_SUBST(ISCONFFILE_17) AC_SUBST(ISCONFFILE_18) AC_SUBST(ISCONFFILE_19) AC_SUBST(ISCONFFILE_20) ISCONFFILE_SIZE=20 #SQL conversion files AC_SUBST(CONVFILE_1) AC_SUBST(CONVFILE_2) AC_SUBST(CONVFILE_3) AC_SUBST(CONVFILE_4) AC_SUBST(CONVFILE_5) AC_SUBST(CONVFILE_6) AC_SUBST(CONVFILE_7) AC_SUBST(CONVFILE_8) AC_SUBST(CONVFILE_9) AC_SUBST(CONVFILE_10) AC_SUBST(CONVFILE_11) AC_SUBST(CONVFILE_12) AC_SUBST(CONVFILE_13) AC_SUBST(CONVFILE_14) AC_SUBST(CONVFILE_15) AC_SUBST(CONVFILE_16) AC_SUBST(CONVFILE_17) AC_SUBST(CONVFILE_18) AC_SUBST(CONVFILE_19) AC_SUBST(CONVFILE_20) CONVFILE_SIZE=20 AC_SUBST(ISCONVFILE_1) AC_SUBST(ISCONVFILE_2) AC_SUBST(ISCONVFILE_3) AC_SUBST(ISCONVFILE_4) AC_SUBST(ISCONVFILE_5) AC_SUBST(ISCONVFILE_6) AC_SUBST(ISCONVFILE_7) AC_SUBST(ISCONVFILE_8) AC_SUBST(ISCONVFILE_9) AC_SUBST(ISCONVFILE_10) AC_SUBST(ISCONVFILE_11) AC_SUBST(ISCONVFILE_12) AC_SUBST(ISCONVFILE_13) AC_SUBST(ISCONVFILE_14) AC_SUBST(ISCONVFILE_15) AC_SUBST(ISCONVFILE_16) AC_SUBST(ISCONVFILE_17) AC_SUBST(ISCONVFILE_18) AC_SUBST(ISCONVFILE_19) AC_SUBST(ISCONVFILE_20) ISCONVFILE_SIZE=20 #4GLPC compile settings files #TODO - add to RPM and ISS setup files AC_SUBST(FGLPCSETFILE_1) AC_SUBST(FGLPCSETFILE_2) AC_SUBST(FGLPCSETFILE_3) AC_SUBST(FGLPCSETFILE_4) AC_SUBST(FGLPCSETFILE_5) AC_SUBST(FGLPCSETFILE_6) AC_SUBST(FGLPCSETFILE_7) AC_SUBST(FGLPCSETFILE_8) AC_SUBST(FGLPCSETFILE_9) AC_SUBST(FGLPCSETFILE_10) AC_SUBST(FGLPCSETFILE_11) AC_SUBST(FGLPCSETFILE_12) AC_SUBST(FGLPCSETFILE_13) AC_SUBST(FGLPCSETFILE_14) AC_SUBST(FGLPCSETFILE_15) AC_SUBST(FGLPCSETFILE_16) AC_SUBST(FGLPCSETFILE_17) AC_SUBST(FGLPCSETFILE_18) AC_SUBST(FGLPCSETFILE_19) AC_SUBST(FGLPCSETFILE_20) FGLPCSETFILE_SIZE=20 AC_SUBST(ISFGLPCSETFILE_1) AC_SUBST(ISFGLPCSETFILE_2) AC_SUBST(ISFGLPCSETFILE_3) AC_SUBST(ISFGLPCSETFILE_4) AC_SUBST(ISFGLPCSETFILE_5) AC_SUBST(ISFGLPCSETFILE_6) AC_SUBST(ISFGLPCSETFILE_7) AC_SUBST(ISFGLPCSETFILE_8) AC_SUBST(ISFGLPCSETFILE_9) AC_SUBST(ISFGLPCSETFILE_10) AC_SUBST(ISFGLPCSETFILE_11) AC_SUBST(ISFGLPCSETFILE_12) AC_SUBST(ISFGLPCSETFILE_13) AC_SUBST(ISFGLPCSETFILE_14) AC_SUBST(ISFGLPCSETFILE_15) AC_SUBST(ISFGLPCSETFILE_16) AC_SUBST(ISFGLPCSETFILE_17) AC_SUBST(ISFGLPCSETFILE_18) AC_SUBST(ISFGLPCSETFILE_19) AC_SUBST(ISFGLPCSETFILE_20) ISFGLPCSETFILE_SIZE=20 #Import files AC_SUBST(IMPORTFILE_1) AC_SUBST(IMPORTFILE_2) AC_SUBST(IMPORTFILE_3) AC_SUBST(IMPORTFILE_4) AC_SUBST(IMPORTFILE_5) AC_SUBST(IMPORTFILE_6) AC_SUBST(IMPORTFILE_7) AC_SUBST(IMPORTFILE_8) AC_SUBST(IMPORTFILE_9) AC_SUBST(IMPORTFILE_10) AC_SUBST(IMPORTFILE_11) AC_SUBST(IMPORTFILE_12) AC_SUBST(IMPORTFILE_13) AC_SUBST(IMPORTFILE_14) AC_SUBST(IMPORTFILE_15) AC_SUBST(IMPORTFILE_16) AC_SUBST(IMPORTFILE_17) AC_SUBST(IMPORTFILE_18) AC_SUBST(IMPORTFILE_19) AC_SUBST(IMPORTFILE_20) IMPORTFILE_SIZE=20 AC_SUBST(ISIMPORTFILE_1) AC_SUBST(ISIMPORTFILE_2) AC_SUBST(ISIMPORTFILE_3) AC_SUBST(ISIMPORTFILE_4) AC_SUBST(ISIMPORTFILE_5) AC_SUBST(ISIMPORTFILE_6) AC_SUBST(ISIMPORTFILE_7) AC_SUBST(ISIMPORTFILE_8) AC_SUBST(ISIMPORTFILE_9) AC_SUBST(ISIMPORTFILE_10) AC_SUBST(ISIMPORTFILE_11) AC_SUBST(ISIMPORTFILE_12) AC_SUBST(ISIMPORTFILE_13) AC_SUBST(ISIMPORTFILE_14) AC_SUBST(ISIMPORTFILE_15) AC_SUBST(ISIMPORTFILE_16) AC_SUBST(ISIMPORTFILE_17) AC_SUBST(ISIMPORTFILE_18) AC_SUBST(ISIMPORTFILE_19) AC_SUBST(ISIMPORTFILE_20) ISIMPORTFILE_SIZE=20 #Amake files: #(RPM FILES GO WITH INC FILES) AC_SUBST(ISAMAKEFILE_1) AC_SUBST(ISAMAKEFILE_2) AC_SUBST(ISAMAKEFILE_3) AC_SUBST(ISAMAKEFILE_4) AC_SUBST(ISAMAKEFILE_5) AC_SUBST(ISAMAKEFILE_6) AC_SUBST(ISAMAKEFILE_7) AC_SUBST(ISAMAKEFILE_8) AC_SUBST(ISAMAKEFILE_9) AC_SUBST(ISAMAKEFILE_10) AC_SUBST(ISAMAKEFILE_11) AC_SUBST(ISAMAKEFILE_12) AC_SUBST(ISAMAKEFILE_13) AC_SUBST(ISAMAKEFILE_14) AC_SUBST(ISAMAKEFILE_15) AC_SUBST(ISAMAKEFILE_16) AC_SUBST(ISAMAKEFILE_17) AC_SUBST(ISAMAKEFILE_18) AC_SUBST(ISAMAKEFILE_19) AC_SUBST(ISAMAKEFILE_20) ISAMAKEFILE_SIZE=20 #Help files AC_SUBST(HELPFILE_1) AC_SUBST(HELPFILE_2) AC_SUBST(HELPFILE_3) AC_SUBST(HELPFILE_4) AC_SUBST(HELPFILE_5) AC_SUBST(HELPFILE_6) AC_SUBST(HELPFILE_7) AC_SUBST(HELPFILE_8) AC_SUBST(HELPFILE_9) AC_SUBST(HELPFILE_10) HELPFILE_SIZE=10 AC_SUBST(ISHELPFILE_1) AC_SUBST(ISHELPFILE_2) AC_SUBST(ISHELPFILE_3) AC_SUBST(ISHELPFILE_4) AC_SUBST(ISHELPFILE_5) AC_SUBST(ISHELPFILE_6) AC_SUBST(ISHELPFILE_7) AC_SUBST(ISHELPFILE_8) AC_SUBST(ISHELPFILE_9) AC_SUBST(ISHELPFILE_10) ISHELPFILE_SIZE=10 #Form files AC_SUBST(FORMFILE_1) AC_SUBST(FORMFILE_2) AC_SUBST(FORMFILE_3) AC_SUBST(FORMFILE_4) AC_SUBST(FORMFILE_5) AC_SUBST(FORMFILE_6) AC_SUBST(FORMFILE_7) AC_SUBST(FORMFILE_8) AC_SUBST(FORMFILE_9) AC_SUBST(FORMFILE_10) FORMFILE_SIZE=10 AC_SUBST(ISFORMFILE_1) AC_SUBST(ISFORMFILE_2) AC_SUBST(ISFORMFILE_3) AC_SUBST(ISFORMFILE_4) AC_SUBST(ISFORMFILE_5) AC_SUBST(ISFORMFILE_6) AC_SUBST(ISFORMFILE_7) AC_SUBST(ISFORMFILE_8) AC_SUBST(ISFORMFILE_9) AC_SUBST(ISFORMFILE_10) ISFORMFILE_SIZE=10 ## ================================================================== ## Defaults ## ================================================================== #need to do this again, since the earlyer one was before initialisation, #and will not get in substitution otherwise: if test "$AUBIT_SOURCE" = "1" ; then TMPrrr=`grep -c '=' tools/project/version` if test "$TMPrrr" -gt 0 ; then AC_MSG_ERROR( tools/project/version CVS merge conflict. Stop.) fi TMPrrr=`grep -c '=' tools/project/build` if test "$TMPrrr" -gt 0 ; then AC_MSG_ERROR( tools/project/build CVS merge conflict. Stop.) fi AUBIT_VERSION=`cat tools/project/version` AUBIT_BUILD=`cat tools/project/build` #Cant test version since its a decimal not integer #if test "$AUBIT_VERSION" -lt 0 -o "$AUBIT_VERSION" = ""; then if test "$AUBIT_VERSION" = "" ; then AC_MSG_ERROR( tools/project/version file is empty. Stop.) fi if test "$AUBIT_BUILD" = "" ; then AC_MSG_ERROR( tools/project/build file is empty. Stop.) fi if test "$AUBIT_BUILD" -lt 0 ; then AC_MSG_ERROR( tools/project/build file is invalid. Stop.) fi AC_MSG_CHECKING(Aubit version) AC_MSG_RESULT(-$AUBIT_VERSION.$AUBIT_BUILD-) if test "$COMSPEC" = ""; then COLLECT_THIRD_PARTY=0 else COLLECT_THIRD_PARTY=1 fi fi AC_PATH_PROG(GREP, grep, no) GREP_WORD="$ac_cv_path_GREP -w" export GREP_WORD echo "Hello" | $ac_cv_path_GREP -w "Hello" > /dev/null if test $? = 0 then GREP_WORD="$ac_cv_path_GREP -w" export GREP_WORD else GREP_WORD=$ac_cv_path_GREP export GREP_WORD fi #sleep 50 #When set to 1, all options that test for it will be disabled #regardless of wheater there prerequisistites are found or not. This is usually #done because option is broken and cant compile at the moment DO_DISABLE=1 FULLNAME="Aubit 4GL compiler" SHORTNAME="aubit4gl" AUBIT_WEBSITE=aubit4gl.sf.net AUBIT_PUBLISHER="Aubit project development team" AUBIT_LICENSE="GNU GPL/LGPL" AUBIT_COPYRIGHT_MSG="Copyright (C) 1998 - 2006 Aubit development team" COMPILE_DATE=`date +%d-%m-%Y` test_rpclib="1" GTKBUILD=no HAVE_IODBC=no HAVE_UNIXODBC=no HAVE_IFXODBC=no HAVE_PG_ESQL_DECIMAL_H=no HAVE_PGODBC=no PG_ESQLC_HASV3=0 APIC="-fPIC" ODBC_LIB_NAME=noodbc USE_PDF=no PDFBUILD=no HAVE_POPLIB=no HAVE_SMTPLIB=no HAVE_SMTPLIB_PART_END=0 PERLBUILD=no JABBERBUILD=no AUBIT_DEBUG=1 HAVE_RPCLIB=0 EXDATA_MPZ=no IFMX_ESQLC=no Q_ESQLC=no XML_RPC=no CINT=no LCLINTEXE=no STRIP_EXECUTABLES=no cygwin=0 A4GL_PATH_SEP=":" SLASH=\\ INFORMIXC=$CC HAVE_CURSES=0 HAVE_PDCURSES=0 COMP_FORM_EXT=".afr.dat" #if test "$COMSPEC" = ""; then A4GL_EXE_EXT=".4ae" #else # A4GL_EXE_EXT=".exe" #fi AC_PATH_PROG(CYGPATH, cygpath, no) if test "$CYGPATH" != "no"; then #HOMEDRIVE is CygWin created environment variable, points to Windows #installation disk (or is it location of $HOME directories?) #WINDOWS_DRIVE=$HOMEDRIVE WINDOWS_DRIVE=`$CYGPATH -W / | sed -e 's/\// /g' | awk '{print $2}'` #cygpath has this options #System information: # -A, --allusers use `All Users' instead of current user for -D, -P # -D, --desktop output `Desktop' directory and exit # -H, --homeroot output `Profiles' directory (home root) and exit # -P, --smprograms output Start Menu `Programs' directory and exit # -S, --sysdir output system directory and exit # -W, --windir output `Windows' directory and exit #Path where CygWin is intalled, in Windows format (tipically 'C:\cygwin'): CYGWIN_PATH_WIN=`$CYGPATH -w /` #Path where CygWin is installed, without the drive letter (tipically '/cygwin') CYGWIN_PATH=`$CYGPATH -m / | sed -e 's/:/ /g' | awk '{print $2}'` #Windows drive letter of the drive on which CygWin is installed (without column) CYGWIN_DRIVE=`$CYGPATH -m / | sed -e 's/:/ /g' | awk '{print $1}'` fi USE_RPCGEN=0 #SYSTEMDRIVE is Windows created environment variable pointing to drive containing Windows OS SYSDRIVE=$SYSTEMDRIVE AC_EXEEXT AC_OBJEXT AC_OBJEXT # Defines substitute variable OBJEXT based on the output of the compiler, #after .c files have been excluded. Typically set to `.o' if Unix, `.obj' if Win32. AC_CHECK_TYPES([u_int]) if test "$ac_cv_type_u_int" = "yes" then AC_DEFINE(HAVE_U_INT) fi AC_MINGW32 # Checks for the MingW32 compiler environment. If present, sets shell variable #MINGW32 to `yes'. If not present, sets MINGW32 to the empty string. #WARNING-this gives NO when using MiGW GCC with CygWin tools AC_CYGWIN AC_MSG_CHECKING(Autoconf MinGW/CygWin state based on AC macros) AC_MSG_RESULT(MINGW32=$MINGW32 CYGWIN=$CYGWIN) SO_EXT=.so SO_EXT_LINKABLE=$SO_EXT #ARCHEXT=tar.gz ARCHEXT=tgz XMLRPC_C_CONFIG=no #defaults for aubitrc: A4GL_SQLTYPE=nosql A4GL_SQLTYPE_DETECTED=nosql A4GL_SQLTYPE_COMPILE_ONLY_DETECTED=nosql A4GL_SQLTYPE_EC_VALID_ALL="nosql" A4GL_PDFTYPE=NOPDF A4GL_PDFTYPE_DETECTED=NOPDF A4GL_RPCTYPE=NORPC A4GL_RPCTYPE_DETECTED=NORPC A4GL_UI=CONSOLE A4GL_UI_DETECTED=CONSOLE #We can have P-code without C compiler when installing binary packages A4GL_LEXTYPE= A4GL_LEXTYPE_DETECTED= A4GL_LEXDIALECT="" A4GL_LEXDIALECT_DETECTED="" A4GL_FORMTYPE=NOFORM A4GL_FORMTYPE_DETECTED=NOFORM A4GL_MSGTYPE=NATIVE A4GL_MSGTYPE_DETECTED=NATIVE #case "$target_os" in case $host in *linux*) #rpclib is part of clib on Linux APIC="-fPIC" test_rpclib="0" if test -f /etc/redhat-release ; then AC_MSG_CHECKING(RedHat version) REDHAT_NAME=`cat /etc/redhat-release` REDHAT_VER=`echo $REDHAT_NAME | awk '{print $5}'` AC_MSG_RESULT($REDHAT_NAME ($REDHAT_VER)) fi if test "$arch" = x86_64 ; then APIC="-fPIC" fi ;; *-*-mingw*) GCC_MINGW=yes #Autoconf will set TARGET and target_os to CygWin when we use #CygWin tools with MinGW GCC #TARGET=i686-pc-cygwin target_os="mingw" A4GL_PATH_SEP=";" ;; # *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) *-*-cygwin | *-*-cygwin* | *-*-pw32*) ODBC=odbc32; ODBCMANAGER=$ODBC; cygwin=1 SO_EXT=.dll SO_EXT_LINKABLE=$SO_EXT ARCHEXT=zip #check if we are using MinGW GCC with CygWin: #WARNING: THIS TEST OCCURS ONE MORE TIME, LATER IN THIS FILE! TMP_TMP=`gcc -dumpmachine | sed 's/ //g'` if test "$TMP_TMP" != ""; then if test "$TMP_TMP" = "mingw32" ; then GCC_MINGW=yes #Autoconf will set TARGET and target_os to CygWin when we use #CygWin tools with MinGW GCC #TARGET=i686-pc-cygwin target_os="mingw" A4GL_PATH_SEP=";" fi fi ;; #*-sun-solaris2.7 (Jonathan) and 2.8 (Andrej on SF CF) *-sun-solaris*) #INFORMIXC=cc APIC="-fPIC" ;; #powerpc-apple-darwin5.5 (Andrej on SF CF) *-apple-darwin*) #for dlopen() libs (plug-ins): SO_EXT=.bundle #for libaubit4gl and other linkable libs: SO_EXT_LINKABLE=.dylib ;; #hppa2.0w-hp-hpux11.00 *-hp-hpux*) #on HP-UX only native C compiler is supported for compiling Informix # ESQL/C generated C code? INFORMIXC=c89 SO_EXT=.sl SO_EXT_LINKABLE=$SO_EXT SO_LDFLAGS="-b" LDFLAGS_SHARED="-b" ;; *-ibm-aix*) APIC= LDFLAGS_SHARED="-s" SO_EXT=.a SO_EXT_LINKABLE=$SO_EXT ;; *) AC_MSG_WARN(You are using untested platform) echo " Please report success or failure to compile Aubit on this" echo " platform to the mailing list. Thank you." ;; esac if test "$LTPIC" != "" then APIC="$LTPIC" LDFLAGS_SHARED="$LTPIC $shared_flag" else LDFLAGS_SHARED="$APIC -shared" fi dnl Set of available languages. #ALL_LINGUAS="de fr es ko nl no pl pt sl sv" ALL_LINGUAS="en" dnl internationalization macros #AM_GNU_GETTEXT AC_ARG_WITH(sqluid, [ --with-sqluid=username Specify defauld A4GL_SQLUID database user ID (ODBC)], [SQLUID="$withval"]) AC_ARG_WITH(sqlpwd, [ --with-sqlpwd=password Specify default A4GL_SQLPWD database password (ODBC)], [SQLPWD="$withval"]) if test "$with_all" = ""; then with_all=yes ;fi AC_MSG_CHECKING(what to autodetect) AC_ARG_WITH(all, [ --with-all[=yes/no] Try to autodetect all available features. Defaults to 'yes'. Same as specifying --with-(sapdb pgsql sqlite ecpg pdf gtk iksemel informix sqliteodbc sapodbc pgodbc iodbc unixodbc curses ...etc...)=yes. --with-aubitconf=yes/no Enable/disable use of external parameter script named 'aubitconf' --with-bin Force configuring as binary distribution --with-src Force configuring as source code --with-dot=DIR dot tool is part of Graphviz, a graph visualization toolkit from AT&T and Lucent Bell Labs. One of DoxyGen visualisation options. --with-www-name=name Name of the web server URL to use --with-glib=DIR Specify explicit path to GLIB library. --with-pg-all Shorthand to point all PostgreSQL components to same location (--with-ecpg= --with-pgsqleng= --with-pgsql= --with-pgodbc=) --enable-yy-debug for debbuging in function yyparse() --enable-yacc-debug Yacc Debugging --enable-aix-64bit Enable aix 64 bit mode - default 32 bit --enable-printc-debug If INCLINES variable is set then the source target C file is generated with #line (for debugging purposes). --enable-ac-debug Enable AutoConf debugginf of 'configure' script.], [ if test "$withval" != "no"; then AC_MSG_RESULT(everything...) #force this checks even if not specified on command line: ############ various ########### if test "$with_pdf" = ""; then with_pdf=yes ;fi if test "$with_perl" = ""; then with_perl=yes ;fi if test "$with_iksemel" = ""; then with_iksemel=yes ;fi if test "$with_xmlrpc" = ""; then with_xmlrpc=yes ;fi if test "$with_orbit" = ""; then with_orbit=yes ;fi if test "$GCC_MINGW" != "yes"; then if test "$with_rpc" = ""; then FORCE_RPC=1 ;fi fi if test "$with_pcode" = ""; then with_pcode=yes ;fi #--with-pg-all is a shorthand to point all PostgreSQL components to same location if test "$with_pg_all" != ""; then with_ecpg="$with_pg_all" with_pgsqleng="$with_pg_all" with_pgsql="$with_pg_all" with_pgodbc="$with_pg_all" #--with-pgcompat=yes fi ############ database ########## if test "$with_sapdb" = ""; then with_sapdb=yes ;fi if test "$with_mysql" = ""; then with_mysql=yes ;fi if test "$with_pgsql" = ""; then with_pgsql=yes ;fi if test "$with_pgsqleng" = ""; then with_pgsqleng=yes ;fi if test "$with_sqlite" = ""; then with_sqlite=yes ;fi if test "$with_ecpg" = ""; then with_ecpg=yes ;fi if test "$with_pgcompat" = ""; then with_pgcompat=yes ;fi if test "$with_ingres" = ""; then with_ingres=yes ;fi if test "$with_informix" = ""; then with_informix=yes force_informix=yes ;fi if test "$cygwin" != "1" ; then #No point in making directly linked ODBC plug-ins on Windows - use odbc32 if test "$with_sqliteodbc" = ""; then with_sqliteodbc=yes ;fi if test "$with_sapodbc" = ""; then with_sapodbc=yes ;fi if test "$with_pgodbc" = ""; then with_pgodbc=yes ;fi if test "$with_ifxodbc" = ""; then with_ifxodbc=yes ;fi if test "$with_iodbc" = ""; then with_iodbc=yes ;fi if test "$with_unixodbc" = ""; then with_unixodbc=yes ;fi fi ############# User Interface #### if test "$with_gtk" = ""; then with_gtk=yes ;fi #if user did not explicitly asked for Pdcurses, and if not on MinGW (which don't have curses): #FIXME: we don't have $GCC_MINGW here!!! #if test "$with_curses" = "" && test "$with_pdcurses" = "" && test "$GCC_MINGW" != "yes"; then if test "$with_curses" = "" -a "$GCC_MINGW" != "yes"; then with_curses=yes fi #can't do that - we don't actually test for it, we just accept #whatever user specifies #if test "$with_pdcurses" = "" -a "$GCC_MINGW" = "yes"; then # with_pdcurses=yes #fi if test "$with_glade" = ""; then with_glade=yes ;fi if test "$with_cint" = ""; then with_cint=yes ;fi if test "$with_mpz" = ""; then with_mpz=yes ;fi if test "$with_pop" = ""; then with_pop=yes ;fi if test "$with_smtp" = ""; then with_smtp=yes ;fi if test "$with_zlib" = ""; then with_zlib=yes ;fi if test "$with_pcre" = ""; then with_pcre=yes ;fi if test "$with_sxml" = ""; then with_sxml=yes ;fi if test "$with_esqlc" = ""; then with_esqlc=yes ;fi if test "$with_fourj" = ""; then with_fourj=yes ;fi if test "$with_hydra" = ""; then with_hydra=yes ;fi if test "$with_i4gl" = ""; then with_i4gl=yes ;fi if test "$with_httpd" = ""; then with_httpd=yes ;fi if test "$with_java" = ""; then with_java=yes ;fi #Do not link in efence by default - At least on SuSE it generated #anoying copyright message every time an executable liked with it #is envoked if test "$with_efence" = ""; then with_efence=no ;fi if test "$with_bison" = ""; then with_bison=yes ;fi else if test "$with_java" = ""; then with_java=no ;fi AC_MSG_RESULT(Autodetect (--with-all) disabled.) fi ],[ AC_MSG_RESULT(Autodetect (--with-all) not specified.) ]) ## ================================================================== ## Decide on install location for compiler files ## ================================================================== if test "$prefix" = "NONE"; then #Defaults: CUSTOM_PREFIX=0 if test "$cygwin" = "1" ; then #/opt is not created by default on CygWin installations prefix=/usr/local/$SHORTNAME else prefix=/opt/$SHORTNAME fi else #User specified: CUSTOM_PREFIX=1 if test -d "$prefix"; then #We expect user to specify a full installation path; #nothing will be added to it, so if he specifies "/usr" Aubit #executables will go straoght into /usr/bin - is this OK? AC_MSG_WARN( ** Directory specified as prefix:) AC_MSG_WARN( ** $prefix) AC_MSG_WARN( ** already exists.) #Can't do this - if you run configure on already installed Aubit...? #We will have to trust user to know what he's doing to some degree here... :-( right... #AC_MSG_WARN( ** already exists. Adding suffix (/$SHORTNAME)) #prefix=$prefix/$SHORTNAME fi fi AC_MSG_CHECKING(install root 'prefix=$prefix') #must create it now, otherwise -w test will fail if ! test -d "$prefix"; then mkdir "$prefix" > /dev/null 2>&1 PREFIX_CREATED=1 fi if test -w "$prefix"; then AC_MSG_RESULT(Yes ($prefix)) if test "$PREFIX_CREATED" = "1"; then rmdir "$prefix" fi else AC_ARG_ENABLE(prefix-check, [ --disable-prefix-check Disable checking of user specified --prefix=x], echo "1there"; disable_prefix_check=yes , echo "2here"; disable_prefix_check=no ) if test "$disable_prefix_check" = "yes"; then AC_MSG_RESULT(Not writable, but --disable-prefix-check used ($prefix)) AC_MSG_WARN(You will have to run install as user that can write there!) else if test "$CUSTOM_PREFIX" = "1"; then #Some scripts (like aubitbuild) will fail if we just decide to switch #install location from what they specified using --prefix flag, so #we better stop here: AC_MSG_WARN(User specified prefix ($prefix) is invalid. Try using HOME (--prefix=$HOME)) AC_MSG_ERROR(or --disable-prefix-check if you intend to run install as different user. Stop.) else if test -w "$HOME"; then prefix=$HOME/$SHORTNAME AC_MSG_RESULT(No (using $prefix instead)) else AC_MSG_WARN(Cannot determine install path. HOME=$HOME) AC_MSG_ERROR(Please specify it using --prefix=x flag manually) fi fi fi fi if test "$prefix" = "$aubitdir"; then if test "$AUBIT_SOURCE" = "1" ; then echo "ERROR: cannot install Aubit to the same location where you are running 'configure' from" exit 3 fi fi #INST_BASE=$prefix/$SHORTNAME INST_BASE=$prefix #AC_MSG_RESULT(INST_BASE set to $INST_BASE) #Should we specify absolute or relative paths in RPM spec file RPM_ABSOLUTE=1 FORMS_DESTINATION=etc HELP_DESTINATION=etc PLUGIN_DIR="plugins-${AUBIT_VERSION}_${AUBIT_BUILD}" #Warning: "CopyMode: normal" has been superseded by "Flags: promptifolder" in this #version of Inno Setup. Behaving as if "Flags: promptifolder" were specified. #COPYMODE_NORMAL="CopyMode: normal" COPYMODE_NORMAL="Flags: promptifolder" if test "$RPM_ABSOLUTE" = "1"; then #RPM_A4GL_DEFAULT_PREFIX="$INST_BASE" RPM_A4GL_DEFAULT_PREFIX="/opt/aubit4gl-rpm" RPM_LIB_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/lib" RPM_PLUGIN_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/$PLUGIN_DIR" RPM_EXE_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/bin" RPM_SH_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/bin" RPM_INC_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/incl" RPM_EXAMP_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/tools/test" RPM_DOC_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/docs" RPM_CONF_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/etc" RPM_FGLPCSET_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/tools/4glpc/settings" RPM_IMPORT_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/etc/import" RPM_HELP_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/$HELP_DESTINATION" RPM_FORMS_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/$FORMS_DESTINATION" RPM_CONV_PREFIX="$RPM_A4GL_DEFAULT_PREFIX/etc/convertsql" else #Note that RPM demands that files listed in spec file begin with /, otherwise: # File must begin with "/": etc/help_sqlite.hlp RPM_A4GL_DEFAULT_PREFIX="$INST_BASE" RPM_LIB_PREFIX="/lib" RPM_PLUGIN_PREFIX="/$PLUGIN_DIR" RPM_EXE_PREFIX="/bin" RPM_SH_PREFIX="/bin" RPM_INC_PREFIX="/incl" RPM_EXAMP_PREFIX="/tools/test" RPM_DOC_PREFIX="/docs" RPM_CONF_PREFIX="/etc" RPM_FGLPCSET_PREFIX="/tools/4glpc/settings" RPM_IMPORT_PREFIX="/etc/import" RPM_HELP_PREFIX="/$HELP_DESTINATION" RPM_FORMS_PREFIX="/$FORMS_DESTINATION" RPM_CONV_PREFIX="/etc/convertsql" fi #Not used for RPM files: LIB_PREFIX=$INST_BASE/lib PLUGIN_PREFIX=$INST_BASE/$PLUGIN_DIR A4GL_DBPATH=$aubitdir/tools:$INST_BASE/tools ## ================================================================== ## Decide on install location for aubitrc configuration file ## ================================================================== #resource.c reads config file(s) in this order: # 1:/etc/opt/aubit4gl/aubitrc - @AUBITETC@/aubitrc as determined here - global config # 2:/opt/aubit4gl/etc/aubitrc - $AUBITDIR/etc/aubitrc actually, if AUBITDIR is set at this point # /home/mbm/.aubit4gl/aubitrc - mbm??? (in .aubit4gl uunder sers home dir) # /home/mbm/aubitrc - mbm??? (OBSOLETE?) # ./.aubitrc - (current dirctory) # ... and then $XXXX? variable if set #do NOT use installation directory - Aubit programs will find it there #only if they know AUBITDIR, and unless there is a aubitrc in fixed global #location available to provide it (or user created environment variable #$AUBITDIR) this will not be known. USE USER'S HOME DIRECTORY INSTEAD, #because thisc will allways be known dirs="/etc/opt/$SHORTNAME $HOME/.aubit4gl" AUBITETC= for i in $dirs ; do AC_MSG_CHECKING(install location for global aubitrc - $i) ETC_DIR_CREATED=0 if ! test -d "$i"; then mkdir -p "$i" > /dev/null 2>&1 ETC_DIR_CREATED=1 fi if test -w "$i"; then AUBITETC=$i AC_MSG_RESULT(yes) if test "$ETC_DIR_CREATED" = "1"; then rmdir "$i" fi break else AC_MSG_RESULT(no) fi done if test "$AUBITETC" = ""; then AC_MSG_ERROR(Failed to find location for aubitrc configuration file) fi if test "$AUBITETC" != "/etc/opt/$SHORTNAME"; then AC_MSG_WARN(Installing aubitrc for current user only) AC_MSG_WARN(No system global settings will be created) #For sittuations like this we could get Autoconf values directly into #resource.c, but this would mess things up badly if user uses binary #files created this way to create installer and install them on another #machine - resource.c settings are extremely conservative to allow #compiler to work on practiacally any system. fi if test "$COMSPEC" != ""; then #InnoSetup Install location - must install first: #Source code location (#MUST use backslash for InnoSetup): PWD=`pwd` IS_SOURCE=`$CYGPATH -w $PWD` fi ## ================================================================== ## Define permanent list of libraries to build/install ## ================================================================== #List of libraries that we allways make. Here so we don't have to maintain it #separately for RPM config file, install/deinstall and lib Makefile: #List of libraries needed by compiler(s): COMP_LIBS="LEX_EC LEX_C LEX_CS" #if test "$enable_minimal" != "yes"; then # COMP_LIBS="$COMP_LIBS" #fi #Libraries that need 4glc (and in some cases fcompile) to build, and are #buit in all cases: NEED_4GLC_ALL_libs="HELP_std A4GL_string channel A4GL_file A4GL_HTML A4GL_pick A4GL_roman errhook_sample barcode" if test "$AUBIT_SOURCE" = "1" ; then #A4GL_memcache needs (plus many others) which do not exists in MinGW #See http://jehiah.com/projects/memcached-win32/ is interested in Windows port AC_CHECK_HEADERS([ err.h sysexits.h sys/socket.h sys/uio.h netdb.h netinet/in.h netinet/tcp.h ]) if test "$ac_cv_header_err_h" = "yes" \ -a "$ac_cv_header_sysexits_h" = "yes" \ -a "$ac_cv_header_sys_socket_h" = "yes" \ -a "$ac_cv_header_sys_uio_h" = "yes" \ -a "$ac_cv_header_netdb_h" = "yes" \ -a "$ac_cv_header_netinet_in_h" = "yes" \ -a "$ac_cv_header_netinet_tcp_h" = "yes" ; \ then NEED_4GLPC_ALL_libs="$NEED_4GLPC_ALL_libs A4GL_memcache" else echo "A4GL_memcache disabled - missing headers" PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS A4GL_memcache" fi fi if test "$enable_minimal" != "yes"; then #Disabled; libA4GL_HTML is part of 'extra' target, its in alpha state #so there is no need to make it unless user wants to work on it #FIXME: A4GL_HTML should be linkable (LIB_EXPORTLIB), but we are using 4glc #to create dll, and we don't get .a file... if test "$DO_DISABLE" = "1"; then ALL_DISABLED="$ALL_DISABLED A4GL_HTML" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make libhtml'" else NEED_4GLC_ALL_libs="$NEED_4GLC_ALL_libs A4GL_HTML" fi #Define targets for liblogical LIBLOGICAL_EXE_GTK2_DEPEND="layout_engine report_viewer" LIBLOGICAL_BUILD="LOGREPPROC_TXT LOGREPPROC_CSV LOGREPPROC_HTML" LIBLOGICAL_GTK2_DEPEND="LOGREP_CSV LOGREP_TXT LOGREP_HTML" LIBLOGICAL_PDF_DEPEND="LOGREPPROC_PDF" LIBLOGICAL_PDF_GTK2_DEPEND="LOGREP_PDF" fi ALL_LIBS="$NEED_4GLC_ALL_libs $NEED_4GLPC_ALL_libs" ALL_PLUGINS="EXREPORT_NOPDF RPC_NORPC FORM_NOFORM SQL_nosql MSG_NATIVE UI_CONSOLE UI_XML \ PACKER_PACKED PACKER_FORMXML PACKER_PERL PACKER_XML FORM_GENERIC DATA_report LEX_WRITE \ DATA_module DATA_struct_form PACKER_MEMPACKED SQL_FILESCHEMA \ SQLPARSE_NONE SQLPARSE_INFORMIX DATA_module_definition \ $LIBLOGICAL_BUILD" #UI_HLGENERIC #libaubit4gl should be first, to avoid dependency chase #DO NOT PACKAGE libaubit4gl - package versiond lib and create link whn installing #LIB_EXPORTLIB=aubit4gl LIB_EXPORTLIB=aubit4gl-${AUBIT_VERSION}_${AUBIT_BUILD} COUNTER=0 for FILE in $LIB_EXPORTLIB ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "LIBFILE_$COUNTER='$RPM_LIB_PREFIX/lib$FILE$SO_EXT_LINKABLE'" eval "ISLIBFILE_$COUNTER='Source: $IS_SOURCE\lib\lib$FILE$SO_EXT_LINKABLE; DestDir: {app}\bin; Components: runtime'" COUNTER=`(expr $COUNTER + 1) 2>/dev/null` #Windows exports library: eval "ISLIBFILE_$COUNTER='Source: $IS_SOURCE\lib\lib$LIB_EXPORTLIB$SO_EXT_LINKABLE.a; DestDir: {app}\lib; Components: runtime'" done #List of libraries/plug-ins needed by compiler(s), like LEX_EC LEX_C etc. for FILE in $COMP_LIBS ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "LIBFILE_$COUNTER='$RPM_PLUGIN_PREFIX/lib$FILE$SO_EXT'" eval "ISLIBFILE_$COUNTER='Source: $IS_SOURCE\\$PLUGIN_DIR\lib$FILE$SO_EXT; DestDir: {app}\\$PLUGIN_DIR; Components: compiler'" done for FILE in $ALL_LIBS ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "LIBFILE_$COUNTER='$RPM_PLUGIN_PREFIX/lib$FILE$SO_EXT'" eval "ISLIBFILE_$COUNTER='Source: $IS_SOURCE\\$PLUGIN_DIR\lib$FILE$SO_EXT; DestDir: {app}\\$PLUGIN_DIR; Components: runtime'" done for FILE in $ALL_PLUGINS ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "LIBFILE_$COUNTER='$RPM_PLUGIN_PREFIX/lib$FILE$SO_EXT'" eval "ISLIBFILE_$COUNTER='Source: $IS_SOURCE\\$PLUGIN_DIR\lib$FILE$SO_EXT; DestDir: {app}\\$PLUGIN_DIR; Components: runtime'" done if test "$COUNTER" -gt "$LIBFILE_SIZE"; then AC_MSG_ERROR(Capacity of LIBFILE_ variables exceeded - max=$LIBFILE_SIZE count=$COUNTER) fi ## ================================================================== ## Define permanent list of executables to build/install ## ================================================================== #List of executables that we allways make. Here so we don't have to maintain it #separately for RPM config file, install/deinstall and lib Makefile: #Executables needed by Amake AMAKE_BIN_EXE="aubit-config" #Resource files needed by some of the executables RUNTIME_RESOURCE="" #Note: "asql" is just a link to asql_p/_i/_g #Executables that are needed even in run-time distibutions: RUNTIME_EXE="afinderr configurator $AMAKE_BIN_EXE" #Standard compiler executables: COMP_EXE="4glc fcompile amkmessage convertsql 4glpc sql_parse adbschema \ asql_g$A4GL_EXE_EXT a4gl$A4GL_EXE_EXT" if test "$enable_minimal" != "yes"; then #Note: some of them will still be built, but not installed or packaged COMP_EXE="$COMP_EXE aace generate_aace aace_4gl aace_perl \ mcompile mdecompile process_report quick_check_logrep adecompile ide1$A4GL_EXE_EXT \ fdecompile unmkmessage default_frm quickguide$A4GL_EXE_EXT fglproto" RUNTIME_EXE="$RUNTIME_EXE fshow loadmap" else echo "*** NOTE: --enable-minimal specified; some targets disabled" fi #xgen - not needed for binary installs #needs missing source code # BIN_EXE +=fdecompile-j${EXEEXT} #user's manual choice: # BIN_EXE +=odbctest-unixODBC${EXE} # BIN_EXE +=odbctest-iodbc3${EXE} # BIN_EXE +=odbctest-iodbc2${EXE} #NOTE: COMP_EXE, RUNTIME_EXE and RUNTIME_RESOURCE are processed near the #end of this script, to allow for conditional files ## ================================================================== ## Define permanent list of shell scripts to build/install ## ================================================================== AMAKE_SH="amake genmake prepmake" ALL_SH="aubit ecpg_wrap $AMAKE_SH runner_fgl_wrapper adbaccess aperform aace_runner a4gl" #compilers/pcode/runner_fgl_wrapper is copied to bin by pcode makefile #obsolete: ecpg_wrap esql_wrap #ALL_SH="4glpc $AMAKE_SH" #abug.sh #;FIXME: create executables of this two, so we can use Amake without Bash: #Source: @IS_SOURCE@\bin\amake; DestDir: {app}\bin; Components: Shell #Source: @IS_SOURCE@\bin\aubit; DestDir: {app}\bin; Components: Shell COUNTER=0 for FILE in $ALL_SH ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "SHFILE_$COUNTER='$RPM_SH_PREFIX/$FILE'" eval "ISSHFILE_$COUNTER='Source: $IS_SOURCE\bin\\$FILE; DestDir: {app}\bin; Components: Shell'" done COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$RPM_ABSOLUTE" = "1"; then eval "SHFILE_$COUNTER='$RPM_A4GL_DEFAULT_PREFIX/configure'" else eval "SHFILE_$COUNTER='/configure'" fi COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "SHFILE_$COUNTER='$RPM_SH_PREFIX/4GL_metrics.cgi'" COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "SHFILE_$COUNTER='$RPM_SH_PREFIX/shtool'" ## ================================================================== ## Define permanent list of Includes to build/install ## ================================================================== AMAKE_INCL_FILES="header.mki footer.mki footer2.mki footer-c.mki a4gl.mk \ q4gl.mk d4gl.mk i4gl.mk" #TODO: check that all of this is really needed in binary installations: ALL_INC="a4gl_incl_4glhdr.h a4gl_incl_4gldef.h a4gl_4gl_callable.h a4gl_builtin_funcs.h a4gl_rep_structure.h a4gl_screenio.h \ a4gl_exdata.h a4gl_API_exreport.h a4gl_API_form.h a4gl_API_help.h \ a4gl_API_menu.h a4gl_API_rpc.h a4gl_API_sql.h a4gl_API_ui.h a4gl_expr.h \ a4gl_API_sqlparse.h a4gl_API_esql.h a4gl_incl_infx.h \ a4gl_incl_config.h \ a4gl_esql.h a4gl_esql_infx.h a4gl_esql_postgres.h \ a4gl_esql_ingres.h \ a4gl_memhandling.h \ a4gl_esql_infoflex.h" COUNTER=0 for FILE in $ALL_INC ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "INCFILE_$COUNTER='$RPM_INC_PREFIX/$FILE'" eval "ISINCFILE_$COUNTER='Source: $IS_SOURCE\incl\\$FILE; DestDir: {app}\incl; Components: compiler'" done COUNTER2=0 for FILE in $AMAKE_INCL_FILES ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` COUNTER2=`(expr $COUNTER2 + 1) 2>/dev/null` eval "INCFILE_$COUNTER='$RPM_INC_PREFIX/$FILE'" eval "ISAMAKEFILE_$COUNTER2='Source: $IS_SOURCE\incl\\$FILE; DestDir: {app}\incl; Components: Make'" done ## ================================================================== ## Define permanent list of examples to build/install ## ================================================================== ALL_EXAMP="testmenu.menu file.4gl form.per hello.4gl hello_db.4gl \ hello2.4gl helpfile.msg pdf_report.4gl test_build.4gl test_select.4gl \ testmenu.4gl assoc2.4gl testmpz.4gl" if test "$COMSPEC" != ""; then ALL_EXAMP="$ALL_EXAMP make.bat" fi ALL_EXAMP_GUI="gui.per calc.per form-gui.per gui.4gl calc.4gl hello-gui.4gl \ multi.per radio.per widget.per" COUNTER=0 for FILE in $ALL_EXAMP ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "EXAMPFILE_$COUNTER='$RPM_EXAMP_PREFIX/$FILE'" eval "ISEXAMPFILE_$COUNTER='Source: $IS_SOURCE\tools\test\\$FILE; DestDir: {app}\tools\test; Components: FGLexamples'" done for FILE in $ALL_EXAMP_GUI ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "EXAMPFILE_$COUNTER='$RPM_EXAMP_PREFIX/gui/$FILE'" eval "ISEXAMPFILE_$COUNTER='Source: $IS_SOURCE\tools\test\gui\\$FILE; DestDir: {app}\tools\test\gui; Components: FGLexamples'" done #Now add Makefile to be used for installation only: ALL_EXAMP="$ALL_EXAMP Makefile" ALL_EXAMP_GUI="$ALL_EXAMP_GUI Makefile" ## ================================================================== ## Define permanent list of Make files to build/install ## ================================================================== INCL_MAKE="Makefile-common Makefile-install.mki Makefile-common.in" ALL_MAKEFILE="tools/test/Makefile tools/test/gui/Makefile Makefile" IS_ALL_MAKEFILE=`echo "$ALL_MAKEFILE" | sed -e 's/\//\\\\/g'` #;Source: @IS_SOURCE@\Makefile; DestDir: {app}; Components: Make #Source: @IS_SOURCE@\tools\test\gui\Makefile; DestDir: {app}\tools\test\gui; Components: Make #Source: @IS_SOURCE@\tools\test\Makefile; DestDir: {app}\tools\test; Components: Make #Source: @IS_SOURCE@\incl\Makefile-common; DestDir: {app}\incl; Components: Make #Source: @IS_SOURCE@\incl\Makefile-install.mki; DestDir: {app}\incl; Components: Make COUNTER=0 for FILE in $ALL_MAKEFILE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$RPM_ABSOLUTE" = "1"; then eval "MAKEFILE_$COUNTER='$RPM_A4GL_DEFAULT_PREFIX/$FILE'" else eval "MAKEFILE_$COUNTER='/$FILE'" fi done COUNTER=0 for FILE in $IS_ALL_MAKEFILE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` FILEDIR=`dirname $FILE` eval "ISMAKEFILE_$COUNTER='Source: $IS_SOURCE\\$FILE; DestDir: {app}\\$FILEDIR; Components: Make'" done for FILE in $INCL_MAKE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$RPM_ABSOLUTE" = "1"; then eval "MAKEFILE_$COUNTER='$RPM_A4GL_DEFAULT_PREFIX/incl/$FILE'" else eval "MAKEFILE_$COUNTER='/incl/$FILE'" fi eval "ISMAKEFILE_$COUNTER='Source: $IS_SOURCE\incl\\$FILE; DestDir: {app}\incl; Components: Make'" done ## ================================================================== ## Define permanent list of help files to build/install ## ================================================================== ALL_HELP="helpfile.hlp help_aubit.hlp helpsql_POSTGRES.hlp helpsql_POSTGRES8.hlp helpsql_SQLITE.hlp 4glpc.hlp" FORM_FILES="change$COMP_FORM_EXT options$COMP_FORM_EXT values$COMP_FORM_EXT " #Destination for files we use in build process, installation and when #we make installers (relative to Aubit root) #DBPATH should allways be set to that place (as it is in 'aubit' script) #TODO: set it in aubitrc too COUNTER=0 for FILE in $ALL_HELP ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "HELPFILE_$COUNTER='$RPM_HELP_PREFIX/$FILE'" eval "ISHELPFILE_$COUNTER='Source: $IS_SOURCE\\$HELP_DESTINATION\\$FILE; DestDir: {app}\\$HELP_DESTINATION; Components: runtime'" done COUNTER=0 for FILE in $FORM_FILES ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "FORMFILE_$COUNTER='$RPM_FORMS_PREFIX/$FILE'" eval "ISFORMFILE_$COUNTER='Source: $IS_SOURCE\\$FORMS_DESTINATION\\$FILE; DestDir: {app}\\$FORMS_DESTINATION; Components: runtime'" done #NOTE: FORM_FILES and ALL_HELP are added to ETC_FILES later ## ================================================================== ## Define permanent list of documentation files to build/install ## ================================================================== ALL_DOC="COPYING CREDITS LICENSE aubit4gl.ico aubit4gl.png" if test "$COMSPEC" != ""; then ALL_DOC="$ALL_DOC README-Windows.txt" fi ROOT_FILES_DOC="README.txt" COUNTER=0 for FILE in $ALL_DOC ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "DOCFILE_$COUNTER='%doc $RPM_DOC_PREFIX/$FILE'" eval "ISDOCFILE_$COUNTER='Source: $IS_SOURCE\docs\\$FILE; DestDir: {app}\docs; Components: runtime'" done COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$RPM_ABSOLUTE" = "1"; then eval "DOCFILE_$COUNTER='%doc $RPM_A4GL_DEFAULT_PREFIX/$ROOT_FILES_DOC'" else eval "DOCFILE_$COUNTER='%doc /$ROOT_FILES_DOC'" fi eval "ISDOCFILE_$COUNTER='Source: $IS_SOURCE\\$ROOT_FILES_DOC; DestDir: {app}; Components: help'" COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "ISDOCFILE_$COUNTER='Source: $IS_SOURCE\tools\cygwin\readme-runtime.html; DestDir: {app}; Components: help'" ## ================================================================== ## Define permanent list of conversion files to install ## ================================================================== TMP_CONVSQL_FILES="`ls etc/convertsql/*.cnv` README.txt" for FILE in $TMP_CONVSQL_FILES ; do CONVSQL_FILES="$CONVSQL_FILES `basename $FILE`" done COUNTER=0 for FILE in $CONVSQL_FILES ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "CONVFILE_$COUNTER='$RPM_CONV_PREFIX/$FILE'" eval "ISCONVFILE_$COUNTER='Source: $IS_SOURCE\etc\convertsql\\$FILE; DestDir: {app}\etc\convertsql; Components: runtime'" done #TODO: move 4glpc settings under etc TMP_FGLPC_SETTINGS_FILES="`ls tools/4glpc/settings/ | grep -v CVS | grep -v '~'`" TMP_FGLPC_SETTINGS_FILES="`echo $TMP_FGLPC_SETTINGS_FILES`" for FILE in $TMP_FGLPC_SETTINGS_FILES ; do FGLPC_SETTINGS_FILES="$FGLPC_SETTINGS_FILES `basename $FILE`" done COUNTER=0 for FILE in $FGLPC_SETTINGS_FILES ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "FGLPCSETFILE_$COUNTER='$RPM_FGLPCSET_PREFIX/$FILE'" eval "ISFGLPCSEFILE_$COUNTER='Source: $IS_SOURCE\tools\4glpc\settings\\$FILE; DestDir: {app}\tools\4glpc\settings; Components: compiler'" done ## ================================================================== ## Define permanent list of Windows import files to install ## ================================================================== #Import files (libA4GL_glade.dll.a for example) are needed to do linking #on windows. They are not neded for dlopen-ed libs, just for -l link flags #But this files are NOT Windows linking import files, this files are #Import packages allow the coder to use shared libraries without linking #and without requiring the full library::function(...) syntax. #Note that in import files 'a4gl_' is in lower case. There is no extension IMPORT_FILES="a4gl_file a4gl_glade a4gl_html a4gl_pcre a4gl_string \ default channel README" #Fixme: what is 'default' file for - it is empty? #README is file that describes how to use this import files COUNTER=0 for FILE in $IMPORT_FILES ; do if test "$FILE" != ""; then COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "IMPORTFILE_$COUNTER='$RPM_IMPORT_PREFIX/$FILE'" eval "ISIMPORTFILE_$COUNTER='Source: $IS_SOURCE\etc\import\\$FILE; DestDir: {app}\etc\import; Components: runtime'" fi done ## ================================================================== ## Define permanent list of configuration files to build/install ## ================================================================== ROOT_FILES_CONF="install.sh" #allready listed as shell script: $RPM_SH_PREFIX/configure #Warning: ROOT_FILES variable is used by make install target ROOT_FILES="$ROOT_FILES_DOC $ROOT_FILES_CONF" ETC_FILES="gtkrc_2 odbc.ini.example Aubit4GL.jpg" ETC_FILES_CONF="etc/aubitrc-bin.in" ETC_CONFIG_FILES_CONF="etc/config/config.guess etc/config/config.sub \ etc/config/install-sh etc/config/missing etc/config/mkinstalldirs \ etc/config/bootstrap etc/config/ltmain.sh" ALL_CONF="$ETC_CONFIG_FILES_CONF $ETC_FILES_CONF $ROOT_FILES_CONF" COUNTER=0 for FILE in $ETC_FILES ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` #There is not much to gain by marking this RPM files as %config #other then rpm warninng message about saving the backup, since #we are handling (creating/installing) only real config file (aubitrc) #ourselves in post-install part #eval "CONFFILE_$COUNTER='%config $RPM_CONF_PREFIX/$FILE'" eval "CONFFILE_$COUNTER='$RPM_CONF_PREFIX/$FILE'" eval "ISCONFFILE_$COUNTER='Source: $IS_SOURCE\etc\\$FILE; DestDir: {app}\etc; Components: runtime'" done for FILE in $ALL_CONF ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$RPM_ABSOLUTE" = "1"; then eval "CONFFILE_$COUNTER='$RPM_A4GL_DEFAULT_PREFIX/$FILE'" else eval "CONFFILE_$COUNTER='/$FILE'" fi #This files are meaningless on Windows done #This 2 are used in Makefile-common in BIN_ALLWAYSCLEAN and TOBIN variables EXTRAFILE_1=$aubitdir/tools/cygwin/run.exe EXTRAFILE_2=$aubitdir/tools/metrics_4gl/4GL_metrics.cgi #Add form and help files to ETC_FILES, so they get in make install/deinstall ETC_FILES="$ETC_FILES $FORM_FILES $ALL_HELP" ## ================================================================== ## Debugging ## ================================================================== PHP_CONFIGURE_PART(Configuring Debugging options) PHP_HELP_SEPARATOR([Debugging options:]) AC_MSG_CHECKING(Autoconf debugging) if test "$enable_ac_debug" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(Aubit programs optimisation) AC_ARG_ENABLE(optimised, [ --enable-optimised enable optimisations],[enable_optimised=yes]) if test "$enable_optimised" = "yes" ; then AC_MSG_RESULT(yes) AUBIT_DEBUG=0 A4GL_CFLAGS="$CFLAGS -O2 -DNODEBUG -DOPTIMIZED" DBGFLAG= STD_CFLAGS=" -O2 -DNODEBUG -DOPTIMIZED" else #FIXME: DEBUG=ALL in environment? aubitrc? A4GL_CFLAGS="$CFLAGS -g -Wall -DDEBUG" DBGFLAG=-DDEBUG AC_MSG_RESULT(No. Debuggig is enabled - set DEBUG=ALL to get debug.out trace.) STD_CFLAGS="$STD_CFLAGS -g" fi if test "$AUBIT_SOURCE" = "1" ; then AC_MSG_CHECKING(Executables stripping) if test "$enable_strip" != "no" ; then AC_MSG_RESULT(enabled) AC_PATH_PROG(STRIP, strip, no) if test "$STRIP" != "no"; then STRIP_EXECUTABLES=yes fi else AC_MSG_RESULT(disabled) fi AC_ARG_ENABLE(aix-64bit, [ AIX 64 bit mode - default is 32bit for AIX] ) AIX_OBJECT_MODE= case $host in *aix*) AC_MSG_CHECKING(AIX mode) if test "$enable_aix_64bit" = "yes" ; then AIX_OBJECT_MODE=64 OBJECT_MODE=64 export OBJECT_MODE CFLAGS=-maix64 export CFLAGS else AIX_OBJECT_MODE=32 OBJECT_MODE=32 export OBJECT_MODE fi ;; esac AC_MSG_CHECKING(YY Debugging) if test "$enable_yy_debug" = "yes" ; then #for debbuging in function yyparse() export YYDEBUG=1 to environment: YYDEBUG="-DYYDEBUG=1 -DYYERROR_VERBOSE -DYYPRINT=aubit_yyprint" AC_MSG_RESULT(enabled, export YYDEBUG=1 to environment to turn it on.) else AC_MSG_RESULT(disabled, specify --enable-yy-debug to turn it on.) fi AC_MSG_CHECKING(Yacc Debugging) if test "$enable_yacc_debug" = "yes" ; then DEBUG_BISON="--debug" AC_MSG_RESULT(enabled.) else AC_MSG_RESULT(disabled, specify --enable-yacc-debug to turn it on.) fi fi #in libLEX_xxx printc(): # * If the INCLINES variable is set then the source target C # * file is generated with #line (for debugging purposes). AC_MSG_CHECKING(printc() Debugging) if test "$enable_printc_debug" = "yes" ; then INCLINES=yes AC_MSG_RESULT(enabled.) else AC_MSG_RESULT(disabled.) fi ## ================================================================== ## Platform ## ================================================================== AC_MSG_CHECKING(MACHDEP) if test -z "$MACHDEP" then if test -f /usr/lib/NextStep/software_version; then set X `hostinfo | grep 'NeXT Mach.*:' | \ sed -e 's/://' -e 's/\./_/'` && \ ac_sys_system=next && ac_sys_release=$4 MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu" else ac_sys_system=`uname -s` if test "$ac_sys_system" = "AIX" ; then ac_sys_release=`uname -v` else ac_sys_release=`uname -r` fi ac_md_system=`echo $ac_sys_system | tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'` ac_md_release=`echo $ac_sys_release | tr -d '[/ ]' | sed 's/\..*//'` MACHDEP="$ac_md_system$ac_md_release" fi case MACHDEP in '') MACHDEP=unknown;; esac fi AC_MSG_RESULT($MACHDEP) #this things are automatically set by configure: #build #build_cpu #build_vendor #build_os #host #host_cpu #host_vendor #host_os #target #target_cpu #target_vendor #target_os #Usage: uname [OPTION]... # -a, --all print all information # -m, --machine print the machine (hardware) type # -n, --nodename print the machine's network node hostname # -r, --release print the operating system release # -s, --sysname print the operating system name # -p, --processor print the host processor type # -v print the operating system version #This will return just 2.4 #KERNEL=`kernelversion` #this will return 2.4.7-10 KERNEL_VER=`uname -r` #FIXME: how do I get glibc version? GLIBC_VER=2.2.4 #grep /usr/bin/glibcbug for: #VERSION="2.2.4" #RELEASE="stable" #ADDONS="c_stubs glibc-compat linuxthreads" #HOST="i386-redhat-linux-gnu" #CC='gcc' #CCVERSION='2.96 20000731 (Red Hat Linux 7.1 2.96-98)' #CFLAGS="-march=i386 -D__USE_STRING_INLINES -fstrict-aliasing -freorder-blocks -DNDEBUG=1 -g -O3" #SYSINCLUDES="" #VERSIONING="yes" #BUILD_STATIC="yes" #BUILD_SHARED="yes" #BUILD_PIC_DEFAULT="no" #BUILD_PROFILE="yes" #BUILD_OMITFP="no" #BUILD_BOUNDED="no" #BUILD_STATIC_NSS="no" #STDIO="libio" ## ================================================================== ## Check make ## ================================================================== AC_PATH_PROG(MAKE, make, no) ign_broken_make=yes AC_ARG_ENABLE(broken-make, [ --disable-broken-make Broken make checking=x], ign_broken_make=$enableval ) AC_PATH_PROG(GMAKE, gmake, no) if test "$GMAKE" != "no" ; then #In case that we have "native" make, but gmake also on the system, #we should use gmake MAKE="$GMAKE" fi if test "$MAKE" = "no" ; then if test "$AUBIT_SOURCE" = "1" ; then AC_MSG_ERROR(Cannot compile Aubit from source code without 'make' - please install it. Stop.) else AC_MSG_WARN(It will be much easier if you would install 'make') fi else AC_MSG_CHECKING(make version) #this creates full set dump on Solaris set `$MAKE --version | head -n 1 | sed -e 's/^GNU Make version //' -e 's/^GNU Make //' -e 's/, by Richard Stallman and Roland McGrath.//' -e 's/\./ /g'` if test "$1" != "" -a "$2" != ""; then if test "$1" = "3" -a "$2" -lt "50"; then AC_MSG_WARN(You will need GNU make version 3.50 or later (found $1.$2.$3).) else if test "$1" = "2" ; then if test "$AUBIT_SOURCE" = "1"; then AC_MSG_ERROR(You will need GNU make version 3.50 or later (found $1.$2.$3).) fi else #GNU Make 3.81 broken completely - expands variables wrong, evaluate dependencies in wrong order #and on Windows (CygWin make) dont support C: drive notation any more (patch removed) if test "$1" = "3" -a "$2" -gt "80"; then if test "$AUBIT_SOURCE" = "1"; then if test "$ign_broken_make" = "no" then AC_MSG_WARN(GNU Make 3.81 is possibly broken. Google for more info. If you are sure your 3.81 version of gmake will work - retry with --enable-broken-make) AC_MSG_ERROR(Please revert back to 3.80 or earlier) else AC_MSG_WARN(GNU Make 3.81 and possibly up broken completely. Google for more info - but you've chosen to ignore it...) fi fi else AC_MSG_RESULT($1.$2.$3 (ok)) fi fi fi else #Could not read version number if test "$AUBIT_SOURCE" = "1"; then AC_MSG_ERROR(Aubit needs GNU 'make' - please install it. Stop.) fi fi fi ## ================================================================== ## Checks for stuff needed only for compiling from source code ## ================================================================== PHP_CONFIGURE_PART(Checking standard programs:) AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "$PKG_CONFIG" != "no"; then AC_MSG_CHECKING(pkg-config version) PKG_CONFIG_VERSION=`$PKG_CONFIG --version` if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then AC_MSG_RESULT(OK:$PKG_CONFIG_VERSION) else AC_MSG_WARN([*** pkg-config ($PKG_CONFIG_VERSION) too old; version 0.14 or later required.]) fi fi if test "$COMSPEC" != ""; then #Collect info from Windows registry: if test "$enable_ac_debug" = "yes" ; then echo "--------- reg: GTK" fi GTK_DEV_REG_PATH="/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/Gtk+ Development Environment for Windows" regtool.exe check "$GTK_DEV_REG_PATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then GTK_DEV_VER=`regtool get "$GTK_DEV_REG_PATH/DisplayVersion"` #Also has keys: Cygwin and MSYS fi if test "$enable_ac_debug" = "yes" ; then echo "--------- reg: pg" fi PG_REG_ROOT="/machine/SOFTWARE/PostgreSQL/Installations" regtool.exe check "$PG_REG_ROOT" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then PG_REG_INST_NAME=`regtool list "$PG_REG_ROOT" | head -n 1` #Note: sed/dirname are to remove trailing backslash from registry, #otherwise cygpath chokes (backslash escapes closing quote) PG_REG_BASEDIR=`regtool.exe get "$PG_REG_ROOT/$PG_REG_INST_NAME/Base Directory" | sed -e 's/\\\\/\//g'` PG_REG_BASEDIR=`dirname "$PG_REG_BASEDIR/ddd"` PG_REG_BASEDIR=`$CYGPATH -ws "$PG_REG_BASEDIR"` PG_REG_BASEDIR_CYGPATH=`$CYGPATH -u "$PG_REG_BASEDIR"` fi if test "$enable_ac_debug" = "yes" ; then echo "--------- reg: msys" fi UNINST_REG_PATH="/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall" MSYS_REG_NAME=`regtool list "$UNINST_REG_PATH" | grep "MSYS" | head -n 1` if test "$MSYS_REG_NAME" != ""; then MSYS_REG_PATH="$UNINST_REG_PATH/$MSYS_REG_NAME" regtool.exe check "$MSYS_REG_PATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then MSYS_ROOTDIR=`regtool get "$MSYS_REG_PATH/Inno Setup: App Path"` MSYS_ROOTDIR=`cygpath -m "$MSYS_ROOTDIR"` MSYS_VERSION=`regtool get "$MSYS_REG_PATH/DisplayVersion"` fi fi if test "$enable_ac_debug" = "yes" ; then echo "--------- reg: mingw" fi MINGW_REG_NAME=`regtool list "$UNINST_REG_PATH" | grep "MinGW" | head -n 1` if test "$MINGW_REG_NAME" != ""; then MINGW_REG_PATH="$UNINST_REG_PATH/$MINGW_REG_NAME" regtool.exe check "$MINGW_REG_PATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then #MINGW_ROOTDIR=`regtool get "$MINGW_REG_PATH/Inno Setup: App Path"` MINGW_ROOTDIR=`regtool get "$MINGW_REG_PATH/InstallLocation"` MINGW_ROOTDIR=`cygpath -m "$MINGW_ROOTDIR"` MINGW_VERSION=`regtool get "$MINGW_REG_PATH/DisplayVersion"` fi fi if test "$enable_ac_debug" = "yes" ; then echo "--------- reg: ifx" fi #IFX_REG_PATH="/HKEY_CURRENT_USER/Software/Informix" IFX_REG_PATH="/HKEY_LOCAL_MACHINE/SOFTWARE/Informix" regtool.exe check "$IFX_REG_PATH/Environment" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then REG_INFORMIXDIR=`regtool get "$IFX_REG_PATH/Environment/INFORMIXDIR" | sed -e 's/\\\\/\//g'` #Note: sed/dirname are to remove trailing backslash from registry, #otherwise cygpath chokes (backslash escapes closing quote) REG_INFORMIXDIR=`dirname "$REG_INFORMIXDIR/ddd"` REG_INFORMIXDIR=`$CYGPATH -ms "$REG_INFORMIXDIR"` REG_INFORMIXDIR_CYGPATH=`$CYGPATH -u "$REG_INFORMIXDIR"` IFX_INSTDIR_REGPATH="$IFX_REG_PATH/Setup/InstalledDirectories" #echo "IFX_INSTDIR_REGPATH=$IFX_INSTDIR_REGPATH" regtool.exe check "$IFX_INSTDIR_REGPATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then #FIXME: cant read it because resulting string looks like: #regtool get '/HKEY_LOCAL_MACHINE/SOFTWARE/Informix/Setup/InstalledDirectories/E:\PROGRA~1\W2000\Informix\CSDK' #so regtool thiks its all a path, not a key #echo "regtool get '$IFX_INSTDIR_REGPATH/$REG_INFORMIXDIR'" DATE_INFORMIXDIR_INSTALLED=`regtool get "$IFX_INSTDIR_REGPATH/$REG_INFORMIXDIR" 2>/dev/null` fi else if test "$enable_ac_debug" = "yes" ; then echo "no $IFX_REG_PATH/Environment in reegistry" fi fi if test "$INFORMIXDIR" = "" -a "$REG_INFORMIXDIR" != "" ; then export INFORMIXDIR="$REG_INFORMIXDIR" if test "$enable_ac_debug" = "yes" ; then echo "NOTE: INFORMIXDIR set based on registry, to:" echo "$INFORMIXDIR" fi fi if test "$enable_ac_debug" = "yes" ; then echo "------ reg: ISsetup" fi INNO_REG_NAME=`regtool list "$UNINST_REG_PATH" | grep "Inno" | head -n 1` if test "$INNO_REG_NAME" != ""; then INNO_REG_PATH="$UNINST_REG_PATH/$INNO_REG_NAME" regtool.exe check "$INNO_REG_PATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then INNO_ROOTDIR=`regtool get "$INNO_REG_PATH/Inno Setup: App Path"` INNO_VERSION=`regtool get "$INNO_REG_PATH/DisplayVersion"` fi fi if test "$enable_ac_debug" = "yes" ; then echo "------ reg: ISTool" fi TMP_LIST="`regtool list "$UNINST_REG_PATH" | grep {`" for a in $TMP_LIST; do echo "a=$a" TMP_LIST2=`regtool list "$UNINST_REG_PATH/$a" | grep -i DisplayName` if test "$TMP_LIST2" != ""; then echo "Have DisplayName in $a" TMP_NAME=`regtool get "$UNINST_REG_PATH/$a/DisplayName" | grep -i ISTool` if test "$TMP_NAME" != ""; then ISTOOL_ROOTDIR=`regtool get "$UNINST_REG_PATH/$a/InstallLocation"` break fi fi done if test "$enable_ac_debug" = "yes" ; then echo "GTK_DEV_VER=$GTK_DEV_VER" echo "MSYS_ROOTDIR=$MSYS_ROOTDIR" echo "MSYS_VERSION=$MSYS_VERSION" echo "MINGW_ROOTDIR=$MINGW_ROOTDIR" echo "MINGW_VERSION=$MINGW_VERSION" echo "INNO_ROOTDIR=$INNO_ROOTDIR" echo "INNO_VERSION=$INNO_VERSION" echo "ISTOOL_ROOTDIR=$ISTOOL_ROOTDIR" #echo "PG_REG_INST_NAME=$PG_REG_INST_NAME" echo "PG_REG_BASEDIR=$PG_REG_BASEDIR" echo "PG_REG_BASEDIR_CYGPATH=$PG_REG_BASEDIR_CYGPATH" echo "REG_INFORMIXDIR=$REG_INFORMIXDIR" echo "DATE_INFORMIXDIR_INSTALLED=$DATE_INFORMIXDIR_INSTALLED" fi fi if test "$AUBIT_SOURCE" = "1" ; then ## ================================================================== ## Checks for Bison/yacc ## ================================================================== #force this check even if not specified on command line: if test "$with_bison" = ""; then with_bison=yes fi AC_ARG_WITH(bison, [ --with-bison[=DIR] Use Bison as YACC to recompile Aubit parsers. DIR is the base directory of Bison executable, defaults to /usr/bin.], [ if test "$withval" != "no"; then #AC_PROG_YACC #if test "$YACC" != "bison -y"; then # #AC_PROG_YACC macro sets $YACC to "yacc" even when its not present! # YACC=no # BISON=no # WARN_YACC=1 #else if test "$withval" != "yes"; then #user specified path to bison BISON_PATH=$withval else BISON_PATH="$PATH" fi AC_PATH_PROG(BISON, bison, no, $BISON_PATH) if test "$BISON" != "no"; then AC_MSG_CHECKING(Bison version) TMP_TMP=`$BISON --version|head -n 1|sed -e 's/^GNU Bison version //' -e 's/^bison (GNU Bison) //' -e 's/\./ /g' -e 's/[a-z]//g'` #On some versions of CygWin, did not strip letters - #don't know why...so I had to use tr instead TMP_TMP=`echo "$TMP_TMP" | tr -d '[[A-Z]]' | tr -d '[[a-z]]'` set `echo $TMP_TMP` AC_MSG_RESULT($1.$2) #On some versions of CygWin, did not strip letters - #don't know why... if test "$1" = "1" -a "$2" -lt "875"; then AC_MSG_WARN(** You will need Bison >= 1.875 if youd) AC_MSG_WARN(** want to regenerate the Aubit parsers) #Will use preconfigured y.tab.c from /tools/no_yacc #YACC=no BISON=no WARN_YACC=1 else #-y is Equivalent to -o y.tab.c; the parser output file is #called y.tab.c, and the other outputs are called #y.output and y.tab.h. The purpose of this switch #is to imitate yacc's output file name conventions. #From W. Haslbeck [spam.langweilt@gmx.de] #there is a awk programm involved in the build-process of the #a4gl-compiler (mk_states_c), that is feed by rules/generated/y.output. #y.output is generated by yacc (or bison). #If the LANG on the build system is set to eg. de_DE@euro as on my #system, bison generates lines like "Zustand 1234" instead of #"state 1234", so the awk-programm can't find the expected regexes. #So a quick fix is setting LANG to C (or unset LANG, which is the #same) "by hand" before ./configure. A better fix is to change #the Makefile (replace "bison" with "LANG=C bison" or something) #Store just the executable name for cases where we need it #without default flags: BISON_EXE="$BISON" #BISON="LANG=C LC_ALL=C; nice -n -20 $BISON -y" BISON="LANG=C LC_ALL=C $BISON -y" fi else BISON=no WARN_YACC=1 AC_MSG_WARN(cannot find bison in $BISON_PATH) fi else BISON=no WARN_YACC=1 AC_MSG_RESULT(Bison parser disbled) fi ],[ AC_MSG_RESULT(--with-bison not specified) ]) ## ================================================================== ## Checks for Lex/flex ## ================================================================== #This is probably a bug in autoconf, but if we don't test for Lex BEFORE #we test for C, all sort of wireds things will happen, so we have to test #it even in binary distro, where we don't need it: dnl #AC_PROG_LEX AM_PROG_LEX if test "$LEX" = ":" -o "$LEX" = "" ; then dnl #AC_PROG_LEX macro sets $LEX to ":" when it can't find lex of flex executables! LEX="no" if test "$AUBIT_SOURCE" = "1" ; then WARN_LEX=1 fi else if test "$LEX" = "flex"; then #flex 2.5.31 has a new incompatible API. I had to downgrade back to 2.5.4a. - but 2.5.33 is ok... AC_MSG_CHECKING(Flex version) TMP_TMP=`$LEX --version | head -n 1 | sed -e 's/^flex version //' -e 's/\./ /g' -e 's/[a-z]//g'` TMP_TMP=`echo "$TMP_TMP" | tr -d '[[A-Z]]' | tr -d '[[a-z]]'` set `echo $TMP_TMP` AC_MSG_RESULT($1.$2.$3) if test "$1" = "2" -a "$2" -gt "4"; then #Version is >= 2.5 if test "$3" -eq "31"; then #pcode wouldn't compile with a lex v. 2.5.31 (complained about yytext_ptr not existing) AC_MSG_WARN(Flex 2.5.31 and up incompatible with Aubit P-code) AC_MSG_WARN(P-code compilation disabled) with_pcode="no" #AC_MSG_ERROR(Please downgrade to Flex 2.5.4a or earlier. Stop.) fi #if test "$3" -gt "4"; then #AC_MSG_WARN(Flex introduced incompatible API in post 2.5.4a versions) #AC_MSG_ERROR(Please downgrade to Flex 2.5.4a or earlier. Stop.) #fi fi fi fi if test "$enable_stop_lex" = "yes" ; then exit fi ## ================================================================== ## Checks Efence ## ================================================================== #AC_MSG_CHECKING(Electric Fence debugging) AC_ARG_WITH(efence, [ --with-efence[=DIR] Use Electric Fence library for debugging. DIR is the base directory of efence library, defaults to /usr/local/lib.], [ if test "$withval" != "no"; then #if test "$withval" != "yes"; then # #user specified path to efence # BISON_PATH=$withval #else # BISON_PATH="$PATH" #fi AC_CHECK_LIB([efence], [main]) if test "$ac_cv_lib_efence_main" = "yes" ; then EFENCE=yes #AC_MSG_RESULT(yes) else EFENCE=no #AC_MSG_RESULT(efence library not found) fi else EFENCE=no #AC_MSG_RESULT(disbled) fi ],[ EFENCE=no #AC_MSG_RESULT(--with-efence not specified) ]) #Valgrind has same purpose as efence (detecting memory alocation errors) #But instead of being a library that needs to be linked with every program #you wish to debug, it is an executable, and may be easier to use then efence AC_PATH_PROG(VALGRIND, valgrind, no) ## ================================================================== ## Checks for DoxyGen ## ================================================================== AC_PATH_PROG(DOXYGEN, doxygen, no) AC_PATH_PROG(CVS_CLIENT, cvs, no) AC_PATH_PROG(DOXYSEARCH, doxysearch, no) if test "$DOXYSEARCH" != "no" ; then DOXY_BIN_ABSPATH=`dirname $DOXYSEARCH` fi if test "$with_dot" != "no"; then old_PATH="$PATH" if test "$with_dot" != "yes"; then #User specified path to dot tool PATH="$with_dot:$PATH" else if test "$COMSPEC" != ""; then REGKEY=/machine/SOFTWARE/ATT/Graphviz regtool.exe check "$REGKEY" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then if test "$enable_ac_debug" = "yes" ; then echo "REGKEY=$REGKEY found" fi DOT_PATH=`regtool list -v "$REGKEY" | awk '{print $3}' | sed -e 's/"//g'` else if test "$enable_ac_debug" = "yes" ; then echo "REGKEY=$REGKEY NOT found" fi fi if test "$DOT_PATH" != ""; then DOT_PATH_CYGWIN=`$CYGPATH -u $DOT_PATH` PATH="$DOT_PATH_CYGWIN/bin:$PATH" if test "$enable_ac_debug" = "yes" ; then echo "$DOT_PATH_CYGWIN/bin added to PATH" fi fi fi fi AC_PATH_PROG(DOTTOOL, dot, no) if test "$DOTTOOL" != "no"; then HAVE_DOT=YES DOT_PATH=`dirname "$DOTTOOL"` else HAVE_DOT=NO fi if test "$with_dot" != "yes"; then PATH="$old_PATH" fi else HAVE_DOT=NO fi fi ####<<<<<<<<<<<<<<<<< END OF if test "$AUBIT_SOURCE" = "1" ; then ## ================================================================== ## Checks for GCC ## ================================================================== #AC_ISC_POSIX AC_PROG_CC #apgcc is AutoPackage wrapper script for GCC if test "$CC" = "gcc" -o "$CC" = "apgcc"; then HAVE_C_COMP=1 AC_MSG_CHECKING(GCC version) #WARNING: THIS TEST OCURS ONE MORE TIME, EARLIER IN THIS FILE TMP_DMACHINE=`gcc -dumpmachine | sed 's/ //g'` TMP_TMP=`gcc --version | head -n 1 | sed -e 's/^gcc//' -e 's/(GCC)//' -e 's/ (prerelease)//' -e 's/(//' -e 's/)//' -e 's/\.exe//' -e 's/\./ /g'` if test "$TMP_TMP" != ""; then set `echo $TMP_TMP` if test "$1" != ""; then #if test "$1" = "3" -a "$2" -lt "50"; then # AC_MSG_WARN(You will need GNU make version 3.50 or later (found $1.$2.$3).) #else AC_MSG_RESULT($1.$2.$3) GCC_VERSION_MAJOR=$1 GCC_VERSION_MINOR=$2 if test "$TMP_DMACHINE" = "mingw32" ; then GCC_MINGW=yes #should not really need drive letter? #also, if adding drive letter with : , it then we add AUBITDIR to PATH, : will be #interperted as separator (when using CygWin tools), and make PATH invalid aubitdir="$CYGWIN_DRIVE:$CYGWIN_PATH$aubitdir" #BUT-then CygWin things there is a directory called /cygwin in HIS root! #but how to get a directory name CygWin was installed in, if different then default? #aubitdir="$CYGWIN_PATH$aubitdir" AC_MSG_WARN(Using MinGW GCC.) old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" TMP_IFLAGS="-I$WINDOWS_DRIVE$CYGWIN_PATH/usr/include" CFLAGS=" $CFLAGS $TMP_IFLAGS" CPPFLAGS="$CPPFLAGS $TMP_IFLAGS" #Clear cached value: #unset ac_cv_header_dlfcn_h #AC_CHECK_HEADERS([dlfcn.h]) #exit #In file included from $WINDOWS_DRIVE/MinGW/include/inttypes.h:6, # from configure:9489: #$WINDOWS_DRIVE/MinGW/include/stdint.h:27: conflicting types for `int8_t' #$WINDOWS_DRIVE$CYGWIN_PATH/usr/include/sys/types.h:128: previous declaration of `int8_t' #Determine GCC install path: x=`type gcc | awk '{print $3}'`; a=`dirname $x`; b=`dirname $a`; GCC_HOME_WINPATH=`$CYGPATH -w "$b"` GCC_HOME_CYGPATH=`$CYGPATH -u "$b"` CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" TMP_IFLAGS= fi #fi else AC_MSG_WARN(Cannot read GCC version.) fi else AC_MSG_WARN(Cannot read GCC version.) fi else if test "$AUBIT_SOURCE" = "0"; then #We can use just pcode with binary packages HAVE_C_COMP=0 else if test "$enable_alternate_cc" != "yes"; then #To compile Aubit from source code, we ceed C AC_MSG_ERROR(Aubit needs GNU 'C' compiler - please install it. Stop.) fi fi fi HAS_INT8_DTYPE=0 AC_SUBST(HAS_LONG_LONG_DTYPE) AC_TRY_COMPILE(, [ long long x; ], HAS_LONG_LONG_DTYPE=1) ## ================================================================== ## Checks for Standard programs ## ================================================================== AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET if test "$AUBIT_SOURCE" = "1" ; then AC_PROG_AWK #FIXME: stop if no gawk (if configuring source code tree) - awk will fail if test "$AWK" = "awk"; then AC_MSG_WARN(Aubit compiler need gawk, awk will probably fail.) fi fi #expect is needed by aubitbuild autoxxx scripts AC_PATH_PROG(EXPECT, expect, no) AC_PATH_PROG(PERL, perl, no) AC_PATH_PROG(SWIG, swig, no) AC_PATH_PROG(WGET, wget, no) AC_PATH_PROG(SH, bash, no) if test "$SH" = "no"; then AC_MSG_WARN(Aubit compiler needs bash - sh/ksh will probably fail.) AC_PATH_PROG(SH, ksh, no) if test "$SH" = "no"; then AC_PATH_PROG(SH, sh, /bin/sh) fi if test "$SH" = "no"; then AC_MSG_ERROR(Failed to set SH. Stop.) fi else #Here is the issue: #$ sh --version #GNU bash, version 3.2.5(7)-release (i686-pc-cygwin) #Copyright (C) 2005 Free Software Foundation, Inc. # #$ echo "aaa`bin/aubit-config TARGET_OS`xxx" #xxxmingw #andrej@istation-vm-xp /usr/local/aubit4gl/tools/test #$ bash --version #GNU bash, version 3.1.17(6)-release (i686-pc-cygwin) #Copyright (C) 2005 Free Software Foundation, Inc. # #$ echo "aaa`bin/aubit-config TARGET_OS`xxx" #aaamingwxxx BASH_VER=`bash --version | head -1 | awk '{print $4}'` DASH_VER=`bash --version | head -1 | awk '{print $4}'` SH_VER=`sh --version | head -1 | awk '{print $4}'` if test "$BASH_VER" != "$SH_VER" -a "$DASH_VER" != "$SH_VER"; then AC_MSG_WARN(Your 'sh' executable is NOT the same as 'bash'. This may cause problems) fi if test "$BASH_VER" = "3.2.5(7)-release"; then AC_MSG_ERROR(Bash version known to be broken ($BASH_VER). Stop.) fi if test "$SH_VER" = "3.2.5(7)-release"; then AC_MSG_ERROR(Bash ('sh') version known to be broken ($BASH_VER). Stop.) fi fi AC_PATH_PROG(LDD, ldd, no) #Note: CygWin has splint AC_PATH_PROG(LCLINTEXE,lclint,no) if test "$LCLINTEXE" = "no"; then AC_PATH_PROG(LCLINTEXE2,splint,no) if test "$LCLINTEXE2" != "no"; then LCLINTEXE="$LCLINTEXE2" fi fi #On recent SuSE ldconfig is under /sbin, which is not in path by default, so: AC_PATH_PROG(LDCONFIG, ldconfig, no, $PATH /sbin) AC_PATH_PROG(AUTOCONF, autoconf, no) AC_PATH_PROG(ACLOCAL, aclocal, no) AC_PATH_PROG(RPM, rpm, no) AC_PATH_PROG(AUTOSPEC, autospec, no) AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib) if test -n "$PROG_SENDMAIL"; then AC_DEFINE(HAVE_SENDMAIL) fi ## ================================================================== ## Check for AutoPackage ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then #BinReloc - utility for easy relocation of binary packages AC_PATH_PROG(BINRELOC, binreloc, no) #aPBUILD SCRIPTS - filter out not needed dependencies (CC=apgcc; CXX=apg++) AC_PATH_PROG(APGCC, apgcc, no) AC_PATH_PROG(APGPP, apg++, no) AC_PATH_PROG(MAKEINSTALLER, makeinstaller, no) AC_PATH_PROG(OBJDUMP, objdump, no) fi ## ================================================================== ## Check for ORBit CORBA support ## ================================================================== PHP_CONFIGURE_PART(Checking for ORBit CORBA support:) AC_ARG_WITH(orbit, [ --with-orbit[=DIR] Include ORBit CORBA support. DIR is the ORBit install directory, defaults to /usr.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else withval=/usr fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON ORBit" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi HAS_ORBIT_TYPE=0 AC_PATH_PROG(ORBIT_IDL, orbit-idl-2, no) AC_MSG_CHECKING(ORBit 2) if test "$PKG_CONFIG" != "no"; then ORBIT_NAME="ORBit-2.0" if $PKG_CONFIG --exists $ORBIT_NAME ; then if test "$ORBIT_IDL" != "no"; then HAS_ORBIT_TYPE=2 ORBIT_VERSION=`$PKG_CONFIG --modversion $ORBIT_NAME` AC_MSG_RESULT($ORBIT_NAME present ($ORBIT_VERSION)) CAPI_LDFLAGS="`$PKG_CONFIG $ORBIT_NAME ORBit-CosNaming-2.0 --libs`" CAPI_CFLAGS="`$PKG_CONFIG $ORBIT_NAME ORBit-CosNaming-2.0 --cflags`" else AC_MSG_RESULT(no - missing orbit-idl-2) fi else AC_MSG_RESULT(no - missing pkg-config $ORBIT_NAME package) fi else AC_MSG_RESULT(no - missing pkg-config) fi if test "$HAS_ORBIT_TYPE" = "0"; then AC_PATH_PROG(ORBIT_CONFIG, orbit-config, no) AC_MSG_CHECKING(ORBit 1) if test "$ORBIT_CONFIG" != "no"; then if test "$ORBIT_IDL" != "no"; then HAS_ORBIT_TYPE=1 ORBIT_VERSION=`$ORBIT_CONFIG --version` AC_PATH_PROG(ORBIT_IDL, orbit-idl, no) AC_MSG_RESULT(present ($ORBIT_VERSION)) #there is apparently no diff between client and server targets: CAPI_LDFLAGS="`$ORBIT_CONFIG --libs client`" CAPI_CFLAGS="`$ORBIT_CONFIG --cflags client`" else AC_MSG_RESULT(no - missing orbit-idl-2) fi else AC_MSG_RESULT(no - missing orbit-config) fi fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-orbit not specified) ]) if test "$enable_stop_orbit" = "yes" ; then exit fi ## ================================================================== ## Check for Ingres ESQL/C compiler support ## ================================================================== #TODO - check for Ingres ODBC driver #/opt/Ingres/IngresII/ingres/lib/libiiodbcdriver.1.so PHP_CONFIGURE_PART(Checking for Ingres ESQL/C compiler support:) AC_ARG_WITH(ingres, [ --with-ingres[=DIR] Include Ingres ESQL/C compiler support. DIR is the Ingres install directory, defaults to /opt/Ingres/IngresII.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else if test "$II_SYSTEM" != ""; then withval="$II_SYSTEM" else withval=/opt/Ingres/IngresII fi fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON Ingres" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_CFLAGS="$CFLAGS" old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" old_PATH="$PATH" #PATH=$withval/ingres/bin if test -f $withval/.ingIIbash; then #Set PATH, LD_LIBRARY_PATH, II_SYSTEM, etc: . $withval/.ingIIbash AC_PATH_PROG(INGRES_ESQLC, esqlc, no) if test "$INGRES_ESQLC" != "no"; then #check version: #has no verion flag - at least check if it is INGRES so #we dont pivk upo some other esql in PATH INGRES_ESQLC_VERSION="`$INGRES_ESQLC -- | grep INGRES`" #echo "$INGRES_ESQLC_VERSION" if test "$INGRES_ESQLC_VERSION" != ""; then #Check for libs: #-L"$II_SYSTEM"/ingres/lib `cat "$II_SYSTEM"/ingres/files/abflnk.opt` #INGRES_INST_PATH="$II_SYSTEM" #echo "II_SYSTEM=$II_SYSTEM" INGRES_INST_PATH="$withval" #echo "INGRES_INST_PATH=$INGRES_INST_PATH" AC_MSG_CHECKING(if we can use Ingres ESQL/C compiler) AC_MSG_RESULT(yes) HAVE_INGRES_ESQLC=yes else AC_MSG_CHECKING(if we can use Ingres ESQL/C compiler) AC_MSG_RESULT(no - esqlc found did not return INGRES string) HAVE_INGRES_ESQLC=no fi else AC_MSG_CHECKING(if we can use Ingres ESQL/C compiler) AC_MSG_RESULT(no - missing Ingres esql executable) HAVE_INGRES_ESQLC=no fi else AC_MSG_CHECKING(if we can use Ingres ESQL/C compiler) AC_MSG_RESULT(no - missing $withval/.ingIIbash script) HAVE_INGRES_ESQLC=no fi CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" PATH="$old_PATH" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-ingres not specified) ]) if test "$enable_stop_ingres" = "yes" ; then exit fi ## ================================================================== ## Check for Jabber IM support ## ================================================================== PHP_CONFIGURE_PART(Checking for Jabber support:) AC_ARG_WITH(iksemel, [ --with-iksemel[=DIR] Include Jabber/iksemel support. DIR is the iksemel install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else withval=/usr/local fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON Jabber" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_CFLAGS="$CFLAGS" old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" if test "$COMSPEC" != ""; then withval="`$CYGPATH -m $withval`" fi TEST_IKSEMEL_I_FLAGS="-I$withval/include" TEST_IKSEMEL_L_FLAGS="-L$withval/lib" LDFLAGS="$TEST_IKSEMEL_L_FLAGS $LDFLAGS" CFLAGS="$TEST_IKSEMEL_I_FLAGS $CFLAGS" CPPFLAGS="$TEST_IKSEMEL_I_FLAGS $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" echo "TEST_IKSEMEL_I_FLAGS=$TEST_IKSEMEL_I_FLAGS" echo "TEST_IKSEMEL_L_FLAGS=$TEST_IKSEMEL_L_FLAGS" fi # AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[ ])) # FIXME: Replace `main' with a function in `-liksemel': AC_CHECK_LIB([iksemel], [main]) if test "$ac_cv_lib_iksemel_main" = "yes"; then if test "$AUBIT_SOURCE" = "1" ; then AC_CHECK_HEADERS([ iksemel.h ]) if test "$ac_cv_header_iksemel_h" = "yes" ; then if test "$PKG_CONFIG" != "no"; then #/usr/local/lib/pkgconfig/iksemel.pc export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" if $PKG_CONFIG --exists iksemel ; then HAVE_IKSEMEL_TYPE=1 IKSEMEL_VERSION=`$PKG_CONFIG --modversion iksemel` fi fi if test "$IKSEMEL_VERSION" = ""; then AC_PATH_PROG(IKSPERF, iksperf, no) if test "$IKSPERF" != "no"; then IKSEMEL_VERSION=`iksperf --version | awk '{print $3}'` if test "$IKSEMEL_VERSION" != ""; then HAVE_IKSEMEL_TYPE=1 fi fi fi fi if test "$HAVE_IKSEMEL_TYPE" = "1"; then JABBERBUILD=yes AC_DEFINE(HAVE_IKSEMEL,1,[ ]) IKSEMEL_L_FLAGS="$TEST_IKSEMEL_L_FLAGS" IKSEMEL_I_FLAGS="$TEST_IKSEMEL_I_FLAGS" if test "$COLLECT_THIRD_PARTY" = "1"; then if test "$COMSPEC" != ""; then x=`$CYGPATH -u $withval` fi if test "$COMSPEC" != ""; then #Note that on Windows the dll will misteriously be liniked with #file libiksemel-3.dll and NOT libiksemel.dll as you would expect THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ JABBER#$x/bin/libiksemel-3.dll" fi fi else JABBERBUILD=no fi else JABBERBUILD=yes AC_DEFINE(HAVE_IKSEMEL,1,[ ]) IKSEMEL_L_FLAGS="$TEST_IKSEMEL_L_FLAGS" IKSEMEL_I_FLAGS="$TEST_IKSEMEL_I_FLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "IKSEMEL_I_FLAGS=$IKSEMEL_I_FLAGS" echo "IKSEMEL_L_FLAGS=$IKSEMEL_L_FLAGS" fi #AC_MSG_RESULT(yes) else AC_DEFINE(HAVE_IKSEMEL,0,[ ]) #AC_MSG_RESULT(no) fi CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" AC_MSG_CHECKING(if we can use IksEmEl) AC_MSG_RESULT($JABBERBUILD) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-iksemel not specified) ]) if test "$enable_stop_iksemel" = "yes" ; then exit fi ## ================================================================== ## Check for MySQL client library ## ================================================================== PHP_CONFIGURE_PART(Checking for MySQL client library support:) AC_ARG_WITH(mysql, [ --with-mysql[=DIR] Include MySQL client library support. DIR is MySQL base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local CUSTOM_WITHVAL=0 else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON MySQL" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_CFLAGS="$CFLAGS" old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" if test "$COMSPEC" != ""; then withval="`$CYGPATH -m $withval`" fi MYSQL_LFLAGS="-L$withval/lib -L$withval/mysql -L/usr/lib/mysql -L/usr/lib" MYSQL_IFLAGS="-I$withval/include -I/usr/include/mysql" CFLAGS="$MYSQL_IFLAGS $CFLAGS" LDFLAGS="$MYSQL_LFLAGS $LDFLAGS" CPPFLAGS="$MYSQL_IFLAGS $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([mysqlclient], [mysql_stmt_close]) #LT_AC_CHECK_SHLIB([mysqlclient], [mysql_stmt_close],[isShared=1],[isShared=0]) #AC CUMULATES ALL LIBS IT FINDS IN A WAY, SO WE NEED TO RESET THIS #as it may coinflict with msqld #LIBS="$old_LIBS" LIBS=`mysql_config --libmysqld-libs` #Installed as MySQL RPM to /usr/lib/mysql/libmysqld.a AC_CHECK_LIB([mysqld], [mysql_stmt_close]) if test "$ac_cv_lib_mysqlclient_mysql_stmt_close" = "yes" -o "$ac_cv_lib_mysqld_mysql_stmt_close" = "yes"; then if test "$AUBIT_SOURCE" = "1" ; then AC_CHECK_HEADERS([ mysql.h ]) if test "$ac_cv_header_mysql_h" = "yes" ; then if test "$ac_cv_lib_mysqlclient_mysql_stmt_close" = "yes"; then SQL_MYSQL=yes else SQL_MYSQL=no fi if test "$ac_cv_lib_mysqld_mysql_stmt_close" = "yes"; then SQL_MYSQL_EMB=yes else SQL_MYSQL_EMB=no fi if test "$COLLECT_THIRD_PARTY" = "1"; then if test "$COMSPEC" != ""; then x=`$CYGPATH -u $withval` fi #Only static lib created by compiling from source on Windows #THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ #MPZ#$x/bin/libgmp.dll" fi else AC_MSG_RESULT(Missing header file) SQL_MYSQL=no SQL_MYSQL_EMB=no fi else if test "$ac_cv_lib_mysqlclient_mysql_stmt_close" = "yes"; then SQL_MYSQL=yes else SQL_MYSQL=no fi if test "$ac_cv_lib_mysqld_mysql_stmt_close" = "yes"; then SQL_MYSQL_EMB=yes else SQL_MYSQL_EMB=no fi fi else AC_MSG_RESULT(Missing MySQL client library file) SQL_MYSQL=no SQL_MYSQL_EMB=no fi AC_MSG_CHECKING(MySQL client support) AC_MSG_RESULT($SQL_MYSQL) AC_MSG_CHECKING(MySQL embedded support) AC_MSG_RESULT($SQL_MYSQL_EMB) CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-mysql not specified) ]) if test "$enable_stop_mysql" = "yes" ; then exit fi ## ================================================================== ## Check for mpz library (large integers) for exdatatype ## ================================================================== PHP_CONFIGURE_PART(Checking for mpz library support:) AC_ARG_WITH(mpz, [ --with-mpz[=DIR] Include MPZ large integer support. DIR is MPZ base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else withval=/usr/local fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON MPZ" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_CFLAGS="$CFLAGS" old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" if test "$COMSPEC" != ""; then withval="`$CYGPATH -m $withval`" fi MPZ_LFLAGS="-L$withval/lib" MPZ_IFLAGS="-I$withval/include" CFLAGS="$MPZ_IFLAGS $CFLAGS" LDFLAGS="$MPZ_LFLAGS $LDFLAGS" CPPFLAGS="$MPZ_IFLAGS $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([gmp], [main]) if test $ac_cv_lib_gmp_main = yes; then if test "$AUBIT_SOURCE" = "1" ; then AC_CHECK_HEADERS([ gmp.h ]) if test "$ac_cv_header_gmp_h" = "yes" ; then EXDATA_MPZ=yes #Note - plugin name is libEXDTYPE_mpz.so EXDTYPE=mpz EXDTYPE_DETECTED="$EXDTYPE_DETECTED $EXDTYPE" if test "$COLLECT_THIRD_PARTY" = "1"; then if test "$COMSPEC" != ""; then x=`$CYGPATH -u $withval` fi #Only static lib created by compiling from source on Windows #THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ #MPZ#$x/bin/libgmp.dll" fi else EXDATA_MPZ=no fi else EXDATA_MPZ=yes #Note - plugin name is libEXDTYPE_mpz.so EXDTYPE=mpz EXDTYPE_DETECTED="$EXDTYPE_DETECTED $EXDTYPE" fi else EXDATA_MPZ=no fi CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-mpz not specified) ]) if test "$enable_stop_mpz" = "yes" ; then exit fi ## ================================================================== ## Check for XML RPC support ## ================================================================== PHP_CONFIGURE_PART(Checking for XML-RPC support:) AC_ARG_WITH(xmlrpc, [ --with-xmlrpc[=DIR] Include XML-RPC support. DIR is the XML-RPC base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else #Source code installs under /usr/local withval=/usr/local #Suse RPM installs under /lib by default #withval=/usr #WARNING: Suse RPMs seem to be broken and have no xmlrpc_client_init #function or xmlrpc_client.h fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON XML-RPC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_CFLAGS="$CFLAGS" old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" #xmlrpc-c-config executable is NOT in current RPM! (maybe in dev RPM?) AC_PATH_PROG(XMLRPC_C_CONFIG, xmlrpc-c-config, no) AC_PATH_PROG(LIBWWW_CONFIG, libwww-config, no) if test "$COMSPEC" != ""; then withval="`$CYGPATH -m $withval`" fi if test "$XMLRPC_C_CONFIG" != "no"; then #XMLRPC_LFLAGS="-L$withval/lib -L/usr/local/lib -L/usr/lib" XMLRPC_LFLAGS="-L`$XMLRPC_C_CONFIG libwww-client --prefix`/lib" XMLRPC_IFLAGS=`$XMLRPC_C_CONFIG libwww-client --cflags` LIBWWW_LIBS="`$LIBWWW_CONFIG --libs`" XMLRPC_LIBS="`$XMLRPC_C_CONFIG libwww-client --libs` $LIBWWW_LIBS" #XMLRPC_LIBS="$XMLRPC_LIBS -lwwwhttp -lwwwapp -lwwwcore" #gcc -o conftest -I/usr/local/include -g -O2 -I/usr/local/include -L/usr/local/lib #-L/usr/local/lib -lxmlrpc_client -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse #-lxmlrpc_xmltok -lwwwhttp conftest.c -lxmlrpc #find / -name "*.so" -exec grep -H HTCookie_deleteCallbacks {} \; #Binary file /tmp/w3c-libwww-5.4.0/Library/src/.libs/libwwwhttp.so matches #Binary file /tmp/xmlrpc-c-1.05/src/.libs/libxmlrpc_client.so matches #Binary file /usr/local/lib/libwwwhttp.so matches #Binary file /usr/local/lib/libxmlrpc_client.so matches #TODO: add -lwwwxml at the end on Windows! else #This will test for both w3c-libwww and xmlrpc-c, since all this depends on each other XMLRPC_LFLAGS="-L$withval/lib -L/usr/local/lib -L/usr/lib" XMLRPC_IFLAGS="-I$withval/include" #OLD: #XMLRPC_LIBS =-L/usr/local/lib \ #-lxmlrpc_client -lwwwxml -lxmltok -lxmlparse -lwwwinit -lwwwapp \ #-lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher \ #-lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux \ #-lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lxmlrpc -lxmlrpc_xmlparse \ #-lxmlrpc_xmltok #This libs are not needed any more, at least not on Windows: #OLD_XMLRPC_LIBS="-ldl -lwwwzip" #WARNING !!!!!!!!!!!!!!! On Windows, -lwwwxml MUST be at the end !!!! #WARNING! Order is IMPORTANT on Windows!!!! XMLRPC_LIBS=" \ -lxmlrpc_client -lxmltok -lxmlparse -lwwwinit -lwwwapp -lwwwhtml \ -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile \ -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils \ -lmd5 -lws2_32 -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lwwwxml" fi #CFLAGS="$XMLRPC_IFLAGS $XMLRPC_LFLAGS $CFLAGS $XMLRPC_LIBS" CFLAGS="$XMLRPC_IFLAGS $CFLAGS" LDFLAGS="$XMLRPC_LFLAGS $LDFLAGS $XMLRPC_LIBS" CPPFLAGS="$XMLRPC_IFLAGS $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" echo "XMLRPC_LFLAGS=$XMLRPC_LFLAGS" echo "XMLRPC_IFLAGS=$XMLRPC_IFLAGS" echo "XMLRPC_LIBS=$XMLRPC_LIBS" fi AC_CHECK_LIB([xmlrpc], [main]) AC_CHECK_LIB([xmlrpc], [xmlrpc_client_init]) #configure:13536: gcc -o conftest.exe -Id:/msys/1.0/local/include -g -O2 #-Id:/msys/1.0/local/include -Ld:/msys/1.0/local/lib -L/usr/local/lib -L/usr/lib # -lxmlrpc_client -lxmltok -lxmlparse -lwwwinit -lwwwapp -lwwwhtml # -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile # -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils #-lmd5 -lws2_32 -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lwwwxml conftest.c #-lxmlrpc -lxmlrpc >&5 #d:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc0ybaaa.o(.text+0x15): In function `main': #F:/cygwin/usr/src/aubit/aubit4glsrc/conftest.c:34: undefined reference to `xmlrpc_client_init' #Order is wrong: this works: #gcc -shared -Wl,--out-implib=TMP.dll.a -Wl,--export-all-symbols -o ../../libRPC_XMLRPC.dll #xmlrpc_client.o xmlrpc_server.o -Ld:/msys/1.0/local/lib -L/usr/local/lib #-L/usr/lib -lxmlrpc_client -lxmltok -lxmlparse -lwwwinit -lwwwapp -lwwwhtml # -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp #-lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans #-lwwwcore -lwwwutils -lmd5 -lws2_32 -lxmlrpc -lxmlrpc_xmlparse #-lxmlrpc_xmltok -lwwwxml -L../.. -laubit4gl if test $ac_cv_lib_xmlrpc_main = yes; then if test "$AUBIT_SOURCE" = "1" ; then AC_CHECK_HEADERS(xmlrpc.h xmlrpc_client.h,,, [[#if HAVE_XMLRPC_H # include #endif ]]) if test "$ac_cv_header_xmlrpc_h" = "yes" \ -a "$ac_cv_header_xmlrpc_client_h" = "yes" ; then XML_RPC=yes else XML_RPC=no fi else XML_RPC=yes fi else XML_RPC=no fi CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS" AC_MSG_CHECKING(XML-RPC support) AC_MSG_RESULT($XML_RPC) #----- Third-party file list collection ------------------ if test "$XML_RPC" = "yes" -a "$COLLECT_THIRD_PARTY" = "1"; then #List of files we will not need to install: IGNORE_FILES="-lws2_32" #-lws2_32 is MinGW lib #Turn -L flags into paths to test ALL_PATHS= for lpath in $XMLRPC_LFLAGS; do CHK_PATH=`echo $lpath | sed -e 's/^-L//'` if test "$COMSPEC" != ""; then CHK_PATH="`$CYGPATH -m $CHK_PATH`" fi if test -d "$CHK_PATH"; then ALL_PATHS="$ALL_PATHS $CHK_PATH" else if test "$enable_ac_debug" = "yes" ; then echo "$lpath ($CHK_PATH) does not exist." fi fi done #Turn -l flags into files to test ALL_FILES= for one_lib in $XMLRPC_LIBS; do IGNORE_IT=0 for ignore_file in $IGNORE_FILES; do if test "$ignore_file" = "$one_lib"; then IGNORE_IT=1 break fi done if test "$IGNORE_IT" = "1"; then continue fi ALL_FILES="$ALL_FILES lib`echo $one_lib | sed -e 's/^-l//'`" done #Check if we can find this files, add them to list #.la is just Windows link catalog #If we have .a but no .dll, it would mean that we had to link #statically. It is pointless to install static libraries anyway if test "$ALL_PATHS" != "" -a "$ALL_FILES" != ""; then for one_file in $ALL_FILES; do GOTIT=0 for one_path in $ALL_PATHS; do if test -f "$one_path/$one_file$SO_EXT"; then THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ XMLRCP#$one_path/$one_file$SO_EXT" GOTIT=1 break else #check for static object, so we don't war about missing #files just because static linking was used #(in which case we don't need this file anyway) if test -f "$one_path/$one_file.a"; then GOTIT=1 fi fi done if test "$GOTIT" = "0"; then if test "$enable_ac_debug" = "yes" ; then echo "Failed to find file $one_file[$SO_EXT|.a]" echo "In this paths:" echo "$ALL_PATHS" fi fi done else if test "$enable_ac_debug" = "yes" ; then echo "ALL_PATHS and/or ALL_FILES is empty" fi fi #----- Third-party file list collection END -------------- fi else AC_MSG_RESULT(--with-xmlrpc disabled) fi ],[ AC_MSG_RESULT(--with-xmlrpc not specified) ]) if test "$enable_stop_xmlrpc" = "yes" ; then exit fi ## ================================================================== ## Check for SXML - a simple XML parser libray ## ================================================================== PHP_CONFIGURE_PART(Checking for SXML libraries:) AC_ARG_WITH(sxml, [ --with-sxml[=DIR] Include SXML support. DIR is the SXML base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" = ""; then withval=/usr/local else #NOTE: since on CygWin /usr/lib is symling to /usr, #files installed there actually end up in /lib, as far as #native Windows executable (GCC) is concerned withval="`$CYGPATH -m /`" fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON SXML" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" if test "$COMSPEC" = ""; then CPPFLAGS="-I$withval/include $CPPFLAGS" else CPPFLAGS="-I$withval/usr/include $CPPFLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([sxml], [main]) AC_CHECK_HEADERS([ sxml.h ]) AC_MSG_CHECKING(if we can use SXML) if test "$AUBIT_SOURCE" = "1" ; then #Do we really need gmp.h here, or was thsi a C&P typo? #if test "$ac_cv_header_gmp_h" = "yes" -a "$ac_cv_lib_sxml_main" = "yes"; then if test "$ac_cv_header_sxml_h" = "yes" -a "$ac_cv_lib_sxml_main" = "yes"; then HAVE_SXMLLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else if test "$ac_cv_lib_sxml_main" = "yes"; then HAVE_SXMLLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-sxml not specified) ]) if test "$enable_stop_sxml" = "yes" ; then exit fi ## ================================================================== ## Check for IBM WebSphere MQ ## ================================================================== PHP_CONFIGURE_PART(Checking for MQ libraries:) AC_ARG_WITH(mq, [ --with-mq[=DIR] Include IBM MQ support. DIR is the MQ base install directory, defaults to /usr/mqm.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" = ""; then withval=/usr/mqm else #NOTE: since on CygWin /usr/lib is symlink to /usr, #files installed there actually end up in /lib, as far as #native Windows executable (GCC) is concerned withval="`$CYGPATH -m /`" fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON MQ" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" CPPFLAGS="-I$withval/inc $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([mqm], [main]) AC_CHECK_HEADERS([ cmqc.h mqcmh.h ]) AC_MSG_CHECKING(if we can use MQ) if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_header_cmqc_h" = "yes" \ -a "$ac_cv_header_mqcmh_h" = "yes" \ -a "$ac_cv_lib_mqm_main" = "yes"; then HAVE_MQLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else if test "$ac_cv_lib_mqm_main" = "yes"; then HAVE_MQLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-mq not specified) ]) if test "$enable_stop_mq" = "yes" ; then exit fi ## ================================================================== ## Check for PCRE - Perl Compatible Regular Expressions ## ================================================================== PHP_CONFIGURE_PART(Checking for PCRE libraries:) AC_ARG_WITH(pcre, [ --with-pcre[=DIR] Include PCRE support. DIR is the PCRE base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$COMSPEC" != ""; then PCRE_REG_PATH="/machine/SOFTWARE/GnuWin32/Pcre/4.4/bin" regtool.exe check "$PCRE_REG_PATH" > /dev/null 2>&1 RET=$? if test "$RET" = "0"; then PCRE_INST_PATH=`regtool get "$PCRE_REG_PATH/InstallPath"` #echo "PCRE_INST_PATH=$PCRE_INST_PATH" PCRE_INST_PATH=`$CYGPATH -ws "$PCRE_INST_PATH"` #echo "PCRE_INST_PATH=$PCRE_INST_PATH" fi fi if test "$withval" = "yes"; then withval=/usr/local if test "$COMSPEC" != ""; then if test "$PCRE_INST_PATH" != ""; then withval=`$CYGPATH -u "$PCRE_INST_PATH"` fi fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PCRE" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" if test "$COMSPEC" = ""; then CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" else PCRE_INC_PATH="`$CYGPATH -m $withval`" CPPFLAGS="-I$PCRE_INC_PATH/include $CPPFLAGS" PCRE_LIB_PATH="`$CYGPATH -m $withval`" LDFLAGS="-L$PCRE_LIB_PATH/bin $LDFLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([pcre], [main]) AC_CHECK_HEADERS([ pcre.h ]) AC_MSG_CHECKING(if we can use PCRE) if test "$ac_cv_lib_pcre_main" = "yes"; then if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_header_pcre_h" != "yes"; then #On Windows binary distro of pcre, there are no header files #This also takes care of cases when we find libpcre suplied #with Apache, but there is no header file PCRE_INC_PATH="$aubitdir/tools/cygwin" fi HAVE_PCRELIB=1 AC_MSG_RESULT(yes) if test "$COLLECT_THIRD_PARTY" = "1"; then THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ PCRE#$withval/bin/pcre.dll" fi else HAVE_PCRELIB=1 AC_MSG_RESULT(yes) fi else AC_MSG_RESULT(no) HAVE_PCRELIB=0 fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pcre not specified) ]) if test "$enable_stop_pcre" = "yes" ; then exit fi ## ================================================================== ## Check for POP support ## ================================================================== PHP_CONFIGURE_PART(Checking for POP libraries:) AC_ARG_WITH(pop, [ --with-pop[=DIR] Include POP support. DIR is the POP base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" = ""; then #withval=/usr/local #in new versions changed to: withval=/usr else #NOTE: since on CygWin /usr/lib is symling to /usr, #files installed there actually end up in /lib, as far as #native Windows executable (GCC) is concerned withval="`$CYGPATH -m /`" fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON POP" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" if test "$COMSPEC" = ""; then AC_CHECK_LIB([ssl], [main]) CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib -lssl $LDFLAGS" else POP_INC_PATH="`$CYGPATH -m $withval`/usr/include" CPPFLAGS="-I$POP_INC_PATH $CPPFLAGS" POP_LIB_PATH="`$CYGPATH -m $withval`/lib" LDFLAGS="-L$POP_LIB_PATH $LDFLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([spopc], [main]) AC_CHECK_HEADERS([ libspopc.h ]) AC_MSG_CHECKING(if we can use POP) if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_lib_spopc_main" = "yes" -a "$ac_cv_header_libspopc_h" = "yes"; then HAVE_POPLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else if test "$ac_cv_lib_spopc_main" = "yes"; then HAVE_POPLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pop not specified) ]) if test "$enable_stop_pop" = "yes" ; then exit fi ## ================================================================== ## Check for SMTP support ## ================================================================== PHP_CONFIGURE_PART(Checking for SMTP libraries:) AC_ARG_WITH(smtp, [ --with-smtp[=DIR] Include SMTP support. DIR is the SMTP base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" = ""; then withval=/usr/local else #NOTE: since on CygWin /usr/lib is symling to /usr, #files installed there actually end up in /lib, as far as #native Windows executable (GCC) is concerned withval="`$CYGPATH -m /`" fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON SMTP" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" if test "$COMSPEC" = ""; then CPPFLAGS="-I$withval/include $CPPFLAGS `$PKG_CONFIG --cflags glib-2.0`" LDFLAGS="-L$withval/lib $LDFLAGS `$PKG_CONFIG --libs glib-2.0`" else #-IC:/gnu/GTK/include/glib-2.0 -IC:/gnu/GTK/lib/glib-2.0/include TMP_GLIB_CFLAGS="`$PKG_CONFIG --cflags glib-2.0`" SMTP_INC_PATH="$TMP_GLIB_CFLAGS -I`$CYGPATH -m $withval`/usr/include" CPPFLAGS="-I$SMTP_INC_PATH $CPPFLAGS" SMTP_LIB_PATH="`$CYGPATH -m $withval`/lib" LDFLAGS="-L$SMTP_LIB_PATH $LDFLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "TMP_GLIB_CFLAGS=$TMP_GLIB_CFLAGS" echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi #AC_CHECK_LIB([glib],[g_string_new]) AC_CHECK_LIB([smtp], [libsmtp_session_initialize]) AC_CHECK_LIB([smtp], [libsmtp_part_end]) AC_CHECK_HEADERS([ libsmtp.h ]) AC_MSG_CHECKING(if we can use SMTP) if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_lib_smtp_libsmtp_session_initialize" = "yes" \ -a "$ac_cv_header_libsmtp_h" = "yes"; then HAVE_SMTPLIB=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else if test "$ac_cv_lib_smtp_libsmtp_session_initialize" = "yes"; then HAVE_SMTPLIB=1 if test "$ac_cv_lib_smtp_libsmtp_part_end" = "yes"; then AC_DEFINE(HAVE_SMTPLIB_PART_END) fi AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-smtp not specified) ]) if test "$enable_stop_smtp" = "yes" ; then exit fi ## ================================================================== ## Check for ZLIB support ## ================================================================== PHP_CONFIGURE_PART(Checking for ZLIB libraries:) AC_ARG_WITH(zlib, [ --with-zlib[=DIR] Include ZLIB support. DIR is the ZLIB base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$COMSPEC" = ""; then withval=/usr/local if test -f /usr/local/include/zlib.h then ZLIB_INC_PATH="/usr/local/include" fi else #NOTE: since on CygWin /usr/lib is symling to /usr, #files installed there actually end up in /lib, as far as #native Windows executable (GCC) is concerned withval="`$CYGPATH -m /`" fi else #user specified custom withval CUSTOM_WITHVAL=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON ZLIB" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" if test "$COMSPEC" = ""; then CPPFLAGS="-I$withval/include $CPPFLAGS `$PKG_CONFIG --cflags glib-2.0`" LDFLAGS="-L$withval/lib $LDFLAGS `$PKG_CONFIG --libs glib-2.0`" else ZLIB_INC_PATH="`$CYGPATH -m $withval`/usr/include" CPPFLAGS="-I$ZLIB_INC_PATH $CPPFLAGS" ZLIB_LIB_PATH="`$CYGPATH -m $withval`/lib" LDFLAGS="-L$SMTO_LIB_PATH $LDFLAGS" fi if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" fi AC_CHECK_LIB([z], [gzopen]) AC_CHECK_HEADERS([ zlib.h ]) AC_MSG_CHECKING(if we can use zlib) if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_lib_z_gzopen" = "yes" -a "$ac_cv_header_zlib_h" = "yes"; then AC_MSG_RESULT(yes) HAVE_ZLIB=1 AC_DEFINE(HAVE_ZLIB,1,[ ]) AC_DEFINE(HAVE_ZLIB_DEF,1,[ ]) else AC_DEFINE(HAVE_ZLIB,0,[ ]) AC_DEFINE(HAVE_ZLIB_DEF,0,[ ]) AC_MSG_RESULT(no) fi else if test "$ac_cv_lib_z_gzopen" = "yes"; then AC_MSG_RESULT(yes) HAVE_ZLIB=1 AC_DEFINE(HAVE_ZLIB,1,[ ]) AC_DEFINE(HAVE_ZLIB_DEF,1,[ ]) else AC_DEFINE(HAVE_ZLIB,0,[ ]) AC_DEFINE(HAVE_ZLIB_DEF,0,[ ]) AC_MSG_RESULT(no) fi fi #Restore values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-zlib not specified) ]) if test "$enable_stop_zlib" = "yes" ; then exit fi ## ================================================================== ## Check for PDF support ## ================================================================== PHP_CONFIGURE_PART(Checking for PDF support:) AC_ARG_WITH(pdf, [ --with-pdf[=DIR] Include PDF support. DIR is the PDFlib install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PDF" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS old_CFLAGS=$CFLAGS old_CPPFLAGS=$CPPFLAGS old_PATH="$PATH" if test "$MSYS_ROOTDIR" != ""; then PATH="$MSYS_ROOTDIR/local/bin:$PATH" echo "PATH=$PATH" fi AC_PATH_PROG(PDFLIB_CONFIG, pdflib-config, no) if test "$PDFLIB_CONFIG" != "no"; then PDF_LIBDIR=`pdflib-config --libdir` PDF_INCDIR=`pdflib-config --includedir` PDF_VERSION=`pdflib-config --version` PDF_LDFLAGS=`pdflib-config --ldflags` PDF_CFLAGS=`pdflib-config --cflags` fi #if test "$GCC_MINGW" != "yes"; then # TEST_PDFLIB_I_FLAGS="-I$withval/include" # TEST_PDFLIB_L_FLAGS="-L$withval/lib" #else if test "$GCC_MINGW" = "yes" \ -a "$MSYS_ROOTDIR" != "" \ -a "$PDFLIB_CONFIG" != "no" ; then #On mingw, pdflib-config would return paths relative to #it's installation dir (which is by default Msys install dir) #so we cant use it withval="$MSYS_ROOTDIR" withval="`$CYGPATH -m $withval`" TEST_PDFLIB_I_FLAGS="-I$withval/local/include" TEST_PDFLIB_L_FLAGS="-L$withval/local/lib" fi #fi TEST_PDFLIB_FLAGS="$TEST_PDFLIB_I_FLAGS $TEST_PDFLIB_L_FLAGS" LDFLAGS="$LDFLAGS $TEST_PDFLIB_FLAGS -lm" CFLAGS="$CFLAGS $TEST_PDFLIB_FLAGS" #C preprocesor flags CPPFLAGS="$CPPFLAGS $TEST_PDFLIB_I_FLAGS" if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" echo "PDF_LIBDIR=$PDF_LIBDIR" echo "PDF_INCDIR=$PDF_INCDIR" echo "PDF_VERSION=$PDF_VERSION" echo "PDF_LDFLAGS=$PDF_LDFLAGS" echo "PDF_CFLAGS=$PDF_CFLAGS" echo "TEST_PDFLIB_I_FLAGS=$TEST_PDFLIB_I_FLAGS" echo "TEST_PDFLIB_L_FLAGS=$TEST_PDFLIB_L_FLAGS" fi # AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[ ])) # FIXME: Replace `main' with a function in `-lpdf': AC_CHECK_LIB([pdf], [main]) AC_CHECK_HEADERS([ pdflib.h ]) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS PATH="$old_PATH" AC_MSG_CHECKING(if we can use PDF) if test "$AUBIT_SOURCE" = "1" ; then if test $ac_cv_lib_pdf_main = yes -a "$ac_cv_header_pdflib_h" = "yes"; then USE_PDF=yes PDFBUILD=yes PDFLIB_I_FLAGS="$TEST_PDFLIB_I_FLAGS" PDFLIB_L_FLAGS="$TEST_PDFLIB_L_FLAGS" AC_DEFINE(HAVE_PDF,1,[ ]) AC_MSG_RESULT(yes) #;Source: @WINDOWS_DRIVE@@CYGWIN_PATH@\usr\local\lib\libpdf.dll; DestDir: {app}\bin\; Components: PDFLIB #;looks like it needs to be called "pdflib.dll" not "libpdf.dll" - which we renamed to be able to use -l when linking #;apparently it stores the name of the original dll somewhere? #Source: @WINDOWS_DRIVE@@CYGWIN_PATH@\usr\local\lib\libpdf.dll; DestDir: {app}\bin\pdflib.dll; Components: PDFLIB #if test "$COLLECT_THIRD_PARTY" = "1"; then #When compiling from source on Windows, I got only static object #Which we don't need anyway #THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ # PDF#$withval/lib/libpdf.a" #fi else AC_DEFINE(HAVE_PDF,0,[ ]) AC_MSG_RESULT(no) fi else if test $ac_cv_lib_pdf_main = yes; then USE_PDF=yes PDFBUILD=yes PDFLIB_I_FLAGS="$TEST_PDFLIB_I_FLAGS" PDFLIB_L_FLAGS="$TEST_PDFLIB_L_FLAGS" AC_DEFINE(HAVE_PDF,1,[ ]) AC_MSG_RESULT(yes) else AC_DEFINE(HAVE_PDF,0,[ ]) AC_MSG_RESULT(no) fi fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pdf not specified) ]) if test "$enable_stop_pdf" = "yes" ; then exit fi ## ================================================================== ## Checks for QREncoder support (QR Barcodes) ## ================================================================== AC_CHECK_LIB([stdc++], [main], [HAVE_STDCPP="1"], [HAVE_STDCPP="0"]) PHP_CONFIGURE_PART(Checking for QREncoder support:) save_LIBS="$LIBS" AC_ARG_WITH(qrencoder,[--with-qrencoder],[chk_qrencoder=x$withval],chk_qrencoder=notset) HAVE_LIBQRENCODE=0 if test "$chk_qrencoder" != "no" then AC_CHECK_LIB([qrencode], [QRinput_new2]) AC_CHECK_LIB([qrencode], [QRcode_encodeMask]) if test "$ac_cv_lib_qrencode_QRinput_new2" = "yes"; then HAVE_LIBQRENCODE=1 AC_DEFINE(HAVE_LIBQRENCODE) AC_DEFINE(HAVE_LIBQRENCODE_ENCODEMASK) if test "$ac_cv_lib_qrencode_QRcode_encodemask" = "yes"; then HAVE_LIBQRENCODE_ENCODEMASK=1 else HAVE_LIBQRENCODE_ENCODEMASK=0 fi fi fi if test "$enable_stop_qrencode" = "yes" ; then exit fi LIBS="$save_LIBS" ## ============================================ ## Checks for PDFlib8 support ## ============================================ PHP_CONFIGURE_PART(Checking for PDFLIB8 support:) save_LIBS="$LIBS" AC_ARG_WITH(pdflib,[--with-pdflib],[chk_pdflib=x$withval],chk_pdflib=notset) HAVE_PDFLIB8=0 if test "$chk_pdflib" != "no" then AC_CHECK_LIB([pdflib], [PDFLIB_MAJORVERSION 8]) if test "$ac_cv_lib_pdflib_PDFLIB_MAJORVERSION 8]" = "yes"; then HAVE_PDFLIB8=1 fi fi if test "$enable_stop_qrencode" = "yes" ; then exit fi LIBS="$save_LIBS" ## ================================================================== ## Checks for CINT - C code interpreter ## ================================================================== PHP_CONFIGURE_PART(Checking for C interpreter (Cint) :) AC_ARG_WITH(cint, [ --with-cint[=DIR] Include CINT support. DIR is the Cint base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" != "yes"; then #user specified path to cint CINT_PATH=$withval #Apprently not needed #ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" else CINT_PATH=/usr/local fi if test "$enable_ac_debug" = "yes" ; then echo "CINT_PATH=$withval" fi #FIXME: despite listing all this paths, cint executable will only be found #if its in the PATH - no idea why if test "$enable_ac_debug2" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "save_LDFLAGS=$save_LDFLAGS" fi save_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" save_LDFLAGS="$LDFLAGS" save_PATH="$PATH" save_LIBS="$LIBS" if test "$enable_ac_debug2" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "save_LDFLAGS=$save_LDFLAGS" fi LD_LIBRARY_PATH="$CINT_PATH:/usr/local/cint:/opt/cint:/usr/local/lib:/usr/lib/termcap:$LD_LIBRARY_PATH" LDFLAGS="-L$CINT_PATH/lib -L/usr/lib/termcap $LDFLAGS" PATH="$CINT_PATH:$PATH" #/opt/cint:/usr/local/bin export PATH if test "$enable_ac_debug2" = "yes" ; then echo "-------------DEBUG--------------" echo "PATH=$PATH" echo "LDFLAGS=$LDFLAGS" echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export CINTSYSDIR=$CINT_PATH unset CINT unset ac_cv_path_CINT AC_PATH_PROG(CINT, cint, no, $CINT_PATH $PATH /usr/local/cint /opt/cint ) unset CINT unset ac_cv_path_CINT AC_PATH_PROG(CINT, cint, no, $CINT_PATH, $PATH, /usr/local/cint, /opt/cint ) unset CINT unset ac_cv_path_CINT AC_PATH_PROG(CINT, cint, no, $CINT_PATH) cint -Q dummy echo "-------------END DEBUG--------------" fi unset CINT unset ac_cv_path_CINT #WARNING: search paths have to be specified with column separator - #NOT WITH SPACE SEPARATOR!!!!! or maybe comma needs to be used? AC_PATH_PROG(CINT, cint, no, $CINT_PATH:$PATH:/usr/local/cint:/opt/cint ) AC_PATH_PROG(MAKECINT, makecint, no, $CINT_PATH:$PATH:/usr/local/cint:/opt/cint ) if test "$CINT" != "no" -a "$MAKECINT" != "no"; then CINTSYSDIR=`dirname $CINT` case "$CINTSYSDIR" in *cygdrive*) if test "$GCC_MINGW" = "yes"; then #convert Cygwin path mapping back to native CINTSYSDIR=`echo "$CINTSYSDIR" | sed -e 's/^\/cygdrive\///' -e 's/\//:\//'` fi ;; esac if test "$COMSPEC" = ""; then #UNIX AC_CHECK_LIB([termcap], [main]) AC_CHECK_LIB([bsd], [main]) AC_CHECK_LIB([bsd-compat], [main]) if test "$ac_cv_lib_bsd_main" != "yes" \ -a "$ac_cv_lib_bsd_compat_main" = "yes"; \ then ln -s /usr/lib/libbsd-compat.a /usr/lib/libbsd.a #reset and re-test ac_cv_lib_bsd_main="" AC_CHECK_LIB([bsd], [main]) fi AC_MSG_CHECKING(if we can use Cint) if test "$ac_cv_lib_bsd_main" != "yes" \ -o "$ac_cv_lib_termcap_main" != "yes"; \ then CINT=no AC_MSG_RESULT(no-missing bsd or termcap libraries) else AC_MSG_RESULT(yes) fi else #On Windows, we dont have to worry about dependencies AC_MSG_CHECKING(if we can use Cint) AC_MSG_RESULT(yes) fi else AC_MSG_RESULT(Use Cint - NO - no cint and/or makecint executable) fi LD_LIBRARY_PATH="$save_LD_LIBRARY_PATH" PATH="$save_PATH" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" else AC_MSG_RESULT(--with-cint disabled) fi ],[ AC_MSG_RESULT(--with-cint not specified) ]) if test "$enable_ac_debug" = "yes" ; then echo "LDFLAGS=$LDFLAGS" echo "save_LDFLAGS=$save_LDFLAGS" echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" fi if test "$enable_stop_cint" = "yes" ; then exit fi ## ================================================================== ## Determine RPM build location ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then PHP_CONFIGURE_PART(RPM package settings:) AC_MSG_CHECKING(RPM build root) #MACHTYPE is a environment variable - not a Autoconf one case "$MACHTYPE" in *-mandrake-linux-gnu) RPMBUILDROOT="/usr/src/RPM" ;; *-redhat-linux-gnu) #REDHAT_VER #configure:7266: checking RedHat version #configure:7270: result: Red Hat Linux release 7.2 (Enigma) (7.2) case $REDHAT_VER in 6.*) RPMBUILDROOT=/root/redhat ;; *) #redhat 7.2 and up RPMBUILDROOT=/usr/src/redhat ;; esac ;; *-suse-linux) RPMBUILDROOT="/usr/src/packages" ;; *) if test "$RPM" != "no"; then #Have rpm executables RPMBUILDROOT=`$RPM --eval "%_topdir"` else #Probably not a RPM based distro RPMBUILDROOT=no-rpm-build-root fi ;; esac AC_MSG_RESULT($RPMBUILDROOT) fi ## ================================================================== ## Checks for other 4gl compiles ## ================================================================== PHP_CONFIGURE_PART(Checking for 4Js BDL / Informix D4GL:) AC_ARG_WITH(fourj, [ --with-fourj[=DIR] Include 4Js compiler support. DIR is the 4Js base install directory, defaults to xx.], [ if test "$withval" != "no"; then AC_PATH_PROG(FJS_PCOMPILER, fglcomp, no) AC_PATH_PROG(FJS_PRUNTIME, fglrun, no) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-fourj not specified) ]) PHP_CONFIGURE_PART(Checking for Querix compiler:) AC_ARG_WITH(hydra, [ --with-hydra[=DIR] Include Querix Hydra compiler support. DIR is the Querix base install directory, defaults to xx.], [ if test "$withval" != "no"; then #4gl code compiler have same name as Plexus = fglc so we look for Form Compiler AC_PATH_PROG(QUERIX_COMP, fmpc, no) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-hydra not specified) ]) if test "$cygwin" = "1" ; then PHP_CONFIGURE_PART(Checking for Plexus XDP AD32 - FGLC Compiler:) AC_ARG_WITH(plexus, [ --with-plexus[=DIR] Include Plexus compiler support. DIR is the Plexus base install directory, defaults to xx.], [ if test "$withval" != "no"; then #same name as Querix: #AC_PATH_PROG(PLEXUS_COMP, fglc, no) AC_PATH_PROG(PLEXUS_COMP, mkesq, no) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-plexus not specified) ]) else PHP_CONFIGURE_PART(Checking for Classic Informix 4gl P-code:) AC_ARG_WITH(i4gl, [ --with-i4gl[=DIR] Include Informix compiler support. DIR is Informix base install directory, defaults to xx.], [ if test "$withval" != "no"; then AC_PATH_PROG(I4GL_PCOMPILER, fglpc, no) AC_PATH_PROG(I4GL_PRUNTIME, fglgo, no) if test "$I4GL_PCOMPILER" != "no"; then #For 4glWorks: try to understand whether this is 4gl4 or 4gl6, as you #have to free cursors & statements differently AC_MSG_CHECKING(fglpc version) set `fglpc -v 2>/dev/null | head -n 1|sed -e 's/^.*sion //' -e 's/\./ /g'` if test "$1" != ""; then #if test "$1" = "4" -a "$2" -lt "50"; then if test "$1" -lt "5"; then I4GL_PCOMPILER_VER=4 AC_MSG_RESULT($1.$2.$3 (series 4 or earler)) else I4GL_PCOMPILER_VER=6 AC_MSG_RESULT($1.$2.$3 (series 6 or later)) fi else AC_MSG_ERROR(Cannot get fglpc version.) fi fi PHP_CONFIGURE_PART(Checking for Classic Informix 4gl C-code:) AC_PATH_PROG(I4GL_CCOMPILER, c4gl, no) if test "$I4GL_CCOMPILER" != "no"; then #For 4glWorks: try to understand if the product is esql/c 5+ #aware, or is a special case, ie c4gl 4.x or is not esql/c #aware in any way, shape or form (ie an rds only shop) AC_MSG_CHECKING(c4gl version) set `c4gl -V 2>/dev/null | head -n 1|sed -e 's/^.*INFORMIX-4GL Version //' -e 's/\./ /g'` if test "$1" != ""; then #if test "$1" = "4" -a "$2" -lt "50"; then if test "$1" -lt "5"; then I4GL_CCOMPILER_VER=4 AC_MSG_RESULT($1.$2.$3 (series 4 or earler)) else I4GL_CCOMPILER_VER=6 AC_MSG_RESULT($1.$2.$3 (series 6 or later)) fi else AC_MSG_ERROR(Cannot get c4gl version.) fi fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-i4gl not specified) ]) fi ## ================================================================== ## Checks for web server support ## ================================================================== #see if we can enable Aubit CGI/HTMLlib compile, DoxyGen web #install, FGLDOC web server support PHP_CONFIGURE_PART(Checking for Web server:) AC_ARG_WITH(httpd, [ --with-httpd[=DIR] Include web server support. DIR is the xx base install directory, defaults to xx.], [ if test "$withval" != "no"; then AC_PATH_PROG(APACHECTL, apachectl, no) AC_PATH_PROG(APACHE2CTL, apache2ctl, no) AC_PATH_PROG(HTTPD, httpd, no) if test "$APACHE2CTL" != "no" then APACHECTL=$$APACHE2CTL fi AC_MSG_CHECKING(Web server support) if test "$APACHECTL" != "no"; then AC_MSG_RESULT(Apache) else if test "$HTTPD" != "no"; then AC_MSG_RESULT(httpd) else AC_MSG_RESULT(no) fi fi #If we have web server: if test "$APACHECTL" != "no"; then AC_MSG_CHECKING(Apache configuration file) if test -f /etc/httpd/conf/httpd.conf; then APACHE_CONF=/etc/httpd/conf/httpd.conf AC_MSG_RESULT($APACHE_CONF) else AC_MSG_RESULT(no) fi fi #FIXME: DO we have JSP needed for FGLDOC? if test "$APACHE_CONF" != ""; then AC_MSG_CHECKING(Web server paths) grep ScriptAlias $APACHE_CONF > /tmp/tmp_config_.tmp CGI_DIR=`grep -v \# /tmp/tmp_config_.tmp | grep cgi-bin | awk '{print $3}' | sed -e 's/"//g'` WWW_DOCUMENT_ROOT=`grep ^DocumentRoot $APACHE_CONF | head -n 1 | awk '{print $2}' | sed -e 's/"//g'` AC_MSG_RESULT(OK ($WWW_DOCUMENT_ROOT)($CGI_DIR)) fi if test "$with_www_name" != "" ; then WWW_HOST_NAME=$with_www_name else WWW_HOST_NAME=localhost fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-httpd not specified) ]) ## ================================================================== ## Checks for SAP DB ESQL/C (pre-compiler) support ## ================================================================== SAPDB_ESQLC="no" PHP_CONFIGURE_PART(Checking for SAP DB/MySQL MaxDB ESQL/C support:) AC_ARG_WITH(sapdb, [ --with-sapdb[=DIR] Include SAP DB/MySQL MaxDB ESQL/C support. DIR is the Sap DB base install directory, defaults to ${SAPDBROOT:/opt/sdb}.], [ # install directory, defaults to ${SAPDBROOT:-nothing} #Note - last MaxDB version that includes CPC pre-compiler is 7.5. As of 7.6 # CPC is no longer available. MySQL recomends using ODBC or there new # interface called DBC or something. However, as CPC is not dependent on # the version of the MaxDB database compnents, CPC from version 7.5 can # be used with 7.6, and all future versions. # # Installing only CPC however requires that full 7.5 package is downloaded # and then only CPC component selected for installation. SAPDB_VER="7500" if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$SAPDBROOT" = ""; then withval="$SAPDBROOT" SAPDB_CUSTOM_WITHVAL=1 else #SAPDB_WARNING=1 #try default if test "$SAPDB_VER" = "7500"; then #New - MySQL MaxDB default location: withval="/opt/sdb" else #Old SAP DB default location withval="/opt/sapdb" fi fi else #User specified withval using --with-sapdb=xxx SAPDB_CUSTOM_WITHVAL=1 fi SAPDBROOT="$withval" if ! test -d "$SAPDBROOT"; then if test "$SAPDB_CUSTOM_WITHVAL" = "1"; then AC_MSG_RESULT(no - directory specified ($SAPDBROOT) does not exist) else AC_MSG_RESULT(no) fi else if test "$withval" = "yes"; then if test "$SAPDB_VER" = "7500"; then SAPDB_INCDIR="-I$SAPDBROOT/programs/sdk/$SAPDB_VER/incl" SAPDB_LIBDIR="-L$SAPDBROOT/programs/lib \ -L$SAPDBROOT/programs/runtime/$SAPDB_VER/lib" #-L$SAPDBROOT/programs/runtime/7403/lib else #At least default SuSE 9 RPM's use /interfaces/precompiler/sdk/7403/incl #probably anticipating that cpc compiler will take care of #finding includes like cpc.h This may force us to try to compile # a simple hello.cpc instead of looking for headers/libraries #if we see more of this version numbering in the paths in the future. SAPDB_INCDIR="-I$SAPDBROOT/depend/incl \ -I$SAPDBROOT/interfaces/precompiler/incl \ -I$SAPDBROOT/interfaces/precompiler/sdk/7403/incl" SAPDB_LIBDIR="-L$SAPDBROOT/depend/lib \ -L$SAPDBROOT/interfaces/precompiler/lib" fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON SAPESQLC" WARN_LD_LIBRARY_PATH=1 SAPDB_INCDIR="-I$withval/depend/incl -I$withval/interfaces/precompiler/incl" SAPDB_LIBDIR="-L$withval/depend/lib -L$withval/interfaces/precompiler/lib" if test "$withval" != "$SAPDBROOT"; then SAPDB_WARNING=2 fi fi if test "$withval" != "yes"; then #Custom location (withval) ADD_LD_LIBRARY_PATH="$withval/depend/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" else #Default location (SAPDBROOT or in-built) ADD_LD_LIBRARY_PATH="$SAPDBROOT/depend/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON SAP" WARN_LD_LIBRARY_PATH=1 old_PATH="$PATH" if test "$SAPDB_VER" = "7500"; then PATH="$SAPDBROOT/programs/bin:$PATH" else PATH="$SAPDBROOT/interfaces/precompiler/bin:$PATH" fi #First check if we have cpc installed at all: AC_PATH_PROG(SAPDB_ESQLC, cpc, no, $PATH $SAPDBROOT/programs/bin $SAPDBDIR/interfaces/precompiler/bin /opt/sapdb/interfaces/precompiler/bin) #any C (gcc) compiler is OK fro SAP (?) SAPDBESQLCC_OK="OK" if test "$SAPDB_ESQLC" != "no"; then if test "$SAPDB_ESQLC" != "no" && test "$SAPDBESQLCC_OK" = "OK"; then SAPDB_INCLUDE="$SAPDB_INCDIR" SAPDB_LFLAGS="$SAPDB_LIBDIR" old_CFLAGS="$CFLAGS" old_LDFLAGS="$LDFLAGS" old_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS $SAPDB_INCLUDE $SAPDB_CFLAGS" LDFLAGS="$LDFLAGS $SAPDB_LDFLAGS" CPPFLAGS="$CPPFLAGS $SAPDB_INCLUDE" AC_CHECK_HEADERS([ cpc.h ]) AC_MSG_CHECKING(if we can use cpc) if test "$ac_cv_header_cpc_h" = "yes" ; then AC_DEFINE(HAVE_SAPDB) AC_MSG_RESULT(Yes) else AC_MSG_RESULT(No - missing header cpc.h) SAPDB_ESQLC="no" fi CFLAGS="$old_CFLAGS" LDFLAGS="$old_LDFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_CHECKING(if we can use cpc) AC_MSG_RESULT(cpc not working or no compatible C compiler) SAPDB_ESQLC="no" fi else AC_MSG_CHECKING(if we can use cpc) AC_MSG_RESULT(cpc not in path) SAPDB_ESQLC="no" fi PATH="$old_PATH" fi else SAPDB_ESQLC="no" SAPDBDIR="" AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-sapdb not specified) ]) if test "$enable_stop_sapdb" = "yes" ; then exit fi ## ================================================================== ## Checks for Querix ESQL/C support ## ================================================================== PHP_CONFIGURE_PART(Checking for Querix ESQL/C support:) AC_ARG_WITH(esqlc, [ --with-esqlc[=DIR] Include Querix ESQL/C support. DIR is the Querix base install directory, defaults to ${QUERIXDIR:-nothing}.], [ if test "$withval" != "no"; then #Querix ESQL/C compiler from Hydra 4: AC_PATH_PROG(Q_ESQLC, esqlc, no) #Qerix flags when using MSVC: #CFLAGS=/nologo -DWINNT -Dgetenv=QXgetenv -MD -O2 -Y- $(INCLUDES) #CFLAGS_DEBUG=/nologo -DWINNT -Dgetenv=QXgetenv -MD - Zi -GX -Od -Y- $(INCLUDES) #FGL_LIBS="$(QUERIXDIR)\lib\libfgl.lib" #FGL_LIBS_DEBUG="$(QUERIXDIR)\lib\libfgld.lib" #SQL_LIB="$(QUERIXDIR)\lib\libsqlc.lib" #SQL_LIB_DEBUG="$(QUERIXDIR)\lib\libsqlcd.lib" #LINK_FLAGS=/nologo /subsystem:console /incremental:yes /machine:x86 #QX_LIBS=$(FGL_LIBS) $(SQL_LIB) $(LINK_FLAGS) #QX_LIBS_DEBUG=$(FGL_LIBS_DEBUG) $(SQL_LIB_DEBUG) $(LINK_FLAGS) /debug if test "$cygwin" = "1"; then #on Windows, Querix officially supportes only #Micro$loth or Bordland C compiler to use ESQL/C: AC_PATH_PROG(MSVC_COMP, cl, no) AC_PATH_PROG(MSVC_LINK, link, no) if test "$MSVC_COMP" != "no" && test "$MSVC_LINK" != "no" ; then QESQLCC_OK="OK" MSVC_LINK="$MSVC_LINK /nologo" #else # AC_MSG_WARN(Querix ESQL/C on Windows officially supports only MS or Borland C compilers) # AC_MSG_WARN(We will be using GCC instead, since they where not detected) # QESQLCC_OK="OK" fi else #on non-Windows platforms, native C compiler will do: QESQLCC_OK="OK" fi AC_MSG_CHECKING(if we can use Querix ESQL/C) if test "$Q_ESQLC" != "no" && test "$QESQLCC_OK" = "OK"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no - esqlc not in path or no compatible C compiler) Q_ESQLC=no fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-esqlc not specified) ]) if test "$LIBS" != ""; then echo "WARNING: (1) LIBS contains $LIBS" fi ## ================================================================== ## Checks for Informix ESQL/C support ## ================================================================== PHP_CONFIGURE_PART(Checking for Informix ESQL/C support:) AC_ARG_WITH(informix, [ --with-informix[=DIR] Include Informix ESQL/C support. DIR is the Informix base install directory, defaults to ${INFORMIXDIR:-nothing}.], [ if test "$withval" != "no"; then if test "$withval" != "yes"; then if test "$INFORMIXDIR" = ""; then export INFORMIXDIR="$withval" AC_MSG_WARN(INFORMIXDIR not set in environment - setting it form value) AC_MSG_WARN(of --with-informix flag specified:$withval) AC_MSG_WARN(You may want to set INFORMIXDIR in your environment) AC_MSG_WARN(yourself, as some Informix tools may depend on it) fi fi if test "$INFORMIXDIR" = "" -a "$force_informix" != "yes" ; then INFORMIX_WARNING=1 AC_MSG_RESULT(no) else if test "$withval" = "yes"; then if test "$INFORMIXDIR" = "" ; then if test "$COMSPEC" != ""; then echo "########################################################" #echo "THIS SHOULD NOT HAPPEN ANYMORE" echo "Could not get INFORMIXDIR from registry." echo "It seems you dont have Informix CSDK installed." #echo "and on UNIX INFORMIXDIR _MUST_ be set for anything Informix to work" echo "########################################################" fi #try to find INFORMIXDIR by looking for esqlc in the PATH: AC_PATH_PROG(TMPIFMX_ESQLC, esql, no) if test "$TMPIFMX_ESQLC" != "no"; then if test "$enable_ac_debug" = "yes" ; then echo "TMPIFMX_ESQLC='$TMPIFMX_ESQLC'" fi #remove esql.exe TMP1=`dirname "$TMPIFMX_ESQLC"` #remove bin TMP2=`dirname "$TMP1"` if test "$COMSPEC" != ""; then echo "remove CSDK - THIS SHOULD NOT HAPPEN ANYMORE" echo "since we get INFORMIXDIR from registry??!!" INFORMIXDIR="`dirname "$TMP2"`" case "$INFORMIXDIR" in *cygdrive*) if test "$GCC_MINGW" = "yes"; then #convert Cygwin path mapping back to native INFORMIXDIR=`echo "$INFORMIXDIR" | sed -e 's/^\/cygdrive\///' -e 's/\//:\//'` fi ;; esac fi AC_MSG_WARN(INFORMIXDIR set based on location of esql) AC_MSG_WARN(executable to $INFORMIXDIR) else AC_MSG_WARN(INFORMIXDIR not set in environment and) AC_MSG_WARN(not specified with --with-informix[=DIR] and) AC_MSG_WARN(cant find esql executable) fi else if test "$enable_ac_debug" = "yes" ; then echo "INFORMIXDIR='$INFORMIXDIR'" fi fi IFX_INCDIR="$INFORMIXDIR/incl/esql" IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql" else #user specified custom withval if test "$withval" != "$INFORMIXDIR"; then INFORMIX_WARNING=2 fi INFORMIXDIR="$withval" WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON IESQLC" WARN_LD_LIBRARY_PATH=1 IFX_INCDIR="$withval/incl/esql" IFX_LIBDIR="-L$withval/lib -L$withval/lib/esql" #Make sure that installation we are looking for is on top of PATH: export PATH="$INFORMIXDIR/bin:$PATH" fi if test "$INFORMIXDIR" = ""; then AC_MSG_WARN(INFORMIXDIR still empty!) fi if test "$withval" != "yes"; then ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$withval/lib/esql$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" else ADD_LD_LIBRARY_PATH="$INFORMIXDIR/lib$A4GL_PATH_SEP$INFORMIXDIR/lib/esql$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON Informix-ESQL" WARN_LD_LIBRARY_PATH=1 #First check if we have esql installed at all: AC_PATH_PROG(IFMX_ESQLC, esql, no) if test "$enable_ac_debug" = "yes" ; then echo "IFMX_ESQLC='$IFMX_ESQLC'" fi if test "$IFMX_ESQLC" != "no"; then old_CFLAGS="$CFLAGS"; old_LDFLAGS="$LDFLAGS"; old_LIBS="$LIBS"; old_CPPFLAGS="$CPPFLAGS" #WARNING:new PG path must come first CFLAGS="-I$IFX_INCDIR -I$INFORMIXDIR/incl $CFLAGS" CPPFLAGS="-I$IFX_INCDIR -I$INFORMIXDIR/incl $CPPFLAGS" #LDFLAGS="$LDFLAGS" #LIBS="$PGSQL_LIBS" #include "esql/decimal.h" AC_CHECK_HEADERS([ esql/decimal.h ]) if test "$ac_cv_header_esql_decimal_h" != "yes" ; then AC_MSG_WARN(Missing esql/decimal.h - disabling Informix ESQL/C support) IFMX_ESQLC="no" fi CFLAGS="$old_CFLAGS"; LDFLAGS="$old_LDFLAGS"; LIBS="$old_LIBS"; CPPFLAGS="$old_CPPFLAGS" fi if test "$IFMX_ESQLC" != "no"; then case "$IFMX_ESQLC" in *cygdrive*) if test "$GCC_MINGW" = "yes"; then #convert Cygwin path mapping back to native IFMX_ESQLC=`echo "$IFMX_ESQLC" | sed -e 's/^\/cygdrive\///' -e 's/\//:\//'` fi ;; esac #must quote it in case it contins spaces in the path IFMX_ESQLC="'$IFMX_ESQLC'" fi if test "$enable_ac_debug" = "yes" ; then echo "IFMX_ESQLC='$IFMX_ESQLC'" fi if test "$cygwin" = "1"; then #on Windows, IBM/Informix officially supportes only #Micro$loth or Bordland C compiler to use ESQL/C: AC_PATH_PROG(MSVC_COMP, cl, no) AC_PATH_PROG(MSVC_LINK, link, no) if test "$MSVC_COMP" != "no" && test "$MSVC_LINK" != "no" ; then IESQLCC_OK="OK" MSVC_LINK="$MSVC_LINK /nologo" else AC_MSG_WARN(Informix ESQL/C on Windows officially supports only MS or) AC_MSG_WARN(Borland C compilers. Aubit will use GCC instead since) AC_MSG_WARN(they where not detected) IESQLCC_OK="OK" fi else #on non-Windows platforms, native C compiler will do: IESQLCC_OK="OK" fi if test "$IFMX_ESQLC" != "no" && test "$IESQLCC_OK" = "OK"; then IFX_INCLUDE="-I$IFX_INCDIR" IFX_LFLAGS="$IFX_LIBDIR" if test -z "$IFX_LIBS"; then #Fails apparently because of single quoting: #IFX_LIBS=`$IFMX_ESQLC -libs | sed -e 's/-lm$//'` IFX_LIBS=`esql -libs | sed -e 's/-lm$//'` dnl -lm twice otherwise? IFX_LIBS=`echo $IFX_LIBS | sed -e 's/Libraries to be used://g' -e 's/esql: error -55923: No source or object file\.//g'` #dnl Seems to get rid of newlines. #dnl According to Perl's DBD-Informix, might contain these strings. if test "$IFX_LIBS" = ""; then AC_MSG_WARN(** Cant get libraries list using) AC_MSG_WARN(** $IFMX_ESQLC -libs) $IFMX_ESQLC -libs esql -libs else #WARNING: when using GCC on Windows we need to link with #.dll's in /bin - NOT with .lib's in /lib (as 'esql -libs' #will return) if test "$COMSPEC" != ""; then #Convert backslash to slash IFX_LIBS=`echo $IFX_LIBS | sed -e 's/\\\\/\//g'` #echo "IFX_LIBS=$IFX_LIBS" #Remove double slash-es IFX_LIBS=`echo $IFX_LIBS | sed -e 's/\/\//\//g'` #echo "IFX_LIBS=$IFX_LIBS" #convert lib to bin IFX_LIBS=`echo $IFX_LIBS | sed -e 's/\/lib\//\/bin\//g'` #echo "IFX_LIBS=$IFX_LIBS" #convert .lib to .dll IFX_LIBS=`echo $IFX_LIBS | sed -e 's/\.lib/\.dll/g'` #echo "IFX_LIBS=$IFX_LIBS" #They are MSCV libs - filter them out IFX_LIBS=`echo $IFX_LIBS | sed -e 's/netapi32\.dll//g' -e 's/wsock32\.dll//g' -e 's/user32\.dll//g' -e 's/winmm\.dll//g'` #echo "IFX_LIBS=$IFX_LIBS" fi fi else dnl Allow override to use static and/or threaded libs IFX_LIBS="$IFX_LIBS" fi old_CFLAGS="$CFLAGS" old_LDFLAGS="$LDFLAGS" if test "`uname -s 2>/dev/null`" = "AIX"; then IFX_CFLAGS="-D__H_LOCALEDEF" fi CFLAGS="$CFLAGS $IFX_INCLUDE $IFX_CFLAGS" LDFLAGS="$LDFLAGS $IFX_LDFLAGS" AC_DEFINE(HAVE_IFX) AC_MSG_CHECKING([Informix version]) ESQLC_COMMAND="" for esqlc in esql $INFORMIXDIR/bin/esql do if esql_output=`$esqlc -V 2>/dev/null | sed -n 1p` && test -n "$esql_output" then esqlv=`echo "$esql_output" | sed -e 's/.*-ESQL Version *//' \ -e 's/\\.//' -e 's/\\..*//' ` if test "x$esqlv" = "x" then { { echo "$as_me:$LINENO: error: Version information from $esqlc -V not parsable -- $esql_output" >&5 echo "$as_me: error: Version information from $esqlc -V not parsable -- $esql_output" >&2;} { (exit 1); exit 1; }; } else echo "$as_me:$LINENO: result: $esqlc (version $esqlv)" >&5 echo "${ECHO_T}$esqlc (version $esqlv)" >&6 IFX_ESQLC_COMMAND=$esqlc IFX_ESQLC_VERSION=$esqlv IFX_ESQLC_VERTEXT="$esql_output" #AC_DEFINE(IFX_ESQLC_COMMAND, $IFX_ESQLC_COMMAND) #AC_DEFINE(IFX_ESQLC_VERSION, $IFX_ESQLC_VERSION) #AC_DEFINE(IFX_ESQLC_VERTEXT, $IFX_ESQLC_VERTEXT) break fi fi done if test $IFX_ESQLC_VERSION -ge "290"; then AC_DEFINE(HAVE_IFX_IUS) IFX_ESQL_FLAGS="-EDHAVE_IFX_IUS" else IFX_ESQL_FLAGS="-EUHAVE_IFX_IUS" fi #For 4glWorks: try to understand if the product is esql/c 5+ #aware, or is a special case, ie c4gl 4.x or is not esql/c #aware in any way, shape or form (ie an rds only shop) AC_DEFINE_UNQUOTED(IFX_VERSION, $IFX_VERSION) AC_MSG_RESULT($IFX_VERSION) #IFX_C_MAKE="(esql -e $IFX_ESQL_FLAGS functions/ifx.ec; mv ifx.c functions)" AC_MSG_CHECKING(if we can use esql) AC_MSG_RESULT(Yes) CFLAGS="$old_CFLAGS" LDFLAGS="$old_LDFLAGS" else AC_MSG_CHECKING(if we can use esql) AC_MSG_RESULT(esql not in path or no compatible C compiler) IFMX_ESQLC="no" fi fi else INFORMIXDIR= AC_MSG_RESULT(no) fi ],[ AC_MSG_RESULT(--with-informix not specified) ]) AC_ARG_WITH(informixc, [ --with-informixc=c-compiler Specify default INFORMIXC], [DEFINFORMIXC="$withval"]) if test "$DEFINFORMIXC" != ""; then INFORMIXC=$DEFINFORMIXC fi #on Windows, we MUST quote INFORMIXDIR #On UNIX, we MUST NOT quote it if test "$COMSPEC" != ""; then INFORMIXDIR_UNQUOTED="$INFORMIXDIR" INFORMIXDIR="'$INFORMIXDIR'" fi if test "$enable_stop_informix" = "yes" ; then exit fi ## ================================================================== ## Checks for PostgreSQL engine ## ================================================================== PHP_CONFIGURE_PART(Checking PostgresSQL engine:) AC_ARG_WITH(pgsqleng, [ --with-pgsqleng[=DIR] Check PostgresSQL engine. DIR is the PostgresSQL base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr for a in /usr /usr/local /usr/local/pgsql /usr/local/postgres do for b in $a/lib/pgsql $a/pgsql/lib $a/lib/postgresql do if test -d "$b" then withval=$a break fi done done if test "$PG_REG_BASEDIR_CYGPATH" != ""; then withval="$PG_REG_BASEDIR_CYGPATH" fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PGENGINE" WARN_LD_LIBRARY_PATH=1 #WARNING:new PG path must be first ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" fi #check PostgreSQL db engine version export PATH="$withval/bin:$PATH" if test "$enable_ac_debug" = "yes" ; then echo "PATH=$PATH" fi # Apparently postmaster has been depreciated - look for postgres instead... AC_PATH_PROG(POSTMASTER, postgres, no, $PATH) if test "$POSTMASTER" = "no"; then AC_PATH_PROG(POSTMASTER, postmaster, no, $PATH) fi if test "$POSTMASTER" != "no"; then AC_MSG_CHECKING(PG engine version) POSTMASTER_VER=`$POSTMASTER --version 2>&1 | head -n 1 | sed -e 's/postmaster (PostgreSQL) //'` #7.1.3 case "$POSTMASTER_VER" in *informix*) #7.4informix1.6 - Dave's patched code AC_MSG_RESULT($POSTMASTER_VER) PG_ENGINE_IFXCOMPAT=yes ;; *-IFX) #Andrej's RPM builds AC_MSG_RESULT($POSTMASTER_VER) PG_ENGINE_IFXCOMPAT=yes-old ;; 6.*.* | 7.1.* | 7.2.* | 7.3.*) AC_MSG_RESULT($POSTMASTER_VER) PG_ENGINE_IFXCOMPAT=no AC_MSG_WARN(** Locally installed PostgreSQL db engine is) AC_MSG_WARN(** NOT Informix compatible.) #don't reset PG_ESQLC_IFXCOMPAT because user might use #remote one ;; 7.*.*) #7.4.0 and up to 8 AC_MSG_RESULT($POSTMASTER_VER) PG_ENGINE_IFXCOMPAT=maybe ;; *.*.*) #8 and up AC_MSG_RESULT($POSTMASTER_VER) if test "$GCC_MINGW" = "yes"; then AC_MSG_WARN(V8 on Windows - probably not, but will allow it) PG_ENGINE_IFXCOMPAT=yes else PG_ENGINE_IFXCOMPAT=maybe fi ;; *) AC_MSG_WARN(Invalid version number format-$POSTMASTER_VER) PG_ENGINE_IFXCOMPAT=unknown ;; esac AC_MSG_CHECKING(PG engine IFX compatibility-informix_serial function) TMPooo=`nm -A --defined-only $POSTMASTER 2>&1` if test "$TMPooo" != ""; then case "$TMPooo" in *no*symbols) AC_MSG_RESULT(unknown) AC_MSG_WARN(** No symbols in PG executable) ;; *informix_serial*) AC_MSG_RESULT(yes) #Note: how compatible is it, thats the question PG_ENGINE_IFXCOMPAT=yes ;; *) AC_MSG_RESULT(unknown-no result from nm) ;; esac fi AC_MSG_CHECKING(PG engine IFX compatibility) AC_MSG_RESULT($PG_ENGINE_IFXCOMPAT) else AC_MSG_WARN(No locally installed postmaster detected) fi CFLAGS="$old_CFLAGS"; LDFLAGS="$old_LDFLAGS"; LIBS="$old_LIBS"; CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pgsqleng not specified) ]) if test "$enable_stop_pgsqleng" = "yes" ; then exit fi if test "$LIBS" != ""; then echo "WARNING: (2) LIBS contains $LIBS" fi ## ================================================================== ## Checks for PostgreSQL lib support ## ================================================================== PHP_CONFIGURE_PART(Checking for PostgresSQL library support:) AC_ARG_WITH(pgsql, [ --with-pgsql[=DIR] Include PostgresSQL support. DIR is the PostgresSQL base install directory, defaults to /usr.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then #/usr/include/postgresql withval=/usr for a in /usr/pgsql /usr/postgres /usr/postgresql /usr/local/pgsql /usr/local/postgres /usr/local/postgresql /usr /usr/local do for b in $a/include/pgsql $a/pgsql/include $a/include/postgresql $a/include/postgres $a/include do #echo "Looking $b/libpq-fe.h" if test -f "$b/libpq-fe.h" then #echo "Found $a ... $b" withval=$a pgsql_incldir=$b break fi done done if test "$PG_REG_BASEDIR_CYGPATH" != ""; then withval="$PG_REG_BASEDIR_CYGPATH" fi else #user specified custom withval if test "$enable_ac_debug" = "yes" ; then AC_MSG_WARN(Using custom path $withval) fi WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PGESQLC" WARN_LD_LIBRARY_PATH=1 #WARNING:new PG path must be first ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #Store witval for use in ecpg section PGSQL_WITHVAL=$withval if test "$pgsql_incldir" = ""; then #Find PG include dir under $withval test -d $withval/include && PGSQL_INCDIR=$withval/include if test "$PGSQL_INCDIR" = "" ; then AC_MSG_WARN(Non-standard include location) test -f $withval/include/pgsql/libpq-fe.h && PGSQL_INCDIR=$withval/include/pgsql test -f $withval/pgsql/include/libpq-fe.h && PGSQL_INCDIR=$withval/pgsql/include test -f $withval/include/postgresql/libpq-fe.h && PGSQL_INCDIR=$withval/include/postgresql #RH 7.2: /usr/include/pgsql/libpq-fe.h #test -d /usr/include/pgsql && PGSQL_INCDIR=/usr/include/pgsql fi else PGSQL_INCDIR=$pgsql_incldir fi if test "$PGSQL_INCDIR" = "" ; then AC_MSG_WARN(cannot determine include path) fi echo "pgsql_incldir=$pgsql_incldir" AC_MSG_RESULT( INCLUDE : $PGSQL_INCDIR) #Find PG lib dir under $withval test -d $withval/lib && PGSQL_LIBDIR=$withval/lib if test "$PGSQL_LIBDIR" = "" ; then AC_MSG_WARN(Non-standard lib location) test -d $withval/lib/pgsql && PGSQL_LIBDIR=$withval/lib/pgsql test -d $withval/pgsql/lib && PGSQL_LIBDIR=$withval/pgsql/lib test -d $withval/lib/postgresql && PGSQL_LIBDIR=$withval/lib/postgresql fi if test "$PGSQL_LIBDIR" = "" ; then AC_MSG_WARN(cannot determine library path) fi if test "$GCC_MINGW" = "yes"; then #MinGW GCC knows nothing about CygWin paths, need to convert back to #native Windows paths PGSQL_INCLUDE="-I`$CYGPATH -w $PGSQL_INCDIR`" PGSQL_LFLAGS="-L`$CYGPATH -w $PGSQL_LIBDIR`" #GCC has problems locating headers files when paths use backslash, #so we need to convert them too (proably CygWin trying to be 'smart') #PGSQL_INCLUDE=`echo $PGSQL_INCLUDE | tr '\\' '/'` #PGSQL_LFLAGS=`echo $PGSQL_LFLAGS | tr '\\' '/'` else PGSQL_INCLUDE="-I$PGSQL_INCDIR" PGSQL_LFLAGS="-L$PGSQL_LIBDIR" fi PGSQL_LIBS=-lpq #configure.fin:309: error: possibly undefined macro: AC_ADD_LIBRARY_WITH_PATH #configure.in:310: error: possibly undefined macro: AC_ADD_INCLUDE # AC_ADD_LIBRARY_WITH_PATH(pq, $PGSQL_LIBDIR) # AC_ADD_INCLUDE($PGSQL_INCDIR) if test "$enable_ac_debug" = "yes" ; then echo "PGSQL_INCLUDE=$PGSQL_INCLUDE" echo "PGSQL_LFLAGS=$PGSQL_LFLAGS" echo "PGSQL_LIBS=$PGSQL_LIBS" fi old_CFLAGS="$CFLAGS"; old_LDFLAGS="$LDFLAGS"; old_LIBS="$LIBS"; old_CPPFLAGS="$CPPFLAGS" #WARNING:new PG path must come first CFLAGS="$PGSQL_INCLUDE $CFLAGS" CPPFLAGS="$PGSQL_INCLUDE $CPPFLAGS" LDFLAGS="$PGSQL_LFLAGS $LDFLAGS" LIBS="$LIBS $PGSQL_LIBS" if test "$enable_ac_debug" = "yes" ; then echo "CFLAGS=$CFLAGS" echo "CPPFLAGS=$CPPFLAGS" echo "LDFLAGS=$LDFLAGS" echo "LIBS=$LIBS" fi if test "$GCC_MINGW" = "yes"; then #On Windows there is no LD_LIBRARY_PATH, and dll's are searched #for in PATH. #CygWin will do the conversion of PATH to native format automatically export PATH="$PGSQL_LIBDIR:$PATH" if test "$enable_ac_debug" = "yes" ; then echo "PATH set to:" echo "$PATH" fi fi # FIXME: Replace `main' with a function in `-lc': AC_CHECK_LIB([pq], [main]) if test "$ac_cv_lib_pq_main" = "yes"; then HAS_LIB_PQ=1 AC_CHECK_LIB([pq], [PQresultErrorField]) AC_CHECK_LIB([pq], [PQfreemem]) AC_CHECK_LIB([pq], [PQsetNoticeReceiver]) # Cant see this being used anywhere... #AC_CHECK_LIB([pq], [last_path_separator]) #AC_CHECK_FUNC(PQresultErrorField,AC_DEFINE(HAVE_PQresultErrorField)) #needed by native PG connector: HAVE_PG_ESQL_HEADERS_LIB=no AC_CHECK_HEADERS([ libpq-fe.h ]) if test "$ac_cv_header_libpq_fe_h" != "yes" ; then AC_CHECK_HEADERS([ pgsql/libpq-fe.h postgresql/libpq-fe.h ]) if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then AC_MSG_WARN(Non-standard location of libpq-fe.h (pgsql)) HAVE_PG_ESQL_HEADERS_LIB=yes PGSQL_INCLUDE="$PGSQL_INCLUDE -I$PGSQL_INCDIR/pgsql" fi if test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then AC_MSG_WARN(Non-standard location of libpq-fe.h (postgresql)) HAVE_PG_ESQL_HEADERS_LIB=yes PGSQL_INCLUDE="$PGSQL_INCLUDE -I$PGSQL_INCDIR/postgresql" fi else #Note: this is NOT same as HAVE_PG_ESQL_HEADERS test in ecpg section HAVE_PG_ESQL_HEADERS_LIB=yes fi fi AC_MSG_CHECKING(PG ESQL connector support) if test "$HAS_LIB_PQ" = "1" ; then if test "$AUBIT_SOURCE" = "1" ; then if test "$HAVE_PG_ESQL_HEADERS_LIB" = "yes"; then AC_DEFINE(HAVE_PGSQL) HAVE_PGSQL_LIB=yes AC_MSG_RESULT(Yes) AC_CHECK_FUNC(PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES)) else AC_MSG_RESULT(NO (missing headers)) fi else AC_DEFINE(HAVE_PGSQL) HAVE_PGSQL_LIB=yes AC_MSG_RESULT(Yes) AC_CHECK_FUNC(PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES)) fi else HAVE_PGSQL_LIB=no AC_MSG_RESULT(NO (missing library)) fi CFLAGS="$old_CFLAGS"; LDFLAGS="$old_LDFLAGS"; LIBS="$old_LIBS"; CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pgsql not specified) ]) if test "$enable_stop_pgsql" = "yes" ; then exit fi ## ================================================================== ## Checks for PostgreSQL ESQL/C pre-compiler ## ================================================================== PHP_CONFIGURE_PART(Checking for PostgresSQL ESQL pre-compiler:) AC_ARG_WITH(ecpg, [ --with-ecpg[=DIR] Include PostgresSQL ESQL/C pre-compiler support. DIR is the PostgresSQL ecpg base install directory, defaults to /usr.], [ if test "$HAS_LIB_PQ" != "1"; then withval="no" AC_MSG_WARN(Disabled testing for PG ESQL compiler - libpg was not detected) fi if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr for a in /usr /usr/local /usr/local/pgsql /usr/local/postgres do for b in $a/bin do if test -x "$b/ecpg" then withval=$a break fi done done if test "$PG_REG_BASEDIR_CYGPATH" != ""; then withval="$PG_REG_BASEDIR_CYGPATH" fi else if test "$enable_ac_debug" = "yes" ; then AC_MSG_WARN(Using custom path $withval) fi fi export PATH="$withval/bin:$PATH" AC_PATH_PROG(PG_ESQLC, ecpg, no, $withval/bin:$PATH) if test "$COMSPEC" != "" -a "$PG_ESQLC" != "no"; then #Convert back to native Windows path PG_ESQLC="`$CYGPATH --mixed $PG_ESQLC`" echo "Converted back to native path: $PG_ESQLC" fi if test "$PG_ESQLC" != "no"; then AC_MSG_CHECKING(PG ESQL Informix compatibility) #First, with -v PG_ESQLC_VERSION=`$PG_ESQLC -v 2>&1 | head -n 1 | sed -e 's/ecpg - the postgresql preprocessor, version: //' | sed -e 's/ecpg, the PostgreSQL embedded C preprocessor, version //'` #Fri Jul 18 16:31:10 CEST 2003 # - Set ecpg version to 3.0.0 # - Set ecpg library to 4.0.0 # - Set pgtypes library to 1.0.0 # - Set compat library to 1.0.0 if test "$PG_ESQLC_VERSION" != ""; then case "$PG_ESQLC_VERSION" in 2.* | 1.*) AC_MSG_RESULT(No-$PG_ESQLC_VERSION) PG_ESQLC_IFXCOMPAT=no ;; 3.*.*) #3.0.0 and up AC_MSG_RESULT(Maybe-$PG_ESQLC_VERSION) PG_ESQLC_IFXCOMPAT=maybe PG_ESQLC_V3=1 ;; 4.*.*) #4.0.0 and up AC_MSG_RESULT(Maybe-$PG_ESQLC_VERSION) PG_ESQLC_IFXCOMPAT=maybe PG_ESQLC_V3=1 ;; *) AC_MSG_RESULT(No-Invalid version number format-$PG_ESQLC_VERSION) PG_ESQLC_IFXCOMPAT=no ;; esac else AC_MSG_RESULT(No-Cannot read version number) PG_ESQLC_IFXCOMPAT=no fi AC_MSG_CHECKING(PG ESQL Informix compatibility) #Now with --version #ecpg (PostgreSQL 7.4informix1.6) 3.0.0 if test "$enable_ac_debug" = "yes" ; then $PG_ESQLC --version 2>&1 | sed -e 's/ecpg (PostgreSQL //' | sed -e 's/)//' fi PG_ESQLC_VERSION2=`$PG_ESQLC --version 2>&1 | head -n 1 | sed -e 's/ecpg (PostgreSQL //' | sed -e 's/)//' | awk '{print $1}'` if test "$PG_ESQLC_VERSION2" != ""; then case "$PG_ESQLC_VERSION2" in *informix*) AC_MSG_RESULT(Yes-$PG_ESQLC_VERSION $PG_ESQLC_VERSION2) PG_ESQLC_IFXCOMPAT=yes ;; *) if test "$PG_ESQLC_V3" != "1"; then AC_MSG_RESULT(No-'informix' identifier not found-$PG_ESQLC_VERSION $PG_ESQLC_VERSION2) PG_ESQLC_IFXCOMPAT=no case $PG_ESQLC_VERSION2 in 8.*) PG_ESQLC_IFXCOMPAT=yes PG_ESQLC_HASV3=1 AC_MSG_RESULT(allow it anyway - set HASV3) ;; *) PG_ESQLC_IFXCOMPAT=no AC_MSG_RESULT(not allowed) ;; esac else AC_MSG_RESULT(No-'informix' identifier not found-$PG_ESQLC_VERSION $PG_ESQLC_VERSION2) AC_MSG_RESULT(recent ECPG so will allow it anyway) PG_ESQLC_IFXCOMPAT=yes fi ;; esac else AC_MSG_RESULT(No-Cannot read version number) PG_ESQLC_IFXCOMPAT=no fi #Check paths if test -d "$withval/include"; then ECPG_INCDIR="$withval/include" if test "$GCC_MINGW" = "yes"; then ECPG_IFLAGS="-I`$CYGPATH -w $ECPG_INCDIR`" #ECPG_IFLAGS=`echo $ECPG_IFLAGS | tr '\\' '/'` else ECPG_IFLAGS="-I$ECPG_INCDIR" fi else AC_MSG_WARN(cannot determine include path under $withval) fi if test -d "$withval/lib" ; then ECPG_LIBDIR="$withval/lib" else AC_MSG_WARN(cannot determine library path under $withval) fi if test -f "$ECPG_INCDIR/postgresql/informix/esql/ecpg_informix.h"; then ECPG_IFLAGS="$ECPG_IFLAGS -I$ECPG_INCDIR/postgresql/informix/esql" if test "$enable_ac_debug" = "yes" ; then echo "Found ecpg_informix.h in $ECPG_INCDIR/postgresql/informix/esql" fi elif test -f "$ECPG_INCDIR/pgsql/informix/esql/ecpg_informix.h"; then ECPG_IFLAGS="$ECPG_IFLAGS -I$ECPG_INCDIR/pgsql/informix/esql" if test "$enable_ac_debug" = "yes" ; then echo "Found ecpg_informix.h in $ECPG_INCDIR/pgsql/informix/esql" fi elif test -f "$ECPG_INCDIR/ecpg_informix.h"; then #In Dave's patched tarball they are now in incl/ #/usr2/pg-ifx/install/include/ecpg_informix.h if test "$enable_ac_debug" = "yes" ; then echo "Found ecpg_informix.h in $ECPG_INCDIR" fi elif test -f "$ECPG_INCDIR/pgsql/ecpg_informix.h"; then #SuSE RPMs if test "$enable_ac_debug" = "yes" ; then echo "Found ecpg_informix.h in $ECPG_INCDIR/pgsql" fi elif test -f "$ECPG_INCDIR/postgresql/ecpg_informix.h"; then #reported on mailing list - Debian's standard PostgresSQL if test "$enable_ac_debug" = "yes" ; then echo "Found ecpg_informix.h in $ECPG_INCDIR/postgresql" fi else AC_MSG_WARN(** cannot find Informix compatibility header (ecpg_informix.h) at ) AC_MSG_WARN(** $ECPG_INCDIR/postgresql/informix/esql) AC_MSG_WARN(** ...or...) AC_MSG_WARN(** $ECPG_INCDIR/pgsql/informix/esql) AC_MSG_WARN(** ...or...) AC_MSG_WARN(** $ECPG_INCDIR) AC_MSG_WARN(** ...or...) AC_MSG_WARN(** $ECPG_INCDIR/pgsql) AC_MSG_WARN(** ...or...) AC_MSG_WARN(** $ECPG_INCDIR/postgresql) fi #In case we are working from not installed CVS code: #ECPG_LFLAGS="-L$withval/compatlib -L$withval/ecpglib -L$withval/pgtypeslib" #we at least need to know if we have headers #for compiling things like SQL_c_ecpg that do not need IFX compatibility #Make sure we have libpq - if test "$PGSQL_WITHVAL" = ""; then AC_MSG_ERROR(libpq detection was disabled. Please add --with-pgsql and try again) fi #Finally, the one in CVS code installed by our install.xxx target: #/opt/aubit/aubit4glsrc/pgsql-server/src/interfaces/libpq/libpq-fe.h #NOTE: can't use this one, all other PG headers we need are not there... #test -d $withval/../libpq && PGSQL_INCDIR=$withval/../libpq if test "$enable_ac_debug" = "yes" ; then AC_MSG_RESULT(----BEFORE----) AC_MSG_RESULT(CFLAGS=$CFLAGS) AC_MSG_RESULT(CPPFLAGS=$CPPFLAGS) AC_MSG_RESULT(LDFLAGS=$LDFLAGS) AC_MSG_RESULT(LIBS=$LIBS) AC_MSG_RESULT(ECPG_IFLAGS=$ECPG_IFLAGS) AC_MSG_RESULT(PGSQL_INCDIR=$PGSQL_INCDIR) fi old_CFLAGS="$CFLAGS"; old_LDFLAGS="$LDFLAGS"; old_LIBS="$LIBS"; old_CPPFLAGS="$CPPFLAGS" #WARNING: PG paths need to be at beginig if test "$GCC_MINGW" = "yes"; then PGSQL_IFLAGS="-I`$CYGPATH -w $PGSQL_INCDIR`" ECPG_LFLAGS="-L`$CYGPATH -w $ECPG_LIBDIR`" #PGSQL_IFLAGS=`echo $PGSQL_IFLAGS | tr '\\' '/'` #ECPG_LFLAGS=`echo $ECPG_LFLAGS | tr '\\' '/'` else PGSQL_IFLAGS="-I$PGSQL_INCDIR" ECPG_LFLAGS="-L$ECPG_LIBDIR" fi CFLAGS="$PGSQL_IFLAGS $ECPG_IFLAGS $CFLAGS" CPPFLAGS="$PGSQL_IFLAGS $ECPG_IFLAGS $CPPFLAGS" #LDFLAGS="$PGSQL_LFLAGS $LDFLAGS" LDFLAGS="$ECPG_LFLAGS $LDFLAGS" LIBS="$LIBS $PGSQL_LIBS"; export CFLAGS LDFLAGS LIBS CPPFLAGS if test "$enable_ac_debug" = "yes" ; then AC_MSG_RESULT(----AFTER----) AC_MSG_RESULT(CFLAGS=$CFLAGS) AC_MSG_RESULT(CPPFLAGS=$CPPFLAGS) AC_MSG_RESULT(LDFLAGS=$LDFLAGS) AC_MSG_RESULT(LIBS=$LIBS) AC_MSG_RESULT(ECPG_IFLAGS=$ECPG_IFLAGS) AC_MSG_RESULT(PGSQL_INCDIR=$PGSQL_INCDIR) fi #reset: unset ac_cv_header_libpq_fe_h unset ac_cv_header_pgsql_libpq_fe_h unset ac_cv_header_postgresql_libpq_fe_h #libpq-fe.h hader is NOT part of ecpg, its part of libpq AC_CHECK_HEADERS([ libpq-fe.h ]) #Note: this is NOT same as HAVE_PG_ESQL_HEADERS test in ecpg section HAVE_PG_ESQL_HEADERS_LIB=no if test "$ac_cv_header_libpq_fe_h" != "yes" ; then AC_CHECK_HEADERS([ pgsql/libpq-fe.h postgresql/libpq-fe.h ]) if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes" ; then AC_MSG_WARN(Non-standard location of libpq-fe.h (pgsql)) HAVE_PG_ESQL_HEADERS_LIB=yes PG_ESQL_HEADERS_LIB_SUFIX="pgsql" fi if test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then AC_MSG_WARN(Non-standard location of libpq-fe.h (postgresql)) HAVE_PG_ESQL_HEADERS_LIB=yes PG_ESQL_HEADERS_LIB_SUFIX="postgresql" fi else HAVE_PG_ESQL_HEADERS_LIB=yes PG_ESQL_HEADERS_LIB_SUFIX="" fi #Add suffix needed for libpq-fe.h included from ecpglib.h LIBPQ_FE_H_IFLAGS="-I$PGSQL_INCDIR/$PG_ESQL_HEADERS_LIB_SUFIX" #Why was this here? #/usr/include/pgsql/ecpgtype.h #LIBPQ_FE_H_IFLAGS="$LIBPQ_FE_H_IFLAGS -I/usr/include/$PG_ESQL_HEADERS_LIB_SUFIX" CPPFLAGS="$LIBPQ_FE_H_IFLAGS $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then AC_MSG_RESULT(added LIBPQ_FE_H_IFLAGS=$LIBPQ_FE_H_IFLAGS to CPPFLAGS:) AC_MSG_RESULT(CPPFLAGS=$CPPFLAGS) fi #headers needed to make libSQL_c_ecpg.so (esql_simple_ecpg.c): #When testing for ecpglib.h, we allready need to know where is #libpq-fe.h because ecpglib.h includes it - WITHOUT A PATH! AC_CHECK_HEADERS([ ecpgtype.h ecpglib.h ecpgerrno.h sqlca.h sql3types.h ]) #AC_CHECK_HEADERS([ pgsql/ecpgtype.h pgsql/ecpglib.h pgsql/ecpgerrno.h pgsql/sqlca.h pgsql/sql3types.h ]) unset ac_cv_header_pgsql_informix_esql_decimal_h unset ac_cv_header_postgresql_informix_esql_decimal_h HAVE_PG_ESQL_DECIMAL_H=no if test -f $PGSQL_INCDIR/informix/esql/decimal.h then HAVE_PG_ESQL_DECIMAL_H=yes HAVE_PG_INFORMIX_ESQL_DECIMAL_H=yes AC_DEFINE(HAVE_PG_INFORMIX_ESQL_DECIMAL_H,1,[ ]) fi if test -f $PGSQL_INCDIR/pgsql/informix/esql/decimal.h then HAVE_PG_ESQL_DECIMAL_H=yes HAVE_PGSQL_INFORMIX_ESQL_DECIMAL_H=yes AC_DEFINE(HAVE_PGSQL_INFORMIX_ESQL_DECIMAL_H,1,[ ]) fi if test -f $PGSQL_INCDIR/postgresql/informix/esql/decimal.h then HAVE_PG_ESQL_DECIMAL_H=yes HAVE_POSTGRESQL_INFORMIX_ESQL_DECIMAL_H=yes AC_DEFINE(HAVE_POSTGRESQL_INFORMIX_ESQL_DECIMAL_H,1,[ ]) fi old_xCFLAGS="$CFLAGS" if test "$HAVE_PG_ESQL_DECIMAL_H" = "no" then AC_MSG_CHECKING(Double checking for PG Decimal.h in $PGSQL_INCDIR) unset ac_cv_header_informix_esql_decimal_h CFLAGS="$CFLAGS -I$PGSQL_INCDIR" AC_CHECK_HEADERS([ informix/esql/decimal.h ]) if test "$ac_cv_header_informix_esql_decimal_h" = "yes" ; then AC_MSG_RESULT(Found PGSQL decimal.h in informix/esql/decimal.h) HAVE_PG_ESQL_DECIMAL_H=yes HAVE_PG_INFORMIX_ESQL_DECIMAL_H=yes AC_DEFINE(HAVE_PG_INFORMIX_ESQL_DECIMAL_H,1,[ ]) fi fi CFLAGS="$old_xCFLAGS" if test "$HAVE_PG_ESQL_DECIMAL_H" != "yes"; then unset ac_cv_header_decimal_h AC_CHECK_HEADERS([ decimal.h ]) if test "$ac_cv_header_decimal_h" = "yes" ; then HAVE_PG_ESQL_DECIMAL_H=yes if test -f "$withval/include/decimal.h" ; then #Should be OK as long as -I$withval/include is in front #of all others AC_MSG_WARN(decimal.h found in $withval/include) else AC_MSG_WARN(decimal.h found - but not sure where) fi fi fi if test "$PG_ESQLC_V3" = "1"; then #On Windows (ecpg 3.2.0) there is no decimal.h - seems to be in ecpg_informix.h now HAVE_PG_ESQL_DECIMAL_H=yes if test "$enable_ac_debug" = "yes" ; then echo "On Windows - ignoring missing decimal.h - using ecpg_informix.h instead" fi fi if test "$ac_cv_header_ecpgtype_h" = "yes" \ -a "$ac_cv_header_ecpglib_h" = "yes" \ -a "$ac_cv_header_ecpgerrno_h" = "yes" \ -a "$ac_cv_header_sqlca_h" = "yes" \ -a "$ac_cv_header_sql3types_h" = "yes" \ -a "$HAVE_PG_ESQL_HEADERS_LIB" = "yes"; then HAVE_PG_ESQL_HEADERS=yes if test "$HAVE_PG_ESQL_DECIMAL_H" != "yes"; then AC_MSG_WARN(** Cannot find ECPG Informix compatibility headers) AC_MSG_WARN(** (decimal.h) - this ECPG is NOT Informix compatible.) AC_MSG_WARN(** A4GL_LEX=EC with A4GL_LEXDIALECT=POSTGRES) AC_MSG_WARN(** will not work correctly and should NOT be used.) PG_ESQLC_IFXCOMPAT=no #TODO: disable PG ESQLC Aubit mode, since it wont work #Do not disable ecpg, sice it can still be used to compile #libSQL_pg else PG_ESQLC_IFXCOMPAT=yes #Note: this is relative - all we did is test ecpg version and #presence of headers. Since PG Informix compatibility depends #on patches independent of official PG CVS, it is possible we #have ecpg that does have high enough version, and does have #Informix compatibility headers, and accepts -C INFORMIX flag, #but is not patched. Even if ecpg is 100% OK and Informix compatible, #we still need Informix patched and compatible PG engine, on the same #patch level with that ecpg, or things won't work again. #Presently, we have no way to verify any of this, other then to #run all suite of Aubit regression tests against it. Version numbers #for both ecpg and postmaster at the moment mean very little, as #most of the Informix compatibility functionality depends on #independent pathces. Please see this links for more information: # http://gborg.postgresql.org/project/pginformix/projdisplay.php # Downloads: http://informix.postgresintl.com/ # http://informix.fastcrypt.com/ #Contact: Dave Cramer [dave@fastcrypt.com] #Michael Meskes [Michael.Meskes@credativ.de] #Mike Aubury [mike.aubury@aubit.com] fi else HAVE_PG_ESQL_HEADERS=no fi if test "$HAVE_PG_ESQL_HEADERS" = "yes" ; then ECPG_IFLAGS="$ECPG_IFLAGS -I$PGSQL_INCDIR" #FIXME: how do we check for libraries versions? #also check versions of: AC_CHECK_LIB([ecpg], [main]) #apparently pgtypes and ecpg_compat are present only #in version 3.x and up. They are specified in bin/ecpg_wrap 4glc(compile.c) #lib/extra_lib/esqlc/make_static lib/libesql/Makefile #lib/libsql/esqlc/Makefile #So it looks like that eanything in Aubit that uses ecpg needs #both of them - CHECK THIS AC_CHECK_LIB([ecpg], [ECPGget_PGconn]) AC_CHECK_LIB([ecpg], [ecpg_get_connection]) AC_CHECK_LIB([ecpg], [ECPGget_connection]) AC_CHECK_LIB([pgtypes], [main]) AC_CHECK_LIB([ecpg_compat], [main]) AC_MSG_CHECKING(PG ESQL librarys compatibility) if test "$ac_cv_lib_ecpg_main" = "yes" \ -a "$ac_cv_lib_pgtypes_main" = "yes" \ -a "$ac_cv_lib_ecpg_compat_main" = "yes"; then AC_MSG_RESULT(OK) #POSTGRESDIR is really a ecpg installation dir, but... if test "$GCC_MINGW" = "yes"; then POSTGRESDIR="`$CYGPATH -w $withval`" else POSTGRESDIR=$withval fi if test "$ac_cv_lib_ecpg_ECPGget_PGconn" = "yes" then AC_MSG_WARN(ecpg has ECPGGET_PGCONN) ECPG_HAVE_ECPGGET_PGCONN=1 AC_DEFINE(HAVE_ECPGGET_PGCONN) fi if test "$ac_cv_lib_ecpg_ecpg_get_connection" = "yes" then AC_MSG_WARN(ecpg has ecpg_get_connection) ECPG_HAVE_ECPG_GET_CONNECTION=1 AC_DEFINE(HAVE_ECPG_GET_CONNECTION) fi if test "$ac_cv_lib_ecpg_ECPGget_connection" = "yes" then AC_MSG_WARN(ecpg has ecpgget_connection) ECPG_HAVE_ECPGGET_CONNECTION=1 AC_DEFINE(HAVE_ECPGGET_CONNECTION) fi else PG_ESQLC_IFXCOMPAT=no PG_ESQLC=no AC_MSG_WARN(Disabled ecpg - no libs) fi else PG_ESQLC_IFXCOMPAT=no PG_ESQLC=no AC_MSG_WARN(Disabled ecpg - no headers) fi CFLAGS="$old_CFLAGS"; LDFLAGS="$old_LDFLAGS"; LIBS="$old_LIBS"; CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(No - ecpg not found) fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-ecpg not specified) ]) if test "$enable_stop_ecpg" = "yes" ; then exit fi ## ================================================================== ## Check all PostgreSQL components for Aubit/Informix compatibility ## ================================================================== AC_MSG_CHECKING(Check for postgres - 1-$POSTMASTER 2-$PGSQL_LIBS 3-$HAS_LIB_PQ 4-$HAVE_PGSQL_LIB 5-$PG_ESQLC ) if test "$POSTMASTER" != "" -a "$PGSQL_LIBS" != "" -a "$HAS_LIB_PQ" != "0" \ -a "$HAVE_PGSQL_LIB" != "no" -a "$PG_ESQLC" != "no"; then PHP_CONFIGURE_PART(Checking PostgresSQL Aubit/Informix compatibility:) AC_ARG_WITH(pgcompat, [ --with-pgcompat Check PostgresSQL compatibility with Aubit], [ if test "$withval" != "no"; then PG_AUBIT_COMPAT=1 if test "$PG_ENGINE_IFXCOMPAT" = "no" -a "$POSTMASTER" != "no"; then AC_MSG_WARN(Local engine NOT compatible - wont allow pgsql) PG_AUBIT_COMPAT=0 fi if test "$PG_ESQLC_IFXCOMPAT" != "yes"; then AC_MSG_WARN(ecpg NOT compatible - wont allow pgsql) PG_AUBIT_COMPAT=0 fi #TODO: how do we check libpq? #Dave say: libpq doesn't matter, it's just the protocol. AC_MSG_CHECKING(if we can use Aubit in EC mode with PostgreSQL) if test "$PG_AUBIT_COMPAT" = "0"; then AC_MSG_RESULT(no) WARN_PGCOMPAT=1 #disable everything PG_ENGINE_IFXCOMPAT="no" PG_ESQLC_IFXCOMPAT="no" POSTMASTER="" PG_ENGINE_IFXCOMPAT="no" PGSQL_WITHVAL="" PGSQL_INCDIR="" PGSQL_LIBDIR="" PGSQL_INCLUDE="" PGSQL_LFLAGS="" PGSQL_LIBS="" HAS_LIB_PQ=0 HAVE_PG_ESQL_HEADERS_LIB="no" HAVE_PGSQL_LIB="no" PG_ESQLC="no" PG_ESQLC_VERSION="" PG_ESQLC_VERSION2="" ECPG_INCDIR="" ECPG_IFLAGS="" ECPG_LIBDIR="" HAVE_PG_ESQL_HEADERS_LIB="no" PG_ESQL_HEADERS_LIB_SUFIX="" LIBPQ_FE_H_IFLAGS="" HAVE_PG_ESQL_DECIMAL_H="no" HAVE_PG_ESQL_HEADERS_LIB="no" HAVE_PG_ESQL_HEADERS="no" ECPG_IFLAGS="" POSTGRESDIR="" PG_ESQLC="no" else AC_MSG_RESULT(yes) fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pgcompat not specified) ]) else AC_MSG_RESULT(wont allow pgsql) PG_AUBIT_COMPAT=0 fi if test "$enable_stop_pgcompat" = "yes" ; then exit fi ## ================================================================== ## Checks for SQLite support ## ================================================================== #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" old_PATH="$PATH" PHP_CONFIGURE_PART(Checking for SQLite library support:) AC_ARG_WITH(sqlite, [ --with-sqlite[=DIR] Include SQLite support. DIR is the SQLite base install directory, defaults to /usr.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$GCC_MINGW" = "yes"; then #Note that on CygWin /usr/lib is a symlink to /lib #but when we convert paths to native Windows paths, #/usr/lib DOES NOT EXIST - because native Windows #executables know nothing about CygWin symlinking!!!! if test "$COMSPEC" != "" -a "$MSYS_ROOTDIR" != ""; then withval="$MSYS_ROOTDIR/local" else withval=/usr/local fi else withval="/usr" fi else echo "Using $withval" fi PATH="$withval:$withval/bin:$old_PATH" #readline library is needed to link SQLite AC_CHECK_LIB([readline], [main]) AC_PATH_PROG(SQLITE, sqlite3, no) if test "$SQLITE" = "no"; then AC_PATH_PROG(OLD_SQLITE, sqlite, no) if test "$OLD_SQLITE" != "no"; then SQLITE="$OLD_SQLITE" SQLITE_LIBNAME="sqlite" fi else SQLITE_VER=3 SQLITE_LIBNAME="sqlite3" fi if test "$SQLITE" != "no" -a "$COMSPEC" = ""; then #we found executable, set withval to the place #you found sqlite executable in TMPhhh=`dirname $SQLITE` #to remove bin/ withval=`dirname $TMPhhh` fi if test "$GCC_MINGW" = "yes"; then #WARNING: paths for MinGW GCC MUST use forward slash - NOT backslash!!! SQLITE_ROOT=`$CYGPATH -m "$withval"` else SQLITE_ROOT="$withval" fi AC_MSG_CHECKING(SQLite base install directory) AC_MSG_RESULT($SQLITE_ROOT) SQLITE_LDPATH="$SQLITE_ROOT/lib" SQLITE_LDPATH2="$SQLITE_ROOT" LDFLAGS="-L$SQLITE_LDPATH -L$SQLITE_LDPATH2 $LDFLAGS" CFLAGS="-I$SQLITE_ROOT/include -I$SQLITE_ROOT $CFLAGS" CPPFLAGS="-I$SQLITE_ROOT/include -I$SQLITE_ROOT $CPPFLAGS" if test "$SQLITE_VER" = "3"; then # FIXME: Replace `main' with a function in `-lc': #WARNING- cant use variable as library name here - test will #work ok, but resulting variable we need ($ac_cv_lib_sqlite_main) #will end up empty AC_CHECK_LIB([sqlite3], [main]) else # FIXME: Replace `main' with a function in `-lc': AC_CHECK_LIB([sqlite], [main]) fi #I don't think we need sqlite.h - we are using private copy of #it as sqlite-local.h in lib/libsql/odbc #as well as private copy of sqliteodbc.h and sqliteodbc.c if test "$SQLITE_VER" = "3"; then AC_CHECK_HEADERS([ sqlite3.h ]) else AC_CHECK_HEADERS([ sqlite.h ]) fi AC_MSG_CHECKING(if we can use SQLite) if test "$ac_cv_lib_sqlite_main" = "yes" -o "$ac_cv_lib_sqlite3_main" = "yes"; then SQLITE_LIB=1 AC_MSG_RESULT(yes) # test for availability of sqlite_libversion() if test "$SQLITE_VER" = "3"; then AC_CHECK_LIB(sqlite3,sqlite3_libversion,SQLITE_LIBVERSION=1,SQLITE_LIBVERSION=0) AC_CHECK_LIB(sqlite3,sqlite_version,SQLITE_VERSION=1,SQLITE_VERSION=0) else AC_CHECK_LIB(sqlite,sqlite_libversion,SQLITE_LIBVERSION=1,SQLITE_LIBVERSION=0) AC_CHECK_LIB(sqlite,sqlite_version,SQLITE_VERSION=1,SQLITE_VERSION=0) fi AC_SUBST(SQLITE_LIBVERSION) AC_MSG_CHECKING(for default SQLite database) SQLITE_DB=tools/aubit.db if test -f "$SQLITE_DB" ; then AC_MSG_RESULT(Allready present in $SQLITE_DB) else #create a default database $SQLITE $SQLITE_DB "create table testing (test integer)" $SQLITE $SQLITE_DB "insert into testing values (987)" #$SQLITE $SQLITE_DB "select * from testing" AC_MSG_RESULT(Created $SQLITE_DB) fi if test "$COMSPEC" != "" -a "$COLLECT_THIRD_PARTY" = "1"; then #a=`$CYGPATH -u "$WINDIR"` #b=`$CYGPATH -u "$CYGWIN_PATH_WIN"` #b="/lib" a="$withval" b="$withval" if test "$SQLITE_VER" = "3"; then THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ SQLITE#$a/sqlite3.exe \ SQLITE#$b/libsqlite3.dll \ SQLITE#$b/sqlite3.dll \ SQLITE#$b/sqlite3.dll!libsqlite3.dll \ SQLITE#$b/libsqlite3.dll!sqlite3.dll" else THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ SQLITE#$a/sqlite.exe \ SQLITE#$b/lib/libsqlite.def \ SQLITE#$b/lib/libsqlite.dll \ SQLITE#$b/lib/libsqlite.dll!sqlite.dll" fi fi else AC_MSG_RESULT(no-missing library) fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-sqlite not specified) ]) #Restore Stored values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" PATH="$old_PATH" if test "$enable_stop_sqlite" = "yes" ; then exit fi ## ================================================================== ## Checks for SQLite ODBC support ## ================================================================== #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" #NOTE: sqlite ODBC driver needs iODBC or unixODB driver manager. #-lsqliteodbc will be linked with -liodbcinst or -lodbcinst PHP_CONFIGURE_PART(Checking for SQLite ODBC library support:) AC_ARG_WITH(sqliteodbc, [ --with-sqliteodbc[=DIR] Include SQLite ODBC support. DIR is the SQLite odbc base install directory, defaults to /usr/local/lib.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local/lib fi #/usr/local/lib/libsqlite3odbc-0.70.so #libsqlite3odbc.so #/usr/local/lib/libsqlite3odbc.la #/usr/local/lib/libsqlite3odbc.a #PATH="$PATH:/sbin" ldconfig -n /usr/local/lib LDFLAGS="-L$withval $LDFLAGS" #LIBS="-liodbc -liodbcadm $LIBS" LIBS="-liodbcadm $LIBS" AC_CHECK_LIB([sqliteodbc], [main]) if test "$ac_cv_lib_sqliteodbc_main" = "yes" ; then #AC_MSG_RESULT(Yes) SQLITE_ODBC=1 SQLITE_ODBC_VER=2 else #maybe it was linked with unixODBC? #FIXME: do I need to add any libs here? LIBS="$old_LIBS" AC_CHECK_LIB([sqliteodbc], [main]) if test "$ac_cv_lib_sqliteodbc_main" = "yes" ; then #AC_MSG_RESULT(Yes) SQLITE_ODBC=1 SQLITE_ODBC_VER=2 fi fi AC_CHECK_LIB([sqlite3odbc], [main]) if test "$ac_cv_lib_sqlite3odbc_main" = "yes" ; then #AC_MSG_RESULT(Yes) SQLITE_ODBC=1 SQLITE_ODBC_VER=3 SQLITE_ODBC_LIBNAME_SHARED=sqlite3odbc SQLITE_ODBC_LIBNAME_STATIC=sqlite3odbc else #maybe it was linked with unixODBC? #FIXME: do I need to add any libs here? LIBS="$old_LIBS" AC_CHECK_LIB([sqlite3odbc], [main]) if test "$ac_cv_lib_sqlite3odbc_main" = "yes" ; then #AC_MSG_RESULT(Yes) SQLITE_ODBC=1 SQLITE_ODBC_VER=3 SQLITE_ODBC_LIBNAME_SHARED=sqlite3odbc SQLITE_ODBC_LIBNAME_STATIC=sqlite3odbc fi fi if test "$SQLITE_ODBC" = "1"; then SQLITE_ODBC_LIBDIR=$withval AC_MSG_CHECKING(for default SQLite odbc.ini entry) ODBC_INI="/etc/odbc.ini" if test -w $ODBC_INI; then TMP123=`grep mysqlitedb $ODBC_INI` else ODBC_INI="~/.odbc.ini" if test -w $ODBC_INI; then TMP123=`grep mysqlitedb $ODBC_INI` else ODBC_INI=no TMP123=no fi fi if test "$TMP123" = ""; then #To setup a SQLite data source using unixODBC (www.unixodbc.org): # 1. Add the driver to /etc/odbcinst.ini: #[SQLite] #Description=SQLite ODBC Driver #Driver=/usr/local/lib/libsqliteodbc.so #Setup= #[ODBC Drivers] #SQLite=Installed # 2. Add a DSN to your private ~/.odbc.ini: echo " " >> $ODBC_INI #Workaround for Autoconf stripping [] - echo "[mysqlitedb]" >> $ODBC_INI echo '\133mysqlitedb\135' > tmp.tmp xx=`cat tmp.tmp` echo -e "$xx" >> $ODBC_INI echo "Description=Aubit created SQLite test database" >> $ODBC_INI #unixODBC only: #echo "Driver=SQLite" >> $ODBC_INI #iODBC, but works for unixODBC too: if test "$SQLITE_ODBC_VER" = "2"; then echo "Driver=$withval/libsqliteodbc.so" >> $ODBC_INI else echo "Driver=$withval/libsqlite3odbc.so" >> $ODBC_INI fi echo "Database=$aubitdir/$SQLITE_DB" >> $ODBC_INI echo "# optional lock timeout in milliseconds" >> $ODBC_INI echo "Timeout=2000" >> $ODBC_INI echo "# optional turn threading support on" >> $ODBC_INI echo "Threaded=1" >> $ODBC_INI echo " " >> $ODBC_INI #For iODBC (www.iodbc.org, only versions 3.0.[56] tested) # 2. Add a DSN to your private ~/.odbc.ini: # [ODBC Data Sources] # mysqlitedb=SQLite AC_MSG_RESULT(Added) else if test "$ODBC_INI" = "no" ; then AC_MSG_RESULT(/etc/odbc.ini or ~/.odbc.ini not found or not writable) else AC_MSG_RESULT(allready present) fi fi fi else AC_MSG_RESULT(Disabled) fi ],[ AC_MSG_RESULT(--with-sqliteodbc not specified) ]) #Restore Stored values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" if test "$enable_stop_sqliteodbc" = "yes" ; then exit fi ## ================================================================== ## Checks for Informix ODBC driver ## ================================================================== PHP_CONFIGURE_PART(Checking for Informix ODBC driver:) AC_ARG_WITH(ifxodbc, [ --with-ifxodbc[=DIR] Include Informix ODBC support. DIR is the Informix base install directory, defaults to $INFOMIXDIR.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=$INFORMIXDIR fi if test "$cygwin" = "1"; then #No point in making directly linked ODBC plug-ins on Windows - use odbc32 echo "Skipped - Windows" #FIXME: this is not working, probably because it is a DLL and #name does not start with "libxxxxx", or because there are no .a or .def files #available, and linking cannot be done without them with a .dll file on Windows #Anyway, directly linked ODBC Aubit plig-ins are only usefull when there is no #ODBC manager present on machine, and all Windows installation have it, so just use #Informix ODBC via MS manager plug-in (odbc32)... #IVIF7912.DLL INTERSOLV Informix ODBC driver - WIN #this should be in WINDOWSDIR/system32 - but its DLL !!!! #AC_CHECK_LIB([ivif7912], [main]) #only two dll's in csdk280_tc1 - none have lib prefix #AC_CHECK_LIB([clidll], [main]) #AC_CHECK_LIB([iclit09b], [main]) else #Shared drivers for use with ODBC managers (?) #[INFORMIX 2.8 32-BIT] #Driver=/extra/informix/lib/cli/iclis09a.so #AC_CHECK_LIB([iclis09a], [main]) # FIXME: Replace `main' with a function in `-lxxxx': #[INFORMIX 3.3 32-BIT] #Driver=/extra/informix/lib/cli/iclis09b.so #AC_CHECK_LIB([iclis09b], [main]) old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L$INFORMIXDIR/lib/cli -L$INFORMIXDIR/lib/esql -Xlinker -rpath -Xlinker $INFORMIXDIR/lib/esql" # FIXME: Replace `main' with a function in `-lifcli': AC_CHECK_LIB([ifcli], [main]) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS if test "$ac_cv_lib_ifcli_main" = "yes"; then old_CFLAGS="$CFLAGS"; old_LDFLAGS="$LDFLAGS"; old_LIBS="$LIBS"; old_CPPFLAGS="$CPPFLAGS" CFLAGS="-I$IFX_INCDIR -I$INFORMIXDIR/incl -I$INFORMIXDIR $CFLAGS" CPPFLAGS="-I$IFX_INCDIR -I$INFORMIXDIR/incl -I$INFORMIXDIR $CPPFLAGS" #LDFLAGS="$LDFLAGS" #LIBS="$PGSQL_LIBS" AC_CHECK_HEADERS([ incl/cli/infxcli.h incl/cli/infxsql.h ]) if test "$ac_cv_header_incl_cli_infxcli_h" != "yes" \ -o "$ac_cv_header_incl_cli_infxsql_h" != "yes" ; then if test "$AUBIT_SOURCE" = "1" ; then AC_MSG_WARN(Missing incl/cli/infxcli.h or incl/cli/infxsql.h - disabling Informix ODBC support) ac_cv_lib_ifcli_main="no" fi fi CFLAGS="$old_CFLAGS"; LDFLAGS="$old_LDFLAGS"; LIBS="$old_LIBS"; CPPFLAGS="$old_CPPFLAGS" fi if test "$ac_cv_lib_ifcli_main" = "yes"; then HAVE_IFXODBC=yes case $LD_LIBRARY_PATH in *$INFORMIXDIR/lib/cli*) ;; *) TMP1234=`cat /etc/ld.so.conf | grep $INFORMIXDIR/lib/cli` if test "$TMP1234" = ""; then WARN_LD_LIBRARY_PATH=1 WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON IFXODBC" ADD_LD_LIBRARY_PATH="$INFORMIXDIR/lib/cli$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi ;; esac INFORMIXODBC_WARNING=1 else old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L$INFORMIXDIR/lib/cli -L$INFORMIXDIR/lib/esql -Xlinker -rpath -Xlinker $INFORMIXDIR/lib/esql" # FIXME: Replace `main' with a function in `-lifcli': # ivif7912.xx INTERSOLV Informix ODBC driver - UNIX # Driver=/opt/informix/lib/ivinf7912.so AC_CHECK_LIB([ivif7912], [main]) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS if test "$ac_cv_lib_ivif7912_main" = "yes"; then HAVE_IS_IFXODBC=yes INFORMIXODBC_WARNING=1 fi fi fi else AC_MSG_RESULT(--with-ifxodbc disabled) fi ],[ AC_MSG_RESULT(--with-ifxodbc not specified) ]) if test "$enable_stop_ifxodbc" = "yes" ; then exit fi ## ================================================================== ## Checks for SAP DB ODBC driver ## ================================================================== #UNIX: #bin/odbclnk Shell script (Unix only) for the linking of an application. #demo/eng/ODBC/sqlexamp.c C example program for an ODBC application. #demo/eng/ODBC/sqladhoc.c C example program for an ODBC application. #demo/eng/ODBC/Makefile Makefile for generating a demo program. #Win32: #pgm\sql*.dll Libraries for the SAP DB runtime #environment (see the platform-specific SAP DB Installation manual) # directory : #odbc32.dll Driver Manager #ctl3dv2.dll 3D Windows Controls #odbccp32.dll Installer library #odbcinst.hlp Installer library help #odbcad32.exe Administrator program #odbccr32.dll ODBC cursor library #Example makefile: #INCL = -I$(SAPDBROOT)/incl #LIBS = $(SAPDBROOT)/lib/libsqlod.a $(SAPDBROOT)/lib/libsqlrte.a $(SAPDBROOT)/lib/libpcr.a -lpthread -lm #HelloSAPDB: HelloSAPDB.o # $(CC) -o $@ HelloSAPDB.o $(LIBS) #.c.o: # $(CC) -c -DSQLODBC $(CCFLAGS) $(UNDEF) $(DEFINES) $(INCL) $< PHP_CONFIGURE_PART(Checking for SAP DB ODBC driver support:) AC_ARG_WITH(sapodbc, [ --with-sapodbc[=DIR] Include SAP DB ODBC driver support. DIR is the base install directory, defaults to /opt/sapdb.], [ SAPDB_VER="7500" if test "$withval" != "no"; then if test "$withval" = "yes"; then if test "$SAPDB_VER" = "7500"; then withval=/opt/sdb #$SAPDBROOT else withval=/opt/sapdb #$SAPDBROOT fi SAPDBROOT="$withval" else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON SAPODBC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/interfaces/odbc/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi # regtool list "/machine/SOFTWARE/SAP AG/SAPDB ODBC Driver/7.4" old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CPPFLAGS="$CPPFLAGS" if test "$SAPDB_VER" = "7500"; then TMP_SAPODBC_INCLUDE="-I$withval/programs/incl -I$withval" else TMP_SAPODBC_INCLUDE="-I$withval/interfaces/odbc/incl -I$withval" fi if test "$SAPDB_VER" = "7500"; then TMP_SAPODBC_LFLAGS="-L$withval/programs/runtime/$SAPDB_VER/lib \ -L$withval/programs/lib" else #libpcr (needed by libsqlod) is at least in SuSE 9 default RPM's #in path that includes version nubering (/7403/) TMP_SAPODBC_LFLAGS="-L$withval/interfaces/odbc/lib \ -L$withval/indep_prog/runtime/7300/lib \ -L$withval/interfaces/precompiler/runtime/7403/lib \ -L$withval/indep_prog/runtime/7403/lib" fi if test "$SAPDB_VER" = "7500"; then #/opt/sdb/programs/web/lib/libsqlrte.so #/opt/sdb/programs/runtime/7500/lib/libpcr.so #-lsqlrte -lpcr SAPDB_ODBC_ADDLIBS="-lpthread -lm" else SAPDB_ODBC_ADDLIBS="-lsqlrte -lpcr -lpthread -lm" fi LIBS="$SAPDB_ODBC_ADDLIBS" #libpcr: WARNING: NOT part of the SAP DB ODBC RPM!!! #Its part of "environment" RPM: #/opt/sapdb/indep_prog/runtime/7300/lib/libpcr.so #/opt/sapdb/interfaces/precompiler/lib/libpcr.a #/opt/sapdb/interfaces/precompiler/runtime/7300/lib/libpcr.so CPPFLAGS="$CPPFLAGS $TMP_SAPODBC_INCLUDE" LDFLAGS="$LDFLAGS $TMP_SAPODBC_LFLAGS $TMP_SAPODBC_INCLUDE" #Apparently needed by sqlod - but I don;t see it when I do ldd on libsqlod #version 7.403 which is strange? maybe no longer neded? AC_CHECK_LIB([pcr], [main]) # FIXME: Replace `main' with a function in `-lsqlod': AC_CHECK_LIB([sqlod], [main]) if test $ac_cv_lib_sqlod_main = yes; then #First test for WINDOWS.H - it defines stuff like DWORD which is needed by #other SAP ODBC headers if test "$SAPDB_VER" = "7500"; then AC_CHECK_HEADERS([programs/incl/WINDOWS.H]) else AC_CHECK_HEADERS([interfaces/odbc/incl/WINDOWS.H]) fi if test "$ac_cv_header_interfaces_odbc_incl_WINDOWS_H" = "yes" \ -o "$ac_cv_header_programs_incl_WINDOWS_H" = "yes"; then #Now test for remaining 3, and include WINDOWS.H in testing code: if test "$SAPDB_VER" = "7500"; then AC_CHECK_HEADERS([programs/incl/sql.h \ programs/incl/sqlext.h \ programs/incl/sqltypes.h \ ], [], [], [#if HAVE_PROGRAMS_INCL_WINDOWS_H # include # endif ]) else AC_CHECK_HEADERS([interfaces/odbc/incl/sql.h \ interfaces/odbc/incl/sqlext.h \ interfaces/odbc/incl/sqltypes.h \ ], [], [], [#if HAVE_INTERFACES_ODBC_INCL_WINDOWS_H # include # endif ]) fi fi fi LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CPPFLAGS="$old_CPPFLAGS" if test $ac_cv_lib_sqlod_main = yes; then if test "$SAPDB_VER" = "7500"; then if test "$ac_cv_header_programs_incl_sqltypes_h" = "yes" \ -a "$ac_cv_header_programs_incl_sql_h" = "yes" \ -a "$ac_cv_header_programs_incl_sqlext_h" = "yes" \ -a "$ac_cv_header_programs_incl_WINDOWS_H" = "yes" then HAVE_SAPODBC_HEADERS=yes AC_DEFINE(HAVE_SAPODBC_HEADERS_7500,1,[ ]) AC_DEFINE(HAVE_SAPODBC_HEADERS,1,[ ]) else HAVE_SAPODBC_HEADERS=no fi else if test "$ac_cv_header_interfaces_odbc_incl_sqltypes_h" = "yes" \ -a "$ac_cv_header_interfaces_odbc_incl_sql_h" = "yes" \ -a "$ac_cv_header_interfaces_odbc_incl_sqlext_h" = "yes" \ -a "$ac_cv_header_interfaces_odbc_incl_WINDOWS_H" = "yes" then HAVE_SAPODBC_HEADERS=yes AC_DEFINE(HAVE_SAPODBC_HEADERS,1,[ ]) else HAVE_SAPODBC_HEADERS=no fi fi AC_MSG_CHECKING(if we can use SAP ODBC) if test "$HAVE_SAPODBC_HEADERS" != "yes" -a "$AUBIT_SOURCE" = "1" ; then #we need headers only to compile source code AC_DEFINE(HAVE_SAPODBC,0,[ ]) AC_MSG_RESULT(no header files) else AC_MSG_RESULT(yes) HAVE_SAPODBC=yes SAPODBC_INCLUDE="$TMP_SAPODBC_INCLUDE" SAPODBC_LFLAGS="$TMP_SAPODBC_LFLAGS" AC_DEFINE(HAVE_SAPODBC,1,[ ]) fi else AC_DEFINE(HAVE_SAPODBC,0,[ ]) fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-sapodbc not specified) ]) if test "$enable_stop_sapodbc" = "yes" ; then exit fi ## ================================================================== ## Checks for iODBC ODBC manager support ## ================================================================== PHP_CONFIGURE_PART(Checking for iODBC support:) AC_ARG_WITH(iodbc, [ --with-iodbc[=DIR] Include iODBC/Openlink support. DIR is the iODBC base install directory, defaults to /usr/local or /opt/iodbc.], [ old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_PATH="$PATH" if test "$withval" != "no"; then if test "$withval" = "yes"; then if test -d /opt/iodbc; then withval=/opt/iodbc else withval=/usr/local fi else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON iODBC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi IODBC_INCLUDE="-I$withval/include" IODBC_LFLAGS="-L$withval/lib -L/usr/lib" PATH="$withval/bin:$PATH" AC_PATH_PROG(IODBC_CONFIG, iodbc-config, no) #We can use pkg-config too: #/opt/iodbc/lib/pkgconfig/libiodbc.pc LDFLAGS="$LDFLAGS $IODBC_LFLAGS" # AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[ ])) # FIXME: Replace `main' with a function in `-liodbc': AC_CHECK_LIB([iodbc], [main]) #On SuSE 9 this is all we have : /usr/lib/libiodbc.so.2 #Not sure if this check will work, because of .so.2 part #DOES NOT WORK #AC_CHECK_LIB([iodbc.so.2], [main]) if test $ac_cv_lib_iodbc_main = yes; then #do we need to check for headers ? #This two tests are for debugging only: AC_CHECK_HEADERS([ iodbc.h isql.h isqlext.h ]) AC_CHECK_HEADERS([ odbc.h sql.h sqlext.h ]) AC_DEFINE(HAVE_IODBC_HEADERS,1,[ ]) HAVE_IODBC_HEADERS=1 ODBC_LIB_NAME=iodbc HAVE_IODBC=yes #PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) #PHP_ADD_INCLUDE($withval/include, 1) ODBC_TYPE=iodbc IODBC_LIBS=-liodbc AC_DEFINE(HAVE_IODBC,1,[ ]) AC_MSG_CHECKING(if we can use iODBC) AC_MSG_RESULT($HAVE_IODBC) else AC_DEFINE(HAVE_IODBC,0,[ ]) AC_MSG_CHECKING(if we can use iODBC) AC_MSG_RESULT($HAVE_IODBC - missing iodbc library) fi else AC_MSG_RESULT(disabled) fi LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" PATH="$old_PATH" ],[ AC_MSG_RESULT(--with-iodbc not specified) ]) if test "$enable_stop_iodbc" = "yes" ; then exit fi ## ================================================================== ## Checks for unixODBC ODBC manager support ## ================================================================== PHP_CONFIGURE_PART(Checking for unixODBC support:) AC_ARG_WITH(unixodbc, [ --with-unixodbc[=DIR] Include unixODBC support. DIR is the unixODBC base install directory, defaults to /usr/local.], [ #PHP_WITH_SHARED if test "$withval" = "yes"; then withval=/usr/local else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON unixODBC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi if test "$withval" != "no"; then old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L$withval/lib" # AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[ ])) # FIXME: Replace `main' with a function in `-lodbc': AC_CHECK_LIB([odbc], [main]) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS old_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -I$withval/include" if test $ac_cv_lib_odbc_main = yes; then if test "$AUBIT_SOURCE" = "1" ; then #CPPFLAGS="$CPPFLAGS $TMP_IFLAGS" AC_CHECK_HEADERS([sql.h sqlext.h odbcinst.h],HAVE_UNIXODBC_HEADERS=1, HAVE_UNIXODBC_HEADERS=0) else HAVE_UNIXODBC_HEADERS=1 fi if test "$HAVE_UNIXODBC_HEADERS" = "1" ; then ODBC_LIB_NAME=odbc HAVE_UNIXODBC=yes UNIXODBC_INCLUDE=-I$withval/include UNIXODBC_LFLAGS=-L$withval/lib UNIXODBC_LIBS=-lodbc ODBC_TYPE=unixODBC AC_DEFINE(HAVE_UNIXODBC,1,[ ]) else if test "$AUBIT_SOURCE" = "1" ; then AC_MSG_WARN(unixODBC libraries present but headers are missing.) AC_DEFINE(HAVE_UNIXODBC,0,[ ]) INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.unixodbcdev" else ODBC_LIB_NAME=odbc HAVE_UNIXODBC=yes UNIXODBC_INCLUDE=-I$withval/include UNIXODBC_LFLAGS=-L$withval/lib UNIXODBC_LIBS=-lodbc ODBC_TYPE=unixODBC AC_DEFINE(HAVE_UNIXODBC,1,[ ]) fi fi CFLAGS=$old_CFLAGS else AC_DEFINE(HAVE_UNIXODBC,0,[ ]) INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.unixodbc" fi else AC_MSG_RESULT(disbled) AC_DEFINE(HAVE_UNIXODBC,0,[ ]) fi ],[ AC_MSG_RESULT(--with-unixodbc not specified) ]) ## ================================================================== ## Checks for Easysoft ODBC-ODBC Bridge support ## ================================================================== if test "$cygwin" = "0"; then #Do this check only if we did not find any ODBC manager support already: if test -z "$ODBC_TYPE"; then PHP_CONFIGURE_PART(Checking for Easysoft ODBC-ODBC Bridge support:) #AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support) AC_ARG_WITH(esoob, [ --with-esoob[=DIR] Include Easysoft OOB support. DIR is the OOB base install directory, defaults to /usr/local/easysoft/oob/client.], [ #PHP_WITH_SHARED if test "$withval" = "yes"; then withval=/usr/local/easysoft/oob/client #ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON ODBCbridge" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi if test "$withval" != "no"; then ODBC_INCDIR=$withval/include ODBC_LIBDIR=$withval/lib ODBC_LFLAGS=-L$ODBC_LIBDIR ODBC_INCLUDE=-I$ODBC_INCDIR ODBC_LIBS=-lesoobclient ODBC_TYPE=ESOOB AC_DEFINE(HAVE_ESOOB,1,[ ]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-esoob not specified) ]) fi fi if test "$LIBS" != ""; then echo "WARNING: (3) LIBS contains $LIBS" fi ## ================================================================== ## Checks for custom ODBC support ## ================================================================== if test "$cygwin" = "0"; then #Do this check only if we did not find any ODBC manager support already: if test -z "$ODBC_TYPE"; then PHP_CONFIGURE_PART(Checking for custom ODBC support:) #AC_MSG_CHECKING(for a custom ODBC support) AC_ARG_WITH(custom-odbc, [ --with-custom-odbc[=DIR] Include a user defined ODBC support. The DIR is ODBC install base directory, which defaults to /usr/local. Make sure to define CUSTOM_ODBC_LIBS and have some odbc.h in your include dirs. E.g., you should define following for Sybase SQL Anywhere 5.5.00 on QNX, prior to run configure script: CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\" LDFLAGS=-lunix CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\".], [ if test "$withval" = "yes"; then withval=/usr/local else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON CustODBC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi if test "$withval" != "no"; then ODBC_INCDIR=$withval/include ODBC_LIBDIR=$withval/lib ODBC_LFLAGS=-L$ODBC_LIBDIR ODBC_INCLUDE=-I$ODBC_INCDIR ODBC_LIBS=$CUSTOM_ODBC_LIBS ODBC_TYPE=custom AC_DEFINE(HAVE_CODBC,1,[ ]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-custom-odbc not specified) ]) fi fi # # Ensure MSVC-compatible struct packing convention is used when # compiling for Win32 with gcc. # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while # gcc2 uses "-fnative-struct". if test x"$glib_native_win32" = xyes; then if test x"$GCC" = xyes; then msnative_struct='' AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) if test -z "$ac_cv_prog_CC"; then our_gcc="$CC" else our_gcc="$ac_cv_prog_CC" fi case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in 2.) if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x ; then AC_MSG_RESULT([no way]) AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) else CFLAGS="$CFLAGS $msnative_struct" AC_MSG_RESULT([${msnative_struct}]) fi fi fi ## ================================================================== ## Checks for PostgreSQL ODBC driver ## ================================================================== PHP_CONFIGURE_PART(Checking for PostgreSQL ODBC driver support:) AC_ARG_WITH(pgodbc, [ --with-pgodbc[=DIR] Include PostgreSQL ODBC driver support. DIR is the base install directory, defaults to /usr.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PGODBC" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi #$ regtool get "/machine/SOFTWARE/PostgreSQL/Installations/{EABF5323-E52C-47FF-8 #D9D-46B699E84F44}/psqlODBC Directory" #E:\Program Files\PostgreSQL\8.0.0-beta5\odbc\ old_LIBS="$LIBS"; old_LDFLAGS="$LDFLAGS"; old_CPPFLAGS="$CPPFLAGS" TMP_PGODBC_INCLUDE="-I$withval/include" if test -d "$withval/include/pgsql/iodbc"; then if test "$enable_ac_debug" = "yes"; then AC_MSG_WARN($withval/include/pgsql/iodbc added to IFLAGS) fi TMP_PGODBC_INCLUDE="$TMP_PGODBC_INCLUDE -I$withval/include/pgsql/iodbc" fi TMP_PGODBC_LFLAGS="-L$withval/lib" if test -d "/usr/lib/unixODBC" ; then AC_MSG_WARN(/usr/lib/unixODBC added to LFLAGS) TMP_PGODBC_LFLAGS="$TMP_PGODBC_LFLAGS -L/usr/lib/unixODBC" fi #QT libs also have something that looks like PG ODBC driver: #/usr/lib/qt3/plugins/sqldrivers/libqsqlpsql.so #/usr/lib/qt3/plugins/sqldrivers/libtudopsql.so CPPFLAGS="$TMP_PGODBC_INCLUDE $CPPFLAGS" LDFLAGS="$TMP_PGODBC_LFLAGS $LDFLAGS" # FIXME: Replace `main' with a function in `-lpsqlodbc': echo "LDFLAGS=$LDFLAGS" echo "CPPFLAGS=$CPPFLAGS" #unixODBC distributed ODBC driver for PG AC_CHECK_LIB([odbcpsql], [main]) if test "$ac_cv_lib_odbcpsql_main" = "yes"; then PGODBC_LIBNAME=odbcpsql fi #PostgreSQL distributed ODBC driver for PG #WARNING - library file does not have lib prefix:/usr/lib/psqlodbc.so AC_CHECK_LIB([psqlodbc], [main]) if test "$ac_cv_lib_psqlodbc_main" = "yes"; then PGODBC_LIBNAME=psqlodbc else if test -f "$withval/lib/psqlodbc.so"; then echo "Found $withval/lib/psqlodbc.so" echo "WARNING - library file does not have lib prefix and cannot be" echo "Detected by CHECK LIB macro or linked with -l flag !" echo "WILL IGNORE" else TMP_LOCATE="`locate psqlodbc.so 2>/dev/null`" if test "$TMP_LOCATE" != ""; then echo "Found outside of $withval/lib:" echo "$TMP_LOCATE" echo "WARNING - library file does not have lib prefix and cannot be" echo "Detected by CHECK LIB macro or linked with -l flag !" echo "WILL IGNORE" fi fi fi if test "$ac_cv_lib_psqlodbc_main" = "yes" -o "$ac_cv_lib_odbcpsql_main" = "yes"; then #also check for headers, since they are not in PG ODBC RPM, they are #in postgresql-devel, <<< THIS IS NOT TRUE ANY MORE, at least for RH 8 RPM's! #7.1.3 seems to be last version to include this files!! #http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/odbc/Attic/iodbc.h?hideattic=0 say: #Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc project ... # # #including /usr/lib/libpsqlodbc.a (so we don't need #PGSQLODBC RPM installed at all, unless we are using ODBC manager): #/usr/include/pgsql/iodbc: iodbc.h isql.h isqlext.h #AC_CHECK_HEADERS([ iodbc.h isql.h isqlext.h ]) #NOTE: we apparently do not use isql.h and define FAR & SQLHANDLE ourselves #see lib/libsql/odbc/a4gl_lib_sql_odbc_int.h AC_CHECK_HEADERS([ pgsql/iodbc/iodbc.h pgsql/iodbc/isql.h pgsql/iodbc/isqlext.h ]) if test "$ac_cv_header_pgsql_iodbc_iodbc_h" != "yes" \ -o "$ac_cv_header_pgsql_iodbc_isql_h" != "yes" \ -o "$ac_cv_header_pgsql_iodbc_isqlext_h" != "yes" ; then #Use our headers AC_MSG_WARN(Using headers from Aubit CVS - tools/odbctest/pgsql/iodbc) unset ac_cv_header_pgsql_iodbc_iodbc_h unset ac_cv_header_pgsql_iodbc_isql_h unset ac_cv_header_pgsql_iodbc_isqlext_h #this include files reference each other internaly WITHOUT pgsql/iodbc #prefix, so we have to provide -I path for this too: #TODO-edit them to use prefix path TMP_PGODBC_INCLUDE="-I$aubitdir/tools/odbctest -I$aubitdir/tools/odbctest/pgsql/iodbc" CPPFLAGS="$TMP_PGODBC_INCLUDE $old_CPPFLAGS" #isql. does not include others #isqlext & iodbc include isql.h AC_CHECK_HEADERS([ pgsql/iodbc/isql.h pgsql/iodbc/isqlext.h pgsql/iodbc/iodbc.h ]) if test "$DISABLED" = "1"; then #TODO - above test works, but will spit out warnings as it cannot compile #the header files. Compile of the Aubit PG ODBC plugin will work OK, #and I tried to fix the autoconf warning but failed... AC_MSG_WARN(--2--) unset ac_cv_header_pgsql_iodbc_iodbc_h unset ac_cv_header_pgsql_iodbc_isql_h unset ac_cv_header_pgsql_iodbc_isqlext_h AC_CHECK_HEADERS(pgsql/iodbc/isqlext.h pgsql/iodbc/iodbc.h pgsql/iodbc/isql.h,,, [[ # include # include # include ]]) AC_MSG_WARN(--3--) unset ac_cv_header_pgsql_iodbc_iodbc_h unset ac_cv_header_pgsql_iodbc_isql_h unset ac_cv_header_pgsql_iodbc_isqlext_h AC_CHECK_HEADERS(pgsql/iodbc/isqlext.h pgsql/iodbc/iodbc.h pgsql/iodbc/isql.h,,, [[ #ifndef __AC_CONF_TEST_PGODBC__ #define __AC_CONF_TEST_PGODBC__ #ifndef __UCHAR_DEFINED__ #define __UCHAR_DEFINED__ #endif #ifndef __ODBC_DEFINED__ #define __ODBC_DEFINED__ #endif #ifndef FAR #define FAR #endif typedef void FAR *SQLHANDLE; typedef SQLHANDLE SQLHSTMT; #endif # include # include # include ]]) fi #ddddd fi #if test "$ac_cv_header_iodbc_h" = "yes" && test "$ac_cv_header_isql_h" = "yes" && test "$ac_cv_header_isqlext_h" = "yes" ; then if test "$ac_cv_header_pgsql_iodbc_iodbc_h" = "yes" \ -a "$ac_cv_header_pgsql_iodbc_isql_h" = "yes" \ -a "$ac_cv_header_pgsql_iodbc_isqlext_h" = "yes" ; then HAVE_PG_HEADERS=yes else #TODO - we can often find PG ODBC driver, but no headers. Maybe we should #add this headers to Aubit CVS (they are supposed to be standard #anyway, so we might be even able to use odbc.h sql.h and sqlext.h #if we find them on the system ?) #This checks are for debugging only: AC_CHECK_HEADERS([ iodbc.h isql.h isqlext.h ]) AC_CHECK_HEADERS([ odbc.h sql.h sqlext.h ]) HAVE_PG_HEADERS=no fi fi LIBS="$old_LIBS"; LDFLAGS="$old_LDFLAGS"; CPPFLAGS="$old_CPPFLAGS" AC_MSG_CHECKING(PG ODBC connector support) if test "$ac_cv_lib_psqlodbc_main" = "yes" -o "$ac_cv_lib_odbcpsql_main" = "yes"; then if test "$AUBIT_SOURCE" = "1" ; then #we need headers only to compile source code if test "$HAVE_PG_HEADERS" = "yes"; then HAVE_PGODBC=yes PGODBC_INCLUDE="$TMP_PGODBC_INCLUDE" PGODBC_LFLAGS="$TMP_PGODBC_LFLAGS" AC_DEFINE(HAVE_PGODBC_HEADERS,1,[ ]) AC_DEFINE(HAVE_PGODBC,1,[ ]) AC_MSG_RESULT(yes) fi if test "$HAVE_PGODBC" != "yes" -a "$HAVE_IODBC_HEADERS" = "1"; then HAVE_PGODBC=yes PGODBC_INCLUDE="$IODBC_INCLUDE" PGODBC_LFLAGS="$TMP_PGODBC_LFLAGS" AC_DEFINE(HAVE_PGODBC,1,[ ]) AC_MSG_RESULT(yes - using iODBC headers) fi if test "$HAVE_PGODBC" != "yes" ; then AC_DEFINE(HAVE_PGODBC,0,[ ]) AC_MSG_RESULT(NO - missing header files) fi else HAVE_PGODBC=yes AC_DEFINE(HAVE_PGODBC_HEADERS,1,[ ]) AC_DEFINE(HAVE_PGODBC,1,[ ]) AC_MSG_RESULT(yes) fi else AC_DEFINE(HAVE_PGODBC,0,[ ]) AC_MSG_RESULT(No -missing library) fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pgodbc not specified) ]) if test "$enable_stop_pgodbc" = "yes" ; then exit fi #FIXME: #warn user to run /usr/share/pgsql/odbc.sql script to add aditional # PostgreSQL catalog extensions and functions for ODBC compliance #do the same for ODBC managers, if you detect PG database installed ## ================================================================== ## Check for GTK+ GUI support ## ================================================================== PHP_CONFIGURE_PART(Checking for GTK+ GUI support using AC macros:) AC_ARG_WITH(gtk-ac, [ --with-gtk-ac[=DIR] Include GTK+ GUI support using native AC macros. DIR is the GTK+ base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local CUSTOM_WITHVAL=0 else #user specified custom withval CUSTOM_WITHVAL=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON GTK" WARN_LD_LIBRARY_PATH=1 fi GLIB_REQUIRED_VERSION=2.0.0 #I get possibly undefined macro from autoconf on this 3: # AM_PATH_GTK(1.0.2,, [AC_MSG_WARN([GTK not in path])]) # AM_PATH_GTKMM(0.9.5,, [AC_MSG_WARN([GTK not in path])]) # AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, # AC_MSG_WARN([ # *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of # *** GLIB is always available from ftp://ftp.gtk.org/.]), # gobject gmodule) GLIB_PACKAGES="gobject-2.0 gmodule-2.0" #this causes syntax error on DEP # PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, , AC_MSG_WARN([ # *** GLib not found. You can find it on ftp://ftp.gtk.org # *** Errors follow: # $DEP_PKG_ERRORS])) else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-gtk-ac not specified) ]) PHP_CONFIGURE_PART(Checking for GTK+ GUI support:) AC_ARG_WITH(gtk, [ --with-gtk[=DIR] Include GTK+ GUI support. DIR is the GTK+ base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local CUSTOM_WITHVAL=0 else #user specified custom withval CUSTOM_WITHVAL=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON GTK" WARN_LD_LIBRARY_PATH=1 fi old_PATH="$PATH"; old_LIBS="$LIBS"; old_LDFLAGS="$LDFLAGS" PATH="$PATH:$withval/bin" LDFLAGS="$LDFLAGS -L$withval/lib -L/usr/lib" GTK_CONFIG=no #AC_PATH_PROG(GTK_CONFIG, gtk-config, no) AC_PATH_PROG(GTK_QUERY, gtk-query-immodules-2.0, no) if test "$GTK_CONFIG" != "no" -a "$PKG_CONFIG" != "no"; then #If both gtk-config and phg-config are found, use pkg-config #Because gtk-config is GTK 1.2 only, and has no GTK 2.0 information #pkg_config can contain both 1.2 and 2.0 info GTK_USE_CONFIG=pkg fi if test "$GTK_CONFIG" = "no" -a "$PKG_CONFIG" != "no"; then #Have pkg-config, no gtk-config GTK_USE_CONFIG=pkg fi if test "$GTK_CONFIG" != "no" -a "$PKG_CONFIG" = "no"; then #Have gtk-config, no pkg-config GTK_USE_CONFIG=gtk fi if test "$GTK_CONFIG" = "no" -a "$PKG_CONFIG" = "no"; then #No config found GTK_USE_CONFIG=no fi if test "$GTK_USE_CONFIG" = "pkg"; then #See if we can extract names #pkg-config needs package name as parameter, and on Cygwin, #this include version names, so we need to extract this names first: #First check if --list-all works TMP987=`$PKG_CONFIG --list-all 2>&1 | grep "was not found in the pkg-config search path"` if test "$TMP987" != ""; then AC_MSG_WARN(** cannot use pkg-config --list-all option) AC_MSG_WARN(** your pkg-config is missconfigured) AC_MSG_WARN(** Will try guessing GTK2 names) GTK_VERSION="2.0" AC_DEFINE(HAVE_GTK_VERSION,2,[ ]) GTK_NAME="gtk+-2.0" GDK_NAME="gdk-2.0" GLIB_NAME="glib-2.0" else #pkg-config seems to work #First try to see if pgk-config has info on GTK+ version 2 GTK_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^gtk+-2.0 " | head -n 1 | awk '{print $1}'` GDK_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^gdk-2.0 " | head -n 1 | awk '{print $1}'` # On some platforms - we have gtk but not gdk # like fedora core 8.. if test "$GDK_NAME" = "" -a "$GTK_NAME" = "gtk+-2.0" then # Well - we must have gdk - because we've got gtk+, so just fake it.. GDK_NAME="gdk-2.0" GLIB_NAME="glib-2.0" #GDK_NAME_OK=1 #GLIB_NAME_OK=1 else GLIB_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^glib-2.0 " | head -n 1 | awk '{print $1}'` fi if test "$GTK_NAME" = "" -o "$GDK_NAME" = "" -o "$GLIB_NAME" = ""; then #No GTK+ version 2 info, try old 1.2 GTK_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^gtk " | head -n 1 | awk '{print $1}'` GDK_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^gdk " | head -n 1 | awk '{print $1}'` GLIB_NAME=`$PKG_CONFIG --list-all 2>/dev/null | grep "^glib " | head -n 1 | awk '{print $1}'` if test "$GTK_NAME" = "" -o "$GDK_NAME" = "" -o "$GLIB_NAME" = ""; then #No 2 info, no 1.2 info GTK_VERSION="0"; AC_DEFINE(HAVE_GTK_VERSION,0,[ ]) AC_MSG_WARN(cannot extract V 2 or V 1.2 using pkg-config) if test "$GTK_CONFIG" != "no" ; then AC_MSG_WARN(Will try gtk-config instead) GTK_USE_CONFIG=gtk fi else GTK_VERSION="1.2"; AC_DEFINE(HAVE_GTK_VERSION,1.2,[ ]) AC_MSG_RESULT(GTK+ 1.2 names found with pkg-config) fi else GTK_VERSION="2.0" AC_DEFINE(HAVE_GTK_VERSION,2,[ ]) AC_MSG_RESULT(GTK+ 2.0 names found with pkg-config) fi fi #If we still watn to use pkg-config: if test "$GTK_USE_CONFIG" = "pkg"; then #Now check that names if test "$GTK_NAME" != "" -a "$GDK_NAME" != "" -a "$GLIB_NAME" != ""; then if $PKG_CONFIG --exists $GTK_NAME ; then GTK_NAME_OK=1 fi if $PKG_CONFIG --exists $GDK_NAME ; then GDK_NAME_OK=1 fi if $PKG_CONFIG --exists $GLIB_NAME ; then GLIB_NAME_OK=1 fi if test "$GTK_NAME_OK" = "1" -a "$GDK_NAME_OK" = "1" -a "$GLIB_NAME_OK" = "1"; then if test "$enable_ac_debug" = "yes" ; then AC_MSG_RESULT(Found names: GTK_NAME="$GTK_NAME" GDK_NAME="$GDK_NAME" GLIB_NAME="$GLIB_NAME") fi else GTK_VERSION="0"; AC_DEFINE(HAVE_GTK_VERSION,0,[ ]) AC_MSG_WARN(cannot confirm names from pkg-config.) AC_MSG_WARN(GTK_NAME="$GTK_NAME") AC_MSG_WARN(GDK_NAME="$GDK_NAME") AC_MSG_WARN(GLIB_NAME="$GLIB_NAME") fi else GTK_VERSION="0"; AC_DEFINE(HAVE_GTK_VERSION,0,[ ]) AC_MSG_WARN(cannot extract names from pkg-config.) AC_MSG_WARN(GTK_NAME="$GTK_NAME") AC_MSG_WARN(GDK_NAME="$GDK_NAME") AC_MSG_WARN(GLIB_NAME="$GLIB_NAME") fi fi fi ######################################################### if test "$GTK_USE_CONFIG" = "pkg"; then GTK_LIB_PATH=`$PKG_CONFIG --libs-only-L $GTK_NAME` GTK_INC_PATH=`$PKG_CONFIG --cflags-only-I $GTK_NAME` GTKLIBS=`$PKG_CONFIG --libs-only-l $GTK_NAME` if test "$GTK_LIB_PATH" != "" -a "$GTK_INC_PATH" != "" \ -a "$GTKLIBS" != ""; then AC_DEFINE(HAVE_GTK,1,[ ]) GTK_REAL_VERSION=`$PKG_CONFIG --modversion $GTK_NAME` GTKBUILD=yes else AC_DEFINE(HAVE_GTK,0,[ ]) GTKBUILD=no fi fi ######################################################### if test "$GTK_USE_CONFIG" = "gtk"; then GTK_NAME="gtk-config" GDK_NAME="gtk-config" GLIB_NAME="gtk-config" GTK_INC_PATH=`$GTK_CONFIG --cflags` GLIB_CFLAGS=$GTK_INC_PATH GTKLIBS=`$GTK_CONFIG --libs` #FIXME: why am I using differnt names? if test "$GTK_INC_PATH" != "" -a "$GLIB_CFLAGS" != "" \ -a "$GTKLIBS" != ""; then AC_DEFINE(HAVE_GTK,1,[ ]) GTK_REAL_VERSION=`$GTK_CONFIG --version` GTK_VERSION="1.2" GTKBUILD=yes else AC_DEFINE(HAVE_GTK,0,[ ]) GTKBUILD=no fi fi ######################################################### if test "$GTK_USE_CONFIG" = "no"; then if test "$AUBIT_SOURCE" = "1" ; then AC_MSG_WARN(cannot find pkg-config or gtk-config) AC_DEFINE(HAVE_GTK,0,[ ]) GTKBUILD=no #else # ... fi fi AC_MSG_CHECKING(GTK usability ) if test "$AUBIT_SOURCE" = "0"; then #We just need libs if test "$GTK_QUERY" != "no"; then GTKBUILD="yes" AC_MSG_RESULT(yes - libraries only) else AC_MSG_RESULT(no) fi else if test "$GTKBUILD" = "yes"; then #Fix silly GTK paths returned by pkg-config on Windows: GTK_INC_PATH=`echo $GTK_INC_PATH | sed -e 's/\/target\/build/\/usr/g' -e 's/\/target/\/usr/g'` AC_MSG_RESULT(yes ($GTK_VERSION using $GTK_USE_CONFIG V:$GTK_REAL_VERSION)) #AC_MSG_RESULT(Package names: $GTK_NAME $GDK_NAME $GLIB_NAME) else AC_MSG_RESULT(no) fi fi else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-gtk not specified) ]) CUSTOM_WITHVAL=0 if test "$enable_stop_gtk" = "yes" ; then exit fi ## ================================================================== ## Check for Glade support ## ================================================================== PHP_CONFIGURE_PART(Checking for Glade support:) AC_ARG_WITH(glade, [ --with-glade[=DIR] Include Glade support. DIR is the Glade install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then if test "$withval" = "yes"; then withval=/usr/local else #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON Glade" WARN_LD_LIBRARY_PATH=1 ADD_LD_LIBRARY_PATH="$withval/lib$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" if test "$PKG_CONFIG" != "no"; then AC_MSG_CHECKING(Glade 2 in pkg-config) #--exists return 0 if the module(s) exist GLADE_NAME="libglade-2.0" if $PKG_CONFIG --exists $GLADE_NAME ; then HAS_GLADE_2=1 GLADE_VERSION=`$PKG_CONFIG --modversion $GLADE_NAME` AC_MSG_RESULT($GLADE_NAME present ($GLADE_VERSION)) #In GladeWin Windows installer: #/cygdrive/c/GTK/lib/libglade-2.0.dll.a AC_CHECK_LIB([glade-2.0], [main]) AC_CHECK_LIB([glade], [main]) AC_CHECK_LIB([glade-gnome], [main]) else HAS_GLADE_2=0 AC_MSG_RESULT($GLADE_NAME MISSING) fi else if test "$AUBIT_SOURCE" = "1" ; then HAS_GLADE_2=0 AC_MSG_RESULT(no pkg-config detected) #else # ... fi fi PATH="$old_PATH"; LIBS="$old_LIBS"; LDFLAGS="$old_LDFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-glade not specified) ]) ## ================================================================== ## Check for Sun RPC support ## ================================================================== PHP_CONFIGURE_PART(Checking for Sun RPC support:) if test "$FORCE_RPC" = "1"; then #Note: on Linux, rpclib functions are in libc. On other systems, for #example Windows/CygWin, this will be a separate library that we will need #First, let's see if RPC is in libraries we already have as default: #it is not enough to just test for function, you then have test for its success by name! #and BTW, what's wrong with svctcp_create ? #AC_CHECK_FUNCS([svc_run]) AC_CHECK_FUNCS([svctcp_create]) AC_CHECK_HEADERS([ rpc/rpc.h rpc.h ]) #We will get #define HAVE___rpc_thread_svc_fdset in a4gl_incl_config.h, but no variables #are defined when testing functions. #if test `eval echo '${'$as_ac_var'}'` != yes ; then #if test "$ac_cv_func___rpc_thread_svc_fdset" != "yes"; then if test "$ac_cv_func_svctcp_create" != "yes"; then RPC_FUNC_INTERNAL=0 #This happened on ia64-unknown-linux-gnu case $host in *linux*) AC_MSG_WARN(Ooops-you dont have RPC function in GLIBC, but you are on Linux?) ;; esac #force this check even if not specified on command line: if test "$with_rpc" = "" && test "$FORCE_RPC" = "1"; then with_rpc=yes fi else RPC_FUNC_INTERNAL=1 if test "$AUBIT_SOURCE" = "1" ; then #if compiling source code... #...force this check even if not specified on command line: if test "$with_rpc" = "" && test "$FORCE_RPC" = "1"; then with_rpc=yes fi else HAVE_RPCLIB=1 fi fi fi #if test "$FORCE_RPC" = "1" AC_ARG_WITH(rpc, [ --with-rpc[=DIR] Include RPC support. DIR is the RPC base install directory, defaults to /usr/local.], [ if test "$withval" != "no"; then #AC_MSG_CHECKING(for RPC support) if test "$withval" = "yes"; then withval=/usr/local else #user specified custom withval CUSTOM_WITHVAL=1 ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON RPC" WARN_LD_LIBRARY_PATH=1 fi old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS old_PATH="$PATH" PATH="$withval/rpcgen:$PATH" TEST_I_FLAGS="-I$withval/include -I$withval/rpc -I$withval" TEST_L_FLAGS="-L$withval/lib" LDFLAGS="$LDFLAGS $TEST_I_FLAGS $TEST_L_FLAGS" # FIXME: Replace `main' with a function in `-lrpclib': AC_CHECK_LIB([rpclib], [main]) AC_CHECK_LIB([rpcsvc], [main]) if test "$ac_cv_lib_rpcsvc_main" = "yes"; then #seems rpc library is rpcsvc on aix and sparc-sun-solaris2.7 #which defines a bunch of symbols starting 'xdr_' AC_CHECK_LIB(rpcsvc, svctcp_create ,AC_DEFINE(HAVE_RPCSVC,1,[ ])) AC_MSG_CHECKING(library containing RPC functions) if test "$ac_cv_lib_rpcsvc___rpc_thread_svc_fdset" = "yes" || test "$ac_cv_lib_rpcsvc_svctcp_create_" = "yes" || test "$ac_cv_lib_rpcsvc_xdr_argument_" = "yes"; then AC_MSG_RESULT(-lrpcsvc) RPCLIB_NAME=-lrpcsvc else AC_MSG_RESULT(Found -lrpcsvc, but no RPC functions inside.) #This checks are just to make debugging easier if real one fails, and should be removed in future: AC_CHECK_LIB(rpcsvc, __rpc_thread_svc_fdset,AC_DEFINE(HAVE_RPCSVC,1,[ ])) AC_CHECK_LIB(rpcsvc, xdr_argument ,AC_DEFINE(HAVE_RPCSVC,1,[ ])) case $host in *solaris*) #sparc-sun-solaris2.8 #I'm obviously looking for wrong functions on Solaris: RPCLIB_NAME=-lrpcsvc ;; esac fi fi if test "$ac_cv_lib_rpclib_main" = "yes"; then AC_CHECK_LIB(rpclib, svctcp_create ,AC_DEFINE(HAVE_RPCLIB,1,[ ])) if test "$ac_cv_lib_rpclib___rpc_thread_svc_fdset" = "yes" || test "$ac_cv_lib_rpclib_svctcp_create_" = "yes" || test "$ac_cv_lib_rpclib_xdr_argument_" = "yes"; then echo "Found RPC functions in -lrpclib" RPCLIB_NAME=-lrpclib else echo "Found -lrpclib, but no RPC functions inside." #This checks are just to make debugging easier if real one fails, and should be removed in future: AC_CHECK_LIB(rpclib, xdr_argument ,AC_DEFINE(HAVE_RPCLIB,1,[ ])) AC_CHECK_LIB(rpclib, __rpc_thread_svc_fdset,AC_DEFINE(HAVE_RPCLIB,1,[ ])) fi fi AC_PATH_PROG(RPCGEN, rpcgen, no) LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" PATH="$old_PATH" if test "$RPCGEN" = "no"; then AC_DEFINE(HAVE_RPCGEN,0,[ ]) if test "$AUBIT_SOURCE" = "1" ; then case "$host" in *-*-cygwin* | *-*-mingw* ) #we don't need rpcgen on CygWin USE_RPCGEN=0 #FIXME: if needed, set this path to appropriate subdir of "no_rpc" depending #on platform. It is not clear is this files are platform dependent. RPCLIB_INCLUDE="-I$aubitdir/tools/no_rpc/cygwin" WARN_RPCGEN=1 ;; *) WARN_RPCGEN=2 #AC_MSG_ERROR( "rpcgen" not found. Please install Sun RPC or ask for precompiled RPC files for your platform to be added to Aubit disrtibution. Stop.) USE_RPCGEN=0 RPCLIB_INCLUDE="-I$aubitdir/tools/no_rpc/cygwin" ;; esac else #we don't need rpcgen for binary distro USE_RPCGEN=0 fi else USE_RPCGEN=1 AC_DEFINE(HAVE_RPCGEN,1,[ ]) fi if test "$RPCLIB_NAME" != ""; then RPCLIB_INCLUDE="$TEST_I_FLAGS" RPCLIB_LFLAGS="$TEST_L_FLAGS" AC_DEFINE(HAVE_RPCLIB,1,[ ]) HAVE_RPCLIB=1 #A4GL_RPCTYPE=SUNRPC #A4GL_RPCTYPE_DETECTED="$A4GL_RPCTYPE_DETECTED $A4GL_RPCTYPE" else if test "$RPC_FUNC_INTERNAL" != "1"; then AC_DEFINE(HAVE_RPCLIB,0,[ ]) HAVE_RPCLIB=0 WARN_RPCLIB=1 #FIXME: if we link fcompile and mcompile statically with rpclib for binary distro, will #it be able to compile forms and menus on systems without rpclib installed? #FIXME: if we link libRPC_SUNRPC statically with rpclib for binary distro, will RPC work #on system without rpclib installed? else AC_DEFINE(HAVE_RPCLIB,1,[ ]) HAVE_RPCLIB=1 fi fi if test "$CUSTOM_WITHVAL" = "1"; then if test "$HAVE_RPCLIB" = "1"; then #user specified custom withval WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON RPC" WARN_LD_LIBRARY_PATH=1 fi fi else AC_MSG_RESULT(disbled) AC_DEFINE(HAVE_RPCLIB,0,[ ]) HAVE_RPCLIB=0 USE_RPCGEN=0 AC_DEFINE(HAVE_RPCGEN,0,[ ]) fi ],[ #This shoult never happen: AC_MSG_RESULT(--with-rpc not specified) ]) CUSTOM_WITHVAL=0 #Its probably ok to link it even if we dont need it, but if RPC functions #are already in standard libraryes (Linux), we really don't need to: #if test "$RPC_FUNC_INTERNAL" = "1"; then # RPCLIB_NAME= #fi ## ================================================================== ## Check for Perl generating compiler support ## ================================================================== AC_ARG_WITH(perl, [ --with-perl=yes/no Enable (default) or disable Perl langauge support], [ if test "$withval" != "no"; then if test "$PERL" != no; then if test "$SWIG" != no; then #Fixme: How to test for MakeMaker Perl module ? PERLBUILD=yes fi fi else PERLBUILD=no fi ]) ## ================================================================== ## Checks for curses/ncurses library ## ================================================================== PHP_CONFIGURE_PART(Checking for curses libraries:) AC_ARG_WITH(curses, [ --with-curses[=DIR] Include curses support. DIR is the curses base install directory, defaults to /lib. This will probe for Ncurses, then for curses.], [ if test "$withval" = "no"; then AC_MSG_RESULT(Disabled) else #User specified location of curses library with --with-curses=path if test "$withval" != "yes"; then CURSES_LIB_PATH="-L$withval -L$withval/lib" CURSES_INC_PATH="-I$withval -I$withval/ncurses -I$withval/include/ncurses -I$withval/include" ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON Curses" WARN_LD_LIBRARY_PATH=1 else #Note" Aubit source code uses #include and NOT #include or include Therefore, #-I flag MUST point to acutal directoty containing curses.h file. #Also note that old Curses libs (still available on many UNIX systems) #Will not include ncurses.h but Ncurses libs will include curses.h #So we need to use "curses" naming, not "ncurses" CURSES_LIB_PATH="-L/lib" if test -d "/usr/local/include/ncurses" ; then CURSES_INC_PATH="-I/usr/local/include/ncurses" fi fi #Store current values old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" LDFLAGS="$CURSES_LIB_PATH $LDFLAGS" CFLAGS="$CURSES_INC_PATH $CFLAGS" #cygncurses6.dll cygncurses5.dll cygncurses7.dll #AC_CHECK_LIB([cygncurses6], [main]) #First test for New Curses (ncurses) # FIXME: Replace `main' with a function in `-lncurses': AC_CHECK_LIB([ncurses], [main]) AC_CHECK_LIB([ncurses], [winnstr]) AC_CHECK_LIB([curses], [winnstr]) if test "$ac_cv_lib_ncurses_main" = "yes"; then #We found "ncurses" library #fixme: check version of curses - how? HAVE_CURSES=1 else AC_MSG_RESULT(yes - found $THIS_LIB) AC_MSG_CHECKING(For any libncurses library on the system) #Some distros like SuSE stopped linking libncuses.so.x.x back #to libncurses.so, so we need to search for it #AC SEARCH LIBS(function,search-libs,[echo "found it"],[echo "Did not found it"],[other-libs]) #Hopefully no other library exports function mvadd_wchnstr SEARCH_LIBS="`locate libncurses.so`" if test "$SEARCH_LIBS" != "" ; then LIBS="" THIS_LIB="" AC_SEARCH_LIBS(mvadd_wchnstr,$SEARCH_LIBS,[echo "found it"],[echo "Did not find it"],[other-libs] ) if test "$LIB" != ""; then THIS_LIB="`echo $LIBS | sed -e 's/-l//'`" ac_cv_lib_ncurses_main="yes" AC_MSG_RESULT(yes - found $THIS_LIB) #Make a link for us: LINK_MATCH="lib$THIS_LIB.so" for file in $SEARCH_LIBS ; do case $file in $LINK_MATCH*) echo "Linking $file to $aubitdir/lib/lib$THIS_LIB.so" ls -s $file $aubitdir/lib/lib$THIS_LIB.so break ;; esac done else AC_MSG_RESULT(Found nothing with AC SEARCH LIBS in $SEARCH_LIBS) fi LIBS="" else AC_MSG_RESULT(locate found no libncurses.so on this system) fi fi if test "$ac_cv_lib_ncurses_main" = "yes"; then #"ncurses" library was NOT found, try curses # FIXME: Replace `main' with a function in `-lcurses': AC_CHECK_LIB([curses], [main]) if test "$ac_cv_lib_curses_main" = "yes"; then #fixme: check version of curses - how? HAVE_CURSES=1 fi fi if test "$HAVE_CURSES" = "1"; then AC_MSG_CHECKING(For wide libncurses library on the system) AC_CHECK_LIB([ncursesw],[main]) AC_CHECK_LIB([panelw],[main]) AC_CHECK_LIB([formw],[main]) if test "$ac_cv_lib_ncursesw_main$ac_cv_lib_panelw_main$ac_cv_lib_formw_main" = "yesyesyes" ; then AC_CHECK_HEADERS( [ ncursesw/curses.h ] ) if test "$ac_cv_header_ncursesw_curses_h" = "yes" then HAVE_WIDE_NCURSES=1 AC_DEFINE(HAVE_WIDE_NCURSES) fi fi AC_DEFINE(HAVE_CURSES) echo "ac_cv_lib_ncurses_winnstr=$ac_cv_lib_ncurses_winnstr" echo "ac_cv_lib_curses_winnstr=$ac_cv_lib_curses_winnstr" case $host in *-apple-darwin*) CURSES_LIB_NAME="-lSystem" ;; *solaris*) CURSES_LIB_NAME="-lform -lpanel -lncurses" ;; *aix*) CURSES_LIB_NAME="-lform -lpanel -lncurses" ;; *hpux*) CURSES_LIB_NAME="-lform -lpanel" if test "$ac_cv_lib_ncurses_main" = "yes"; then CURSES_LIB_NAME="-lncurses $CURSES_LIB_NAME" else CURSES_LIB_NAME="-lcurses $CURSES_LIB_NAME" fi ;; *linux*) CURSES_LIB_NAME="-lform -lpanel" if test "$ac_cv_lib_curses_main" = "yes"; then CURSES_LIB_NAME="-lcurses $CURSES_LIB_NAME" else CURSES_LIB_NAME="-lncurses $CURSES_LIB_NAME" fi ;; *) CURSES_LIB_NAME="-lform -lpanel" if test "$ac_cv_lib_ncurses_main" = "yes"; then CURSES_LIB_NAME="-lncurses $CURSES_LIB_NAME" else CURSES_LIB_NAME="-lcurses $CURSES_LIB_NAME" fi ;; esac else CURSES_INC_PATH="-I$aubitdir/tools/no_curses/cygwin" CURSES_LIB_PATH= fi AC_CHECK_HEADERS([ curses.h ncurses.h ncurses/ncurses.h curses/curses.h ]) if test "$AUBIT_SOURCE" = "1" ; then if test "$ac_cv_header_curses_h" = "yes" ; then AC_DEFINE(HAVE_CURSES_H) else if test "$ac_cv_header_ncurses_h" = "yes" ; then #This is OK since all Ncurses instalationa will include #curses.h (as link to ncurses.h) AC_DEFINE(HAVE_NCURSES_H) else #HAVE_CURSES=0 if test "$ac_cv_header_ncurses_ncurses_h" = "yes" ; then AC_MSG_WARN(No curses.h but have ncurses/ncurses.h - check -I flag if fails) AC_DEFINE(HAVE_NCURSES_NCURSES_H) fi if test "$ac_cv_header_curses_curses_h" = "yes" ; then AC_MSG_WARN(No curses.h but have curses/curses.h - check -I flag if fails) AC_DEFINE(HAVE_CURSES_CURSES_H) fi fi fi fi #This is more or less just a diagnostic check in the case we fail #for some reason in detecting curses/ncurses: #form and panel are part of curses - but not PDcurses #AIX: Both form and panel h files are part of ncurses. Install it. # FIXME: Replace `main' with a function in `-lform': AC_CHECK_LIB([form], [main]) # FIXME: Replace `main' with a function in `-lpanel': AC_CHECK_LIB([panel], [main]) #retore current values LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" fi ],[ AC_MSG_RESULT(--with-curses not specified) ]) ## ================================================================== ## Checks for PDcurses library ## ================================================================== PHP_CONFIGURE_PART(Checking for PDcurses/Xcurses:) AC_ARG_WITH(pdcurses, [ --with-pdcurses[=DIR] Include PDcurses support. DIR is the PDcurses base install directory, defaults to /usr/local/pdcurses.], [ if test "$withval" != "no"; then if test "$withval" != "yes"; then #user specified path case "$withval" in *cygdrive*) if test "$GCC_MINGW" = "yes"; then #convert Cygwin path mapping back to native PDCURSES_WINPATH=`echo "$withval" | sed -e 's/^\/cygdrive\///' -e 's/\//:\//'` fi ;; esac if test "$PDCURSES_WINPATH" != ""; then ADD_LD_LIBRARY_PATH="$PDCURSES_WINPATH$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" else ADD_LD_LIBRARY_PATH="$withval$A4GL_PATH_SEP$ADD_LD_LIBRARY_PATH" fi WARN_LD_LIBRARY_REASON="$WARN_LD_LIBRARY_REASON PDcurses" WARN_LD_LIBRARY_PATH=1 else #withval is 'yes', assign default #Source code installs to /usr/local/pdcurses/ by default withval=/usr/local/pdcurses fi old_LIBS="$LIBS" old_LDFLAGS="$LDFLAGS" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" CFLAGS="-I$withval/include $CFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS" if test "$enable_ac_debug" = "yes" ; then echo "withval=$withval" fi #cr** - how do this paths work anyway? #AC_PATH_PROG(XCURSES_CONFIG, xcurses-config, no, "$withval/bin" $PATH ) export PATH="$withval/bin:/usr/bin:/usr/local/bin:$PATH" if test "$GCC_MINGW" != "yes"; then AC_PATH_PROG(XCURSES_CONFIG, xcurses-config, no ) AC_CHECK_HEADERS([ xpanel.h ]) AC_MSG_CHECKING(PDcurses Xcurses support) if test "$AUBIT_SOURCE" = "1" ; then if test "$XCURSES_CONFIG" != "no" -a "$ac_cv_header_xpanel_h" = "yes"; then #found xcurses - possible only unix XCURSES_CFLAGS="`$XCURSES_CONFIG --cflags` -I`$XCURSES_CONFIG --prefix`/include" XCURSES_LIBS=`$XCURSES_CONFIG --libs` HAVE_XCURSES=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else if test "$XCURSES_CONFIG" != "no" ; then #found xcurses - possible only unix HAVE_XCURSES=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi else #on windows #No X on Windows - what would we do with Xcurses... AC_MSG_CHECKING(PDcurses Xcurses support) AC_MSG_RESULT(no Xcurses on Windows) fi if test -d "$withval"; then if test -f "$withval/curses.dll"; then PD_CURSES_LIB_PATH="-L$withval" PD_CURSES_LIB_NAME="$withval/curses.dll $withval/panel.lib" HAVE_PDCURSES=1 fi if test -f "$withval/lib/curses.so"; then PD_CURSES_LIB_PATH="-L$withval/lib" PD_CURSES_LIB_NAME="-l$withval/lib/curses.so $withval/lib/panel.lib" HAVE_PDCURSES=1 fi #renamed since 2.7 - MS VC package #if test -f "$withval/pdcurses.lib"; then # PD_CURSES_LIB_PATH="-L$withval" # PD_CURSES_LIB_NAME="-l$withval/pdcurses.lib $withval/panel.lib" # HAVE_PDCURSES=1 #fi #renamed since 2.7 - mingw package: #if test -f "$withval/pdcurses.a"; then # PD_CURSES_LIB_PATH="-L$withval" # PD_CURSES_LIB_NAME="-l$withval/pdcurses.a $withval/panel.a" # HAVE_PDCURSES=1 #fi if test -d "$withval/incl"; then PD_CURSES_INC_PATH="-I$withval/incl" else #On windows everything is in one directory PD_CURSES_INC_PATH="-I$withval" fi AC_MSG_CHECKING(PDcurses-dynamic) if test "$HAVE_PDCURSES" = "1"; then AC_DEFINE(HAVE_PDCURSES,1,[ ]) AC_MSG_RESULT(yes) HAS_PDCURSES_DYNAMIC_OBJS=1 else AC_DEFINE(HAVE_PDCURSES,0,[ ]) AC_MSG_RESULT(no - missing curses library (curses.so or .dll)) HAS_PDCURSES_DYNAMIC_OBJS=0 fi #below note applies to version 2.5 of pdcurses. now there are both #mingw and vc packages available, but only .a or .lib and no .dll at all #Note: pre-compiled binaries of PDcurses for Windows are currently #available only as MS VC compiled, which includes .dll only, #so we cant link it statically. As taking care of another .dll #and its PATH is a pain, it is easier for us to link it statically. #To get static .a objects for static linking, we have to compile from #sources (see 'make install.pdcurses') but then there is no .dll #TODO: First install pre-compiled MS VC binaries (.dll) then build #static objects from sources, and add them (install) to the same #location we installed .dll to - so we can have both #Check if we have objects needed to make statically linked HL_TUIN (HL_TUINs) #PDCURSES_STATIC_PATH="$CYGWIN_DRIVE:$CYGWIN_PATH/tmp/pdcurs26/win32" PDCURSES_STATIC_PATH="$PDCURSES_WINPATH" if test -f "$PDCURSES_STATIC_PATH/panel.a" \ -a -f "$PDCURSES_STATIC_PATH/pdcurses.a"; then old_CPPFLAGS="$CPPFLAGS" #NOTE: MinGW GCC understands only native Windows path format PD_CURSES_LIB_PATH="-L$PDCURSES_WINPATH" PD_CURSES_LIB_NAME="$PDCURSES_WINPATH/pdcurses.a $PDCURSES_WINPATH/panel.a" PD_CURSES_INC_PATH="-I$PDCURSES_WINPATH" CPPFLAGS="$PD_CURSES_INC_PATH $CPPFLAGS" AC_CHECK_HEADERS([ curses.h panel.h ]) #Cant check libraries with AC_CHECK_LIB([dl], [main]) #because they don't have 'lib' prefix CPPFLAGS="$old_CPPFLAGS" AC_MSG_CHECKING(PDcurses static link objects) AC_MSG_RESULT(yes) HAS_PDCURSES_STATIC_OBJS=1 HAVE_PDCURSES=1 AC_DEFINE(HAVE_PDCURSES,1,[ ]) else AC_MSG_CHECKING(PDcurses static link objects) AC_MSG_RESULT(no) HAS_PDCURSES_STATIC_OBJS=0 fi else #given path does not exist HAVE_PDCURSES=0 HAS_PDCURSES_STATIC_OBJS=0 AC_DEFINE(HAVE_PDCURSES,0,[ ]) AC_MSG_RESULT(no - directory $withval does not exist) fi TMP_TMP=`echo $withval | sed -e 's/\// /g'` TMP_TMP=`echo $TMP_TMP | sed -e 's/\\\\/ /g'` TMP_TMP=`echo $TMP_TMP | sed -e 's/cygdrive//' -e 's/\:/ /'` if test "$TMP_TMP" != ""; then set `echo $TMP_TMP` if test "$1" = "c" -o "$1" = "d" -o "$1" = "e" \ -o "$1" = "C" -o "$1" = "D" -o "$1" = "E"; then PD_CURSES_DRIVE=$1 else #No drive leter - so same as CygWin drive PD_CURSES_DRIVE=$CYGWIN_DRIVE fi PD_CURSES_CYGDRIVE="/cygdrive/$PD_CURSES_DRIVE" fi LIBS="$old_LIBS" LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT(disabled) fi ],[ AC_MSG_RESULT(--with-pdcurses not specified) ]) if test "$enable_stop_pdcurses" = "yes" ; then exit fi ## ================================================================== ## Checks for Java binding (JNI) ## ================================================================== USE_JAVA=yes JAVAINCLUDE="" JAVAPACKAGE="" PHP_CONFIGURE_PART(Checking for Java JNI:) AC_ARG_WITH(java,[ --with-java=path full path of Java Developers Kit, or no],[ case $withval in no) USE_JAVA=no ;; yes) USE_JAVA=yes ;; *) JAVAPACKAGE=$withval ;; esac ]) if test "$with_java" != "no" ; then USE_JAVA=no AC_MSG_CHECKING(for Java header files for JNI) #what about using GCC JNI?: #/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/jni.h #/usr/lib/gcc-lib/i386-redhat-linux/3.0.2/include/jni.h #so here we go the "manual" way - it will not actually test if jni.h is usable, dirs="$prefix /usr/local/src/j2sdk1.3.1 /usr/lib/java /usr/java \ /usr/java/jdk1.4 /usr/lib/jdk1.4 /opt/java1.4 /usr/lpp/java/J1.4 \ /usr/java/jdk1.4 /usr/lib/jdk1.4 /usr/jdk14 /jdk1.4 /usr/java/jdk1.3 \ /usr/include/java /usr/local/java /usr/local/include/kaffe \ /usr/include/kaffe /usr/lib/jdk1.3 /opt/java1.3 /usr/lpp/java/J1.3 \ /usr/java/jdk1.2 /usr/lib/jdk1.2.2 /usr/lib/jdk1.2.1 /usr/jdk122 \ /usr/lib/jdk122 /usr/lib/jdk1.2.1 /opt/java1.2 /usr/lpp/java/J1.2 \ /usr/lib/jdk1.1.8 /usr/jdk118 /usr/lib/jdk118 /usr/lpp/java/J1.1 \ /opt/java1.1 /usr /opt/local /jdk1.3 /jdk1.2.3 /jdk1.2.2 /jdk1.2.1 \ /System/Library/Frameworks/JavaVM.framework/Headers \ /usr/jdk_base/include" if test "$JAVAPACKAGE" != ""; then dirs="$JAVAPACKAGE $dirs" fi # now try to find jni.h for i in $dirs ; do if test -r "$i/jni.h"; then JAVAINCLUDE="$i" #USE_JAVA=yes break elif test -r "$i/include/jni.h"; then JAVAINCLUDE="$i/include" #USE_JAVA=yes break fi done # now try with an include path if test "$JAVAINCLUDE" != ""; then OCPPFLAGS="$CPPFLAGS" CPPFLAGS="-I$JAVAINCLUDE $OCPPFLAGS" AC_TRY_CPP([#include ], [ USE_JAVA=yes JAVAINCLUDE="-I$JAVAINCLUDE" ],) CPPFLAGS="$OCPPFLAGS" fi # if the above didn't work probably jni_md.h is missing if test "USE_JAVA" != "yes" ; then if test "$JAVAINCLUDE" != ""; then subdirs="$JAVAINCLUDE $JAVAINCLUDE/$MACHDEP $JAVAINCLUDE/$ac_md_system $JAVAINCLUDE/solaris $JAVAINCLUDE/genunix $JAVAINCLUDE/alpha $JAVAINCLUDE/win32 $JAVAINCLUDE/mvs" for i in $subdirs ; do if test -r $i/jni_md.h; then JAVAINCLUDE="-I$JAVAINCLUDE -I$i" USE_JAVA=yes break fi done fi fi if test "$JAVAINCLUDE" = ""; then USE_JAVA=no fi if test "$USE_JAVA" = "no"; then AC_MSG_RESULT(not found) else GENERATED_FILES="$GENERATED_FILES " AC_MSG_RESULT(yes) #($JAVAINCLUDE)) AC_SUBST(JAVAINCLUDE) fi else AC_MSG_RESULT(Disabled) fi ## ================================================================== ## Checks for libraries expected in standard locations ## ================================================================== PHP_CONFIGURE_PART(Checking for standard libraries:) HAVE_LIBDL=0 case "$host" in *-*-cygwin | *-*-cygwin* | *-*-mingw* | *-*-pw32* ) AC_MSG_CHECKING(libdl) AC_MSG_RESULT(Cygwin DLL contains emulation of libdl functions.) USE_LIBDL=0 ;; *alpha* ) #DEC Alpha ES40 (uname -a gives: OSF1 maxdev V5.1 732 alpha) AC_MSG_CHECKING(libdl) AC_MSG_RESULT(DEC Alpha has dlopen in standard libraries.) USE_LIBDL=0 ;; *freebsd* ) AC_MSG_CHECKING(libdl) AC_MSG_RESULT(Freebsd has dlopen in standard libraries.) USE_LIBDL=0 ;; *hp-hpux* ) #HP-UX 11.0 gives hppa2.0w-hp-hpux11.00 #uname -m = 9000/800 #uname -r = B.11.00 #uname -s = HP-UX #uname -v = U AC_MSG_CHECKING(libdl) AC_MSG_RESULT(HP-UX has dlopen in standard libraries.) USE_LIBDL=0 ;; *) # FIXME: Replace `main' with a function in `-ldl' - but don't forget to #clear AC cache for next test! #FIXME: not not check this in a particular library, check for dlopen() #function as such in standard libraries first. old_LIBS="$LIBS" AC_CHECK_LIB([dl], [dlopen]) if test "$ac_cv_lib_dl_main" != "yes"; then old_LDFLAGS="$LDFLAGS" #/sw/lib/libdl.a #/sw/lib/libdl.dylib LDFLAGS="$LDFLAGS -L/sw/lib" AC_CHECK_LIB([dl], [dlopen]) if test "$ac_cv_lib_dl_dlopen" != "yes"; then AC_MSG_ERROR(No dl lib found - please install it. Stop.) else HAVE_LIBDL=1 USE_LIBDL=1 AC_DEFINE(HAVE_LIB_DL) fi LDFLAGS="$old_LDFLAGS" fi LIBS="$old_LIBS" ;; esac if test "$ac_cv_lib_dl_dlopen" = "yes"; then USE_LIBDL=1 fi AC_CHECK_LIB([dl], [dlopen]) AC_CHECK_LIB([z], [gzopen]) AC_SUBST(EXTRALIBS) EXTRALIBS= if test "$ac_cv_lib_dl_dlopen" = "yes"; then EXTRALIBS+=" -ldl " fi if test "$ac_cv_lib_z_gzopen" = "yes"; then EXTRALIBS+=" -lz " fi # FIXME: Replace `main' with a function in `-lc': old_LIBS="$LIBS" AC_CHECK_LIB([c], [main]) #unit test sw for C code, used in tools/test/db AC_CHECK_LIB([check], [suite_create]) if test "$ac_cv_lib_check_suite_create" = "yes" ; then HAS_CHECK=1 fi LIBS="$old_LIBS" ## ================================================================== ## Checks for header files ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then PHP_CONFIGURE_PART(Checking for header files:) #AC_STDC_HEADERS AC_HEADER_STDC AC_CHECK_HEADERS([alloca.h errno.h locale.h malloc.h memory.h netdb.h \ netinet/in.h stddef.h stdlib.h string.h strings.h sys/socket.h \ sys/time.h sys/timeb.h unistd.h share.h limits.h libintl.h fcntl.h features.h ]) #AC_HAVE_HEADERS(string.h fcntl.h sys/file.h sys/param.h) AC_CHECK_HEADERS([search.h]) if test "$GCC_MINGW" = "yes" ; then #MinGW now has something called search.h but its not complete #try: grep VISIT /cygdrive/c/MinGW/include/search.h AC_MSG_WARN(Disabling MinGW search.h - not compatible) as_ac_Header="no" AC_DEFINE(HAVE_SEARCH_H,0,[ ]) HAVE_SEARCH_H=0 fi TMP_TMP=`eval echo '${'$as_ac_Header'}'` if test "$TMP_TMP" != "yes" -o "$HAVE_SEARCH_H" = "0" ; then #a simple fix is to get a copy of search.h from the Darwin CVS tree's #libedit pkg, as follows: #cvs -d :pserver:(username)@anoncvs.opensource.apple.com:/cvs/Darwin login #CVS password: (password) #cvs -d :pserver:blakers@anoncvs.opensource.apple.com:/cvs/Darwin checkout libedit #cp /usr/ports/libedit/libedit/search.h /usr/include/search.h AC_MSG_WARN(Using Aubit provided search.h) fi AC_CHECK_HEADERS([getopt.h]) if test `eval echo '${'$as_ac_Header'}'` != yes; then AC_MSG_WARN(Using Aubit provided getopt.h) fi #AC_CHECK_HEADERS([dlfcn.h]) AC_CHECK_HEADERS([dlfcn.h],[have_dlfcn="yes"],[have_dlfcn="no"]) if test `eval echo '${'$as_ac_Header'}'` != yes; then #libdl: Aubit loads plugins using the dlopen() interface (except on HP-UX). #This is not the OS X way, but Apple has supplied the dlcompat library to #simulate this interface. This library and its header file dlfcn.h are #required for Aubit to compile. #Clear cached value: unset ac_cv_header_dlfcn_h old_CPPFLAGS="$CPPFLAGS" #old_CFLAGS="$CFLAGS" case $host in *-apple-darwin*) #only on Darwin: TMP_IFLAGS="-I/sw/include" RE_CHECK=1 ;; *) ;; esac if test "$RE_CHECK" = "1"; then CPPFLAGS="$CPPFLAGS $TMP_IFLAGS" AC_CHECK_HEADERS([dlfcn.h],[have_dlfcn="yes"],[have_dlfcn="no"]) if test "$have_dlfcn" != "yes"; then if test "$GCC_MINGW" != "yes"; then AC_MSG_ERROR(No dlfcn.h found - please install dl library. Stop.) fi else CFLAGS="$CFLAGS $TMP_IFLAGS" fi fi CPPFLAGS="$old_CPPFLAGS" fi fi ## ================================================================== ## Checks for typedefs, structures, and compiler characteristics ## ================================================================== PHP_CONFIGURE_PART(Checking for compiler characteristics:) AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_CHECK_SIZEOF(long, 8) AC_CHECK_SIZEOF(int, 4) ## ================================================================== ## Checks for cross compilation ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then PHP_CONFIGURE_PART(Checking for cross compilation options:) ############################################################################### # If we're cross-compiling, allow the user to override the tools and their # options. The configure script is oriented toward identifying the host # compiler, etc., but we need a build compiler to generate parts of the source. : ${BUILD_CC:='$(CC)'} : ${BUILD_CFLAGS:='$(CFLAGS)'} : ${BUILD_CPPFLAGS:='$(CPPFLAGS)'} : ${BUILD_LDFLAGS:='$(LDFLAGS)'} : ${BUILD_LIBS:='$(LIBS)'} : ${BUILD_EXEEXT:='$x'} if test "$cross_compiling" = yes ; then AC_ARG_WITH(build-cc, [ --with-build-cc=XXX the build C compiler ($BUILD_CC)], [BUILD_CC="$withval"], [AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)]) AC_ARG_WITH(build-cflags, [ --with-build-cflags=XXX the build C compiler-flags], [BUILD_CFLAGS="$withval"]) AC_ARG_WITH(build-cppflags, [ --with-build-cppflags=XXX the build C preprocessor-flags], [BUILD_CPPFLAGS="$withval"]) AC_ARG_WITH(build-ldflags, [ --with-build-ldflags=XXX the build linker-flags], [BUILD_LDFLAGS="$withval"]) AC_ARG_WITH(build-libs, [ --with-build-libs=XXX the build libraries], [BUILD_LIBS="$withval"]) BUILD_EXEEXT= fi AC_SUBST(BUILD_CC) AC_SUBST(BUILD_CFLAGS) AC_SUBST(BUILD_CPPFLAGS) AC_SUBST(BUILD_LDFLAGS) AC_SUBST(BUILD_LIBS) AC_SUBST(BUILD_EXEEXT) AC_SUBST(HAVE_WINSLEEP) fi ## ================================================================== ## Checks for libcurl ## ================================================================== #AC_SUBST(LIBCURL_CPPFLAGS) #AC_SUBST(LIBCURL) AC_LIBTOOL_LANG_CXX_CONFIG AC_SUBST(RDYNAMIC_FLAG) if test "x$export_dynamic_flag_spec" = "x" then RDYNAMIC_FLAG="" else RDYNAMIC_FLAG=`eval "echo $export_dynamic_flag_spec"` fi AC_ARG_WITH(curl,[--with-curl],[chk_curl=x$withval],chk_curl=notset) if test "$chk_curl" = "xno" then HAVE_LIBCURL=0 else #AC_SUBST(HAVE_LIBCURL) AC_MSG_CHECKING(Checking LIBCURL support) LIBCURL_CHECK_CONFIG([yes],[7.9.7],HAVE_LIBCURL=1 ,HAVE_LIBCURL=0 ) fi AC_SUBST(HAVE_LIBCURL) ## ================================================================== ## Checks for library functions ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then PHP_CONFIGURE_PART(Checking for library functions:) AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS([floor gethostbyname inet_ntoa memset pow putenv re_comp regcomp setlocale strcasecmp strchr strdup strncasecmp strrchr strstr strtol index rindex popen snprintf vsnprintf sigaction gettimeofday trunc sleep ]) #select() and index() are used in Jabber #there is apprently an index() func somewhere in libaubit4gl or in some lib #linked with it (on Windows) AC_CHECK_FUNC(select,AC_DEFINE(HAVE_SELECT)) #AC_CHECK_FUNC(index,AC_DEFINE(HAVE_INDEX)) AC_CHECK_FUNC(Sleep,AC_DEFINE(HAVE_WINSLEEP)) if test "$GCC_MINGW" = "yes"; then dnl This is for Msys/Mingw if test "$HAVE_SELECT" != "1"; then AC_MSG_CHECKING([for select in ws2_32]) AC_TRY_LINK([#include ], [select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);], [ dnl worked! AC_MSG_RESULT([yes]) HAVE_SELECT="1" AC_DEFINE_UNQUOTED(HAVE_SELECT,1)], [AC_MSG_WARN(You cant compile Jabber without a select)] ) fi fi #all used in lib/libaubit4gl.so: #On Solaris, all this are in -lsocket AC_CHECK_FUNCS([socket recv accept bind setsockopt getservbyname listen]) #So if any of abowe is not found, we should check something like this: #AC_CHECK_LIB([socket], [socket recv accept bind setsockopt getservbyname listen]) #4glc (mod.c) #AC_CHECK_FUNC(setenv,AC_MSG_RESULT(Yes),AC_MSG_ERROR(Cannot compile Aubit without 'setenv'. Stop.)) #AC_CHECK_FUNC(setenv,,AC_MSG_ERROR(Cannot compile Aubit without 'setenv'. Stop.)) AC_CHECK_FUNCS([setenv putenv]) AC_CHECK_FUNCS([htons nstoh ntohs]) AC_TRY_COMPILE( [ #include #include #include ],[ struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler=SIG_IGN; sigaction(SIGCHLD, &sa, NULL); ], AC_DEFINE(HAS_SIGACTION_SA_HANDLER)) #Check if we have it in libc: AC_CHECK_FUNC(getopt_long,GETOPT_LONG=yes,AC_CHECK_LIB(iberty, getopt_long)) if test "$GETOPT_LONG" != "yes"; then if test "$ac_cv_lib_iberty_getopt_long" = "yes"; then #On Solaris systems, you will probably have to install the GNU "libiberty" #library (-liberty) which provides getopt_long for Solaris; get it at # http://sunfreeware.com (look for the package "libiberty.so" in #the list of freeware) and install it into /usr/local/lib. GETOPT_LONG=iberty AC_MSG_RESULT(using iberty getopt_long) #echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH xx $LIBPATH" else GETOPT_LONG=no AC_MSG_RESULT(using Aubit included getopt sources) fi fi fi old_LIBS="$LIBS" AC_CHECK_LIB([z], [main]) LIBS="$old_LIBS" ## ================================================================== ## Checks for Cygwin specifics ## ================================================================== if test "$LIBS" != ""; then echo "WARNING: (4) LIBS contains $LIBS" fi case "$host" in *-*-cygwin | *-*-cygwin* | *-*-mingw* | *-*-pw32* ) PHP_CONFIGURE_PART(Checking for Cygwin specific options:) # # ---------------------------------------------------------------------- # Win32 objects need to tell the header whether they will be linking # with a dll or static archive in order that everything is imported # to the object in the same way that it was exported from the # archive (extern for static, __declspec(dllimport) for dlls) # ---------------------------------------------------------------------- LIBHELLO_DLL_IMPORT= LIBGREET_DLL_IMPORT= if test X"$enable_shared" = Xyes; then LIBHELLO_DLL_IMPORT=-DLIBHELLO_DLL_IMPORT LIBGREET_DLL_IMPORT=-DLIBGREET_DLL_IMPORT dnl AC_TRY_LINK_FUNC([libhello_is_dll], dnl [LIBHELLO_DLL_IMPORT=-DLIBHELLO_DLL_IMPORT]) fi AC_SUBST(LIBHELLO_DLL_IMPORT) AC_SUBST(LIBGREET_DLL_IMPORT) # #cygcheck can be used instead of ldd that is missing on CygWin: AC_PATH_PROG(CYGCHECK, cygcheck, no) #this macros are in aclocal.m4 - run aclocal to create it : #AC_OBJEXT #AC_EXEEXT _LT_AC_LOCK #checking for dlfcn.h... yes AC_LIBTOOL_DLOPEN_SELF #checking for BSD-compatible nm... /usr/bin/nm -B AC_LIBTOOL_PROG_LD_SHLIBS #checking command to parse /usr/bin/nm -B output... ok AC_LIBTOOL_SYS_DYNAMIC_LINKER #checking whether the linker () supports shared libraries... yes AC_CHECK_LIBM #checking dynamic linker characteristics... Win32 ld.exe # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one # echo "$as_me:3493: checking if libtool should supply DllMain function" >&5 #echo $ECHO_N "checking if libtool should supply DllMain function... $ECHO_C" >&6 #if test "${lt_cv_need_dllmain+set}" = set; then #======================================= # case $host/$CC in # *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) # # old mingw systems require "-dll" to link a DLL, while more recent ones # # require "-mdll" # SAVE_CFLAGS="$CFLAGS" # CFLAGS="$CFLAGS -mdll" # echo "$as_me:3540: checking how to link DLLs" >&5 #echo $ECHO_N "checking how to link DLLs... $ECHO_C" >&6 #if test "${lt_cv_cc_dll_switch+set}" = set; then # #... # # # *-*-cygwin* | *-*-pw32*) # # cygwin systems need to pass --dll to the linker, and not link # # crt.o which will require a WinMain@16 definition. # lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; # esac # ;; # # #======================================= # cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # lt_cv_prog_cc_pic='-DDLL_EXPORT' # ;; ;; esac ## ================================================================== ## check what the byte ordering is: ## ================================================================== ## AC_MSG_CHECKING(byte ordering) ## ## gcc order.c -o order ## ## ORDER=`./order` ## ## case "$ORDER" in ## 10) #least byte first ## AC_DEFINE(HAVE_LEAST_BYTE_FIRST,1,[ ]) ## AC_MSG_RESULT(10) ## ;; ## ## 01) #If it gives 01 then ntohs would be ## #define ntohs(x) (x) ## AC_DEFINE(HAVE_LEAST_BYTE_FIRST,0,[ ]) ## AC_MSG_RESULT(01) ## ;; ## ## *) ## AC_MSG_RESULT(Invalid byte order result: >>$ORDER<<) ## #must not exit here untill I find a way for this to work on ## #CygWin without re-runing autoconf ## #exit 5 ## ;; ## esac ## ## rm -f ./order.c ./order ./order.exe ./order.o ./order.tmp ## ================================================================== ## Decide on default SQL driver ## ================================================================== PHP_CONFIGURE_PART(Seting defaults:) AC_MSG_CHECKING(Default SQL driver) #if more then one ODBC support was detected, this one will #override A4GL_SQLTYPE set earlier in this script: #Options: static nosql iodbc unixodbc esql ifxodbc pgodbc odbc32 if test "$default_sql" != ""; then #User can force SQL driver default with --default-odbc=xxxx switch case "$default_sql" in ec-i | ec-pg | ec-sap | ec-querix) A4GL_LEXTYPE=EC ;; pgodbc | ifxodbc | sapodbc | unixodbc | iodbc | odbc32 | sqlite | sqliteodbc | esql) A4GL_LEXTYPE=C ;; *) AC_MSG_ERROR(Specified --default-sql="$default_sql" is invalid) ;; esac A4GL_SQLTYPE="$default_sql" else #User did not specify default, so we will scan trough available database conectivity #options (ODBC, ESQL/C generation, native plug-ins) to pick the most stabile #and functional option from what is available ######################################### ############# ODBC drivers ############## # # In reverse order of preference - most functional / stabile drivers # are listed last, so they overrite previous declarations # if test "$HAVE_PGODBC" = "yes" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=pgodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_POSTGRES="pgodbc $A4GL_SQLTYPE_EC_VALID_POSTGRES" fi if test "$HAVE_IFXODBC" = "yes" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=ifxodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_INFORMIX="ifxodbc $A4GL_SQLTYPE_EC_VALID_INFORMIX" fi if test "$HAVE_SAPODBC" = "yes" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=sapodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_SAPDB="sapodbc $A4GL_SQLTYPE_EC_VALID_SAPDB" fi ######################################### ############# ODBC managers ############# # # In reverse order of preference - most functional / stabile drivers # are listed last, so they overrite previous declarations # if test "$HAVE_UNIXODBC" = "yes" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=unixodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_ALL="unixodbc $A4GL_SQLTYPE_EC_VALID_ALL" fi if test "$HAVE_IODBC" = "yes" ; then #we want iodbc to have highest priority, when we have a choice, #sine we still have problems with unixODBC A4GL_LEXTYPE=C A4GL_SQLTYPE=iodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_ALL="iodbc $A4GL_SQLTYPE_EC_VALID_ALL" fi if test "$cygwin" = "1"; then #if we are on windows, we will ALLWAYS use native odbc32 manager A4GL_LEXTYPE=C A4GL_SQLTYPE=odbc32 A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" A4GL_SQLTYPE_EC_VALID_ALL="odbc32 $A4GL_SQLTYPE_EC_VALID_ALL" fi ######################################################################## ########################## ESQL generation ############################# ######################################################################## # # In reverse order of preference - most functional / stabile drivers # are listed last, so they overrite previous declarations # ########## SAP-DB ESQL/C pre-compiler output ############# if test "$SAPDB_ESQLC" != "no"; then A4GL_LEXTYPE=EC if test "`echo $A4GL_LEXTYPE_DETECTED | $GREP_WORD EC`" = ""; then A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi #NOTE - plugin name is libESQL_SAP.so NOT SAPDB A4GL_LEXDIALECT=SAP A4GL_LEXDIALECT_DETECTED="$A4GL_LEXDIALECT_DETECTED $A4GL_LEXDIALECT" #FIXME:4glc still needs to get to db for DEFINE LIKE A4GL_SQLTYPE=FIXME-ec fi ######### Ingres ESQL/C compiler ################ if test "$HAVE_INGRES_ESQLC" != "no"; then A4GL_LEXTYPE=EC if test "`echo $A4GL_LEXTYPE_DETECTED | $GREP_WORD EC`" = ""; then A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi A4GL_LEXDIALECT=INGRES A4GL_LEXDIALECT_DETECTED="$A4GL_LEXDIALECT_DETECTED $A4GL_LEXDIALECT" #4glc still needs to get to db for DEFINE LIKE #Note - Mike say this driver was abandoned??? A4GL_SQLTYPE=ingres A4GL_SQLTYPE_EC_VALID_INGRES="ingres $A4GL_SQLTYPE_EC_VALID_INGRES" fi ########## PostgreSQL ESQL/C compiler ######### #If we have PostgreSQL ESQL/C compiler, we can use it, bypassing A4GL_SQLTYPE #setting - this will limit Aubit DB connectivity to PostgreSQL ONLY. #Postgres - the ecpg needs to be the absolute latest CVS #version which has support for the "-C INFORMIX" flag. #Also - this version relies on a few backend changes for more Informix #compatibilty - some of which won't make it into the official postgres #releases and will need special patches... #All these are available (open source etc) - they are just not what most people #will have.. if test "$PG_ESQLC" != "no" ; then if test "$PG_ESQLC_IFXCOMPAT" = "yes"; then A4GL_LEXTYPE=EC if test "`echo $A4GL_LEXTYPE_DETECTED | $GREP_WORD EC`" = ""; then A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi A4GL_LEXDIALECT=POSTGRES A4GL_LEXDIALECT_DETECTED="$A4GL_LEXDIALECT_DETECTED $A4GL_LEXDIALECT" #4glc still needs to get to db for DEFINE LIKE A4GL_SQLTYPE="pg8" A4GL_SQLTYPE_COMPILE_ONLY_DETECTED="$A4GL_SQLTYPE_COMPILE_ONLY_DETECTED pg" A4GL_SQLTYPE_EC_VALID_POSTGRES="pg $A4GL_SQLTYPE_EC_VALID_POSTGRES" fi fi ########## Informix ESQL/C compiler ############ #If we have Informix ESQL/C compiler, we can use it, bypassing A4GL_SQLTYPE #setting - this will limit Aubit DB connectivity to Informix ONLY. if test "$IFMX_ESQLC" != "no" ; then A4GL_LEXTYPE=EC if test "`echo $A4GL_LEXTYPE_DETECTED | $GREP_WORD EC`" = ""; then A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi A4GL_LEXDIALECT=INFORMIX A4GL_LEXDIALECT_DETECTED="$A4GL_LEXDIALECT_DETECTED $A4GL_LEXDIALECT" A4GL_SQLTYPE_EC_VALID_INFORMIX="esql $A4GL_SQLTYPE_EC_VALID_INFORMIX" #4glc still needs to get to db for DEFINE LIKE A4GL_SQLTYPE=esql fi ########## Querix ESQL/C compiler ############ #If we have Querix ESQL/C compiler, we can use it, bypassing A4GL_SQLTYPE #setting - this will limit Aubit DB connectivity to Querix supported RDBMS ONLY. #if test "$Q_ESQLC" != "no" ; then #If we have Querix ESQL/C compiler, we can use it, bypassing A4GL_SQLTYPE #setting - this will limit Aubit DB connectivity to Querix supported RDBMS ONLY. #A4GL_LEXTYPE=EC #if test "`echo $A4GL_LEXTYPE_DETECTED | grep -w EC`" = ""; then # A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" #fi #A4GL_LEXDIALECT=QUERIX #A4GL_LEXDIALECT_DETECTED="$A4GL_LEXDIALECT_DETECTED $A4GL_LEXDIALECT" #FIXME:4glc still needs to get to db for DEFINE LIKE #A4GL_SQLTYPE=FIXME-ec #fi ####################################################################### ######################## native drivers ############################### ####################################################################### # # In reverse order of preference - most functional / stabile drivers # are listed last, so they overrite previous declarations # ######### Ingres native ################ if test "$HAVE_INGRES_ESQLC" != "no"; then #Note - Mike say this driver was abandoned??? A4GL_LEXTYPE=C A4GL_SQLTYPE=ingres A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" fi ######### MySQL native ################# if test "$SQL_MYSQL" = "yes" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=mysql A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" fi ######### PgSQL native ################# #non existant: full driver was never finished by Sergio) and all we have is # a basic (simple) driver we use for DEFINE LIKE and such with PG ESQL output #if test "$HAVE_PGSQL_LIB" = "yes" ; then # A4GL_SQLTYPE=pgsql #fi ######### Informix native ############### if test "$IFMX_ESQLC" != "no" ; then A4GL_LEXTYPE=C A4GL_SQLTYPE=esql A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" fi if test "$A4GL_SQLTYPE" = "nosql"; then #Did not get anything so far. #As a last resort, use SQLIte (as we will allways have it, as we have #SQLite ODBC code in our CVS) if we still dont #have default SQL plug-in at this point #Note that this is for Aubit connectivity side only - user is still #expected to make sure he has SQLite engine itself installed, but as SQLite #database engine is just one library, this should be easy. Easier then any #other RDBMS anyway. ############# SQLite via ODBC #################### #This will never happen, since SQLIte native connector will allways "win" #as it is allways present (since we have all code in our CVS) if test "$SQLITE_LIB" = "1" -a "$SQLITE_ODBC" = "1"; then A4GL_LEXTYPE=C A4GL_SQLTYPE=sqliteodbc A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE" fi ############# SQLite native connector #################### #It is not really native - it does not call SQLite API directly, #but instead it uses SQLite ODBC driver code to create plug-in #linked with Aubit ODBC code and SQLIte ODBC code - therefore it looks #like a native driver but interanlly it used ODBC API if test "$SQLITE_LIB" = "1" ; then A4GL_LEXTYPE=C #FIXME: how do we know if we have 'S'tatic one? if test "$SQLITE_VER" = "3"; then A4GL_SQLTYPE=sqlite3S A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE sqlite3" else A4GL_SQLTYPE=sqliteS A4GL_SQLTYPE_DETECTED="$A4GL_SQLTYPE_DETECTED $A4GL_SQLTYPE sqlite" fi else echo "Final attempt to assigne default database conectivity plug-in" echo "failed as there is no SQLite engine on this system, and no " echo "other database connectivity options where detected." fi fi fi #Add detected valid to the ones taht are allways valid for all A4GL_SQLTYPE_EC_VALID_INFORMIX="$A4GL_SQLTYPE_EC_VALID_INFORMIX $A4GL_SQLTYPE_EC_VALID_ALL" A4GL_SQLTYPE_EC_VALID_SAPDB="$A4GL_SQLTYPE_EC_VALID_SAPDB $A4GL_SQLTYPE_EC_VALID_ALL" A4GL_SQLTYPE_EC_VALID_INGRES="$A4GL_SQLTYPE_EC_VALID_INGRES $A4GL_SQLTYPE_EC_VALID_ALL" A4GL_SQLTYPE_EC_VALID_POSTGRES="$A4GL_SQLTYPE_EC_VALID_POSTGRES $A4GL_SQLTYPE_EC_VALID_ALL" AC_MSG_RESULT(${T_MD}$A4GL_SQLTYPE${T_ME}) AC_MSG_RESULT(Detected:$A4GL_SQLTYPE_DETECTED) ## ================================================================== ## Decide on default COMPILER OUTPUT driver ## ================================================================== AC_MSG_CHECKING(Default compiler output language) PCODE_ENABLED="no" if test "$with_pcode" = "yes"; then if test "$enable_minimal" != "yes"; then # Removed PCODE compilation from build... #PCODE_ENABLED="yes" : fi fi if test "$default_comp" != ""; then #User can force COMPILER driver default with --default-comp=xxxx switch A4GL_LEXTYPE="$default_comp" if test "$default_lexdialect" != ""; then A4GL_LEXDIALECT="$default_lexdialect" fi else #LEXTYPE is at this point empty, unless a variant of embedded #C was chosen in SQL connectivity "decide" section. if test "$PERLBUILD" != "no"; then #No point: #A4GL_LEXTYPE="PERL" #A4GL_LEXDIALECT="" A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED PERL" fi # C# output (Mono) if test "$CS_COMPILER" != "no"; then #No point: #A4GL_LEXTYPE="CS" #A4GL_LEXDIALECT="" A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED CS" fi if test "$PCODE_ENABLED" = "yes"; then A4GL_LEXTYPE="PCODE" A4GL_LEXDIALECT="" A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi if test "$HAVE_C_COMP" = "1"; then A4GL_LEXTYPE="C" A4GL_LEXDIALECT="" A4GL_LEXTYPE_DETECTED="$A4GL_LEXTYPE_DETECTED $A4GL_LEXTYPE" fi #NOTE: Since it primarily affects database connectivity, embedded C #variants are in SQL connectivity "decide" section fi if test "$A4GL_LEXTYPE" = "EC"; then AC_MSG_RESULT(${T_MD}$A4GL_LEXTYPE $A4GL_LEXDIALECT${T_ME}) else AC_MSG_RESULT(${T_MD}$A4GL_LEXTYPE${T_ME}) fi AC_MSG_RESULT(Detected:$A4GL_LEXTYPE_DETECTED) AC_MSG_RESULT(Detected-EC dialects:$A4GL_LEXDIALECT_DETECTED) ## ================================================================== ## Decide on default RPC driver ## ================================================================== AC_MSG_CHECKING(Default RPC driver) if test "$default_rpc" != ""; then #User can force RPC driver default with --default-rpc=xxxx switch A4GL_RPCTYPE="$default_rpc" else if test "$XML_RPC" != "no"; then A4GL_RPCTYPE="XMLRPC" A4GL_RPCTYPE_DETECTED="$A4GL_RPCTYPE_DETECTED $A4GL_RPCTYPE" fi if test "$HAVE_RPCLIB" != "0"; then A4GL_RPCTYPE="XDR" A4GL_RPCTYPE_DETECTED="$A4GL_RPCTYPE_DETECTED $A4GL_RPCTYPE" fi fi AC_MSG_RESULT(${T_MD}$A4GL_RPCTYPE${T_ME}) AC_MSG_RESULT(Detected:$A4GL_RPCTYPE_DETECTED) ## ================================================================== ## Decide on default FORM driver ## ================================================================== AC_MSG_CHECKING(Default forms driver) if test "$default_form" != ""; then #User can force FORM driver default with --default-form=xxxx switch A4GL_FORMTYPE="$default_form" else #FIXME: do we want to use XDR forms any more? if test "$HAVE_RPCLIB" != "0"; then A4GL_FORMTYPE="XDR" A4GL_FORMTYPE_DETECTED="$A4GL_FORMTYPE_DETECTED $A4GL_FORMTYPE" fi A4GL_FORMTYPE="GENERIC" A4GL_FORMTYPE_DETECTED="$A4GL_FORMTYPE_DETECTED $A4GL_FORMTYPE" fi AC_MSG_RESULT(${T_MD}$A4GL_FORMTYPE${T_ME}) AC_MSG_RESULT(Detected:$A4GL_FORMTYPE_DETECTED) ## ================================================================== ## Decide on default EXTended REPorts driver ## ================================================================== AC_MSG_CHECKING(Default EXTended REPorts driver) if test "$default_report" != ""; then #User can force EXREPORT driver default with --default-report=xxxx switch A4GL_PDFTYPE="$default_report" else if test "$PDFBUILD" != "no"; then A4GL_PDFTYPE="PDF" A4GL_PDFTYPE_DETECTED="$A4GL_PDFTYPE_DETECTED $A4GL_PDFTYPE" fi fi AC_MSG_RESULT(${T_MD}$A4GL_PDFTYPE${T_ME}) AC_MSG_RESULT(Detected:$A4GL_PDFTYPE_DETECTED) ## ================================================================== ## Decide on default UI driver ## ================================================================== AC_MSG_CHECKING(Default UI driver) if test "$default_ui" != ""; then #User can force UI driver default with --default-ui=xxxx switch A4GL_UI="$default_ui" else if test "$HAVE_XCURSES" = "1"; then # A4GL_UI="HL_TUIX" A4GL_UI_DETECTED="$A4GL_UI_DETECTED HL_TUIX" fi if test "$GTKBUILD" != "no"; then A4GL_UI="HL_GTK" A4GL_UI_DETECTED="$A4GL_UI_DETECTED $A4GL_UI" fi if test "$HAVE_CURSES" = "1" ; then A4GL_UI="TUI" #HL_TUI is still not as good as TUI according to Mike #A4GL_UI="HL_TUI" A4GL_UI_DETECTED="$A4GL_UI_DETECTED TUI HL_TUI HL_TUIN" else if test "$HAS_PDCURSES_STATIC_OBJS" = "1" ; then A4GL_UI="HL_TUINs" A4GL_UI_DETECTED="$A4GL_UI_DETECTED HL_TUINs UI_HL_TUIws" fi #we can compile only HL_TUIN with PDcurses if test "$HAVE_PDCURSES" = "1"; then A4GL_UI="TUI" A4GL_UI_DETECTED="$A4GL_UI_DETECTED HL_TUIN UI_HL_TUIw" fi fi if test "$A4GL_UI" = "CONSOLE" ; then WARN_UI=1 fi fi AC_MSG_RESULT(${T_MD}$A4GL_UI${T_ME}) AC_MSG_RESULT(Detected:$A4GL_UI_DETECTED) ## ================================================================== ## Decide on default HELP MESSAGE driver ## ================================================================== AC_MSG_CHECKING(Default Message driver) if test "$default_msg" != ""; then #User can force HELP MESSAGE driver default with --default-msg=xxxx switch A4GL_MSGTYPE="$default_msg" fi AC_MSG_RESULT(${T_MD}$A4GL_MSGTYPE${T_ME}) AC_MSG_RESULT(Detected:$A4GL_MSGTYPE_DETECTED) ## ================================================================== ## Decide on default packer driver for forms,menus and reports (ace) ## ================================================================== AC_MSG_CHECKING(Default packer driver) if test "$default_packer" != ""; then #User can force PACKER driver default with --default-packer=xxxx switch A4GL_PACKER="$default_packer" else A4GL_PACKER=XML A4GL_PACKER_DETECTED="$A4GL_PACKER_DETECTED $A4GL_PACKER" if test "$HAVE_RPCLIB" != "0"; then A4GL_PACKER=XDR A4GL_PACKER_DETECTED="$A4GL_PACKER_DETECTED $A4GL_PACKER" fi #Check if we can build libPACKER_GZPACKED if test $ac_cv_lib_z_main = yes; then A4GL_PACKER=GZPACKED A4GL_PACKER_DETECTED="$A4GL_PACKER_DETECTED $A4GL_PACKER" fi #A4GL_PACKER=PERL #Why would we use anything else anyway? #Simple data A4GL_PACKER=PACKED A4GL_PACKER_DETECTED="$A4GL_PACKER_DETECTED $A4GL_PACKER" fi AC_MSG_RESULT(${T_MD}$A4GL_PACKER${T_ME}) AC_MSG_RESULT(Detected:$A4GL_PACKER_DETECTED) ## ================================================================== ## Decide on targets that are built/istalled/packaged ## optionaly based on external dependencies. This affects ## RPM packaging, install/deinstall and build process ## ================================================================== AC_MSG_CHECKING(Plug-ins to build) PLUGIN_YES= PLUGIN_YES_LINKABLE= PLUGIN_NO= PLUGIN_NO_LINKABLE= if test "$PCODE_ENABLED" = "yes"; then if test "$enable_minimal" != "yes"; then #Need RPClib: PCODE_EXE_RPC="c2pcode checker runner" PCODE_EXE_NATIVE="c2pcode_fgl checker_fgl runner_fgl link_fgl" PLUGIN_YES="$PLUGIN_YES LEX_PCODEC" fi else ALL_DISABLED="$ALL_DISABLED c2pcode checker runner c2pcode_fgl checker_fgl runner_fgl link_fgl LEX_PCODEC" PLUGIN_NO="$PLUGIN_NO LEX_PCODEC" fi if test "$PERLBUILD" != "no"; then PLUGIN_YES="$PLUGIN_YES LEX_PERL" if test "$DO_DISABLE" = "1"; then ALL_DISABLED="$ALL_DISABLED aubit4gl_pl.pm" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make perl'" fi else PLUGIN_NO="$PLUGIN_NO LEX_PERL aubit4gl_pl.pm" fi if test "$HAVE_CURSES" = "1" ; then PLUGIN_YES="$PLUGIN_YES UI_TUI UI_HL_TUI UI_HL_TUIN" if test "$HAVE_WIDE_NCURSES" = "1"; then PLUGIN_YES="$PLUGIN_YES UI_TUI_wide" fi #add UI_HL_TUINs else if test "$HAVE_PDCURSES" = "1" -o "$HAS_PDCURSES_STATIC_OBJS" = "1"; then #no curses, but found PDcurses #can make only UI_TUIN with PDcurses if test "$HAVE_PDCURSES" = "1"; then PLUGIN_YES="$PLUGIN_YES UI_HL_TUIN UI_HL_TUIw" else PLUGIN_NO="$PLUGIN_NO UI_HL_TUIN UI_HL_TUIw" fi if test "$HAS_PDCURSES_STATIC_OBJS" = "1"; then PLUGIN_YES="$PLUGIN_YES UI_HL_TUINs UI_HL_TUIws" else PLUGIN_NO="$PLUGIN_NO UI_HL_TUINs UI_HL_TUIws" fi if test "$GCC_MINGW" != "yes"; then #Does not exist for MinGW anyway PLUGIN_NO="$PLUGIN_NO UI_TUI UI_HL_TUI" #Will be on all known Linux installations, but not by default on CygWin INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL " else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS UI_TUI UI_HL_TUI" fi else #no Curses and no PDcurses if test "$GCC_MINGW" != "yes"; then #Does not exist for MinGW anyway PLUGIN_NO="$PLUGIN_NO UI_TUI UI_HL_TUI UI_HL_TUIN UI_HL_TUINs UI_HL_TUIw UI_HL_TUIws" #Will be on all known Linux installations, but not by default on CygWin INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL " else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS UI_TUI UI_HL_TUI UI_HL_TUIN UI_HL_TUINs" fi fi fi if test "$HAVE_XCURSES" = "1"; then PLUGIN_YES="$PLUGIN_YES UI_HL_TUIX" else if test "$COMSPEC" = ""; then PLUGIN_NO="$PLUGIN_NO UI_HL_TUIX" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pdcurses" else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS UI_HL_TUIX" fi fi if test "$PDFBUILD" != "no"; then PLUGIN_YES="$PLUGIN_YES EXREPORT_PDF $LIBLOGICAL_PDF_DEPEND" else PLUGIN_NO="$PLUGIN_NO EXREPORT_PDF $LIBLOGICAL_PDF_DEPEND" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pdflib" fi if test "$PDFBUILD" != "no" -a "$GTK_VERSION" = "2.0"; then PLUGIN_YES="$PLUGIN_YES $LIBLOGICAL_PDF_GTK2_DEPEND" else PLUGIN_NO="$PLUGIN_NO $LIBLOGICAL_PDF_GTK2_DEPEND" #INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pdflib" fi if test "$IFMX_ESQLC" != "no" ; then PLUGIN_YES="$PLUGIN_YES SQL_esql ESQL_INFORMIX" if test "$enable_minimal" != "yes"; then COMP_EXE="$COMP_EXE aupscol adbload2 asql_i$A4GL_EXE_EXT runforms$A4GL_EXE_EXT" #adbload2, aupscol and sqleditor currently compiles only with Informix ESQL/C fi else PLUGIN_NO="$PLUGIN_NO SQL_esql ESQL_INFORMIX sqleditor$A4GL_EXE_EXT aupscol adbload2 asql_i$A4GL_EXE_EXT" EXE_NO="$COMP_EXE aupscol adbload2 asql_i$A4GL_EXE_EXT runforms$A4GL_EXE_EXT" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.ifx.esql" fi if test "$HAVE_INGRES_ESQLC" != "no"; then PLUGIN_YES="$PLUGIN_YES SQL_ingres" if test "$DO_DISABLE" = "1"; then #Fixme: helper_ingres.ec not in CVS: #Cant a4gl_I compile because of the above problem: ALL_DISABLED="$ALL_DISABLED ESQL_INGRES asql_I$A4GL_EXE_EXT" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make ???'" else PLUGIN_YES="$PLUGIN_YES ESQL_INGRES" if test "$enable_minimal" != "yes"; then COMP_EXE="$COMP_EXE asql_I$A4GL_EXE_EXT" fi fi else PLUGIN_NO="$PLUGIN_NO SQL_ingres ESQL_INGRES" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.ingres" fi if test "$SQL_MYSQL" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_mysql" else PLUGIN_NO="$PLUGIN_NO SQL_mysql" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.mysql.client" fi if test "$SQL_MYSQL_EMB" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_mysqldb" fi if test "$HAVE_PGODBC" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_pgodbc" else if test "$COMSPEC" = ""; then #no point in building directly linked ODBC drivers on Windows - use odbc32 PLUGIN_NO="$PLUGIN_NO SQL_pgodbc" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pg.odbc" fi fi if test "$HAVE_IFXODBC" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_ifxodbc" else if test "$COMSPEC" = ""; then #no point in building directly linked ODBC drivers on Windows - use odbc32 PLUGIN_NO="$PLUGIN_NO SQL_ifxodbc" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.ifx.odbc" fi fi if test "$cygwin" != "1" ; then if test "$HAVE_IODBC" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_iodbc" else PLUGIN_NO="$PLUGIN_NO SQL_iodbc" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.iodbc" fi if test "$HAVE_UNIXODBC" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_unixodbc" else PLUGIN_NO="$PLUGIN_NO SQL_unixodbc" #INSTALL_MISSING_OPTIONAL is set in unixODBC tests, because it can have two variants fi fi if test "$cygwin" = "1"; then PLUGIN_YES="$PLUGIN_YES SQL_odbc32" #else #We do not want to confuse people on UNIX saying this will not be built #since we can only build it on Windows and we allways build it on Windows #PLUGIN_NO="$PLUGIN_NO ODBC32" fi if test "$XML_RPC" != "no"; then PLUGIN_YES="$PLUGIN_YES RPC_XMLRPC" else PLUGIN_NO="$PLUGIN_NO RPC_XMLRPC" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.xmlrpc" fi if test "$CINT" != "no"; then PLUGIN_YES="$PLUGIN_YES A4GL_cint" else PLUGIN_NO="$PLUGIN_NO A4GL_cint" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.cint" fi if test "$HAVE_RPCLIB" != "0"; then PLUGIN_YES="$PLUGIN_YES RPC_XDR FORM_XDR XDRPACKER_report XDRPACKER_struct_form PACKER_XDR XDRPACKER_module XDRPACKER_module_definition" else if test "$GCC_MINGW" != "yes"; then #SUN RPC does not exist for MinGW anyway PLUGIN_NO="$PLUGIN_NO RPC_XDR FORM_XDR XDRPACKER_report XDRPACKER_struct_form PACKER_XDR XDRPACKER_module XDRPACKER_module_definition" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sunrpc" else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS RPC_XDR FORM_XDR XDRPACKER_report XDRPACKER_struct_form PACKER_XDR XDRPACKER_module XDRPACKER_module_definition" fi fi if test $ac_cv_lib_z_main = yes; then PLUGIN_YES="$PLUGIN_YES PACKER_GZPACKED" else PLUGIN_NO="$PLUGIN_NO PACKER_GZPACKED" fi if test "$EXDATA_MPZ" != "no"; then PLUGIN_YES="$PLUGIN_YES EXDTYPE_mpz" else PLUGIN_NO="$PLUGIN_NO EXDTYPE_mpz" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.mpz" fi if test "$HAVE_SAPODBC" = "yes" ; then PLUGIN_YES="$PLUGIN_YES SQL_sapodbc" else if test "$COMSPEC" = ""; then #no point in building directly linked ODBC drivers on Windows - use odbc32 PLUGIN_NO="$PLUGIN_NO SQL_sapodbc" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sapdb.odbc" fi fi #this is made by 'make extra' -- check this stmt, I dont think so if test "$JABBERBUILD" != "no"; then #if test "$DO_DISABLE" = "1"; then # ALL_DISABLED="$ALL_DISABLED IM_JABBER IM_JABBERs" # DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make jabber'" #else PLUGIN_YES_LINKABLE="$PLUGIN_YES_LINKABLE IM_JABBER IM_JABBERs" #fi else PLUGIN_NO_LINKABLE="$PLUGIN_NO_LINKABLE IM_JABBER IM_JABBERs" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.iksemel" fi if test "$HAVE_PGSQL_LIB" = "yes"; then #an simple PG plug-in with limited functionality (by Mike) PLUGIN_YES="$PLUGIN_YES SQL_pg SQL_pg8" if test "$PG_ESQLC" != "no" -a "$HAVE_PG_ESQL_HEADERS" = "yes" ; then #ESQL based PG plug-in based on 'simple' template using ecpg in no-Informix mode #does NOT need IFX compatibility in ecpg or PG engine - it is used #only to resolve variables defined as LIKE when compiling 4gl #code using EC dialect POSTGRES #REPLACED BY postgresql/simple.c driver #PLUGIN_YES="$PLUGIN_YES SQL_c_ecpg" COMP_EXE="$COMP_EXE asql_p$A4GL_EXE_EXT" #asql_p compile only if PG ESQLC compiler is installed else PLUGIN_NO="$PLUGIN_NO asql_p$A4GL_EXE_EXT" #PLUGIN_NO="$PLUGIN_NO SQL_c_ecpg" fi if test "$DO_DISABLE" = "1"; then ALL_DISABLED="$ALL_DISABLED SQL_pgDEVEL" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make ???'" else #"real" one written in CPP - Sergio never finised it... :-( PLUGIN_YES="$PLUGIN_YES SQL_pgDEVEL" fi else PLUGIN_NO="$PLUGIN_NO SQL_pg SQL_pg8" #PLUGIN_NO="$PLUGIN_NO SQL_c_ecpg" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pg.esql" fi #GTK plug-in may need to recompile assist.4gl, so it may need to have 4glc, #so it needs to be AFTER all other plug-ins needed by 4glc, like SQL plug-ins: if test "$GTKBUILD" != "no"; then PLUGIN_YES="$PLUGIN_YES UI_HL_GTK" else PLUGIN_NO="$PLUGIN_NO UI_HL_GTK" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.gtk" fi if test "$GTK_VERSION" = "2.0"; then PLUGIN_YES="$PLUGIN_YES $LIBLOGICAL_GTK2_DEPEND" else PLUGIN_NO="$PLUGIN_NO $LIBLOGICAL_GTK2_DEPEND" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.gtk2" fi if test "$HAS_GLADE_2" = "1" -a "$GTKBUILD" != "no"; then PLUGIN_YES="$PLUGIN_YES UI_GLADE A4GL_glade" else PLUGIN_NO="$PLUGIN_NO UI_GLADE A4GL_glade" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.glade2" fi #All libMENU_xxx need libUI_GTK on Windows to be linked with, to #resolve symbols - so all libMENU_ must be built after libUI_GTK if test "$HAVE_RPCLIB" != "0" -a "$GTKBUILD" != "no"; then PLUGIN_YES="$PLUGIN_YES " else if test "$GCC_MINGW" != "yes"; then #hide MENU_XDR from list of not to build - no Sun RPC with MinGW GCC PLUGIN_NO="$PLUGIN_NO " else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS " fi fi #SQLite native connection if test "$SQLITE_LIB" = "1"; then if test "$SQLITE_VER" = "3"; then #PLUGIN_YES="$PLUGIN_YES SQL_sqlite3 SQL_sqlite3S" PLUGIN_YES="$PLUGIN_YES SQL_sqlite3 " else PLUGIN_YES="$PLUGIN_YES SQL_sqlite" if test "$GCC_MINGW" != "yes" -a "$cygwin" != "1"; then #PLUGIN_YES="$PLUGIN_YES SQL_sqliteS" PLUGIN_YES="$PLUGIN_YES " else #no static SQLite library supplied for Windows in V2 PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS SQL_sqliteS" fi fi else PLUGIN_NO="$PLUGIN_NO SQL_sqlite SQL_sqliteS SQL_sqlite3 SQL_sqlite3S" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sqlite" fi #SQLite ODBC driver if test "$SQLITE_ODBC" = "1"; then PLUGIN_YES="$PLUGIN_YES SQL_sqliteodbc" else if test "$COMSPEC" = ""; then #no point in building directly linked ODBC drivers on Windows - use odbc32 PLUGIN_NO="$PLUGIN_NO SQL_sqliteodbc" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sqlite.odbc" fi fi if test "$HAVE_POPLIB" = "1"; then #NOTE: needs 4glc PLUGIN_YES="$PLUGIN_YES A4GL_pop" else PLUGIN_NO="$PLUGIN_NO A4GL_pop" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.libspopc" fi if test "$HAVE_SMTPLIB" = "1"; then #NOTE: needs 4glc PLUGIN_YES="$PLUGIN_YES fgl_smtp" else PLUGIN_NO="$PLUGIN_NO fgl_smtp" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.libsmtp" fi if test "$HAVE_PCRELIB" = "1"; then #NOTE: needs 4glc PLUGIN_YES="$PLUGIN_YES A4GL_pcre" else PLUGIN_NO="$PLUGIN_NO A4GL_pcre" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.pcre" fi if test "$HAVE_SXMLLIB" = "1"; then #NOTE: needs 4glc PLUGIN_YES="$PLUGIN_YES A4GL_sxml" else PLUGIN_NO="$PLUGIN_NO A4GL_sxml" INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sxml" fi if test "$PG_ESQLC" != "no" && test "$PG_ESQLC_IFXCOMPAT" = "yes"; then PLUGIN_YES="$PLUGIN_YES ESQL_POSTGRES" if test "$DO_DISABLE" = "1"; then ALL_DISABLED="$ALL_DISABLED SQL_esqlPG" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make ???'" else #Compile Aubit ESQL/C SQL connectivity plug-in using PG ESQL/C compiler #Mike say: Main problem is ecpg doesn't support get diagnostics #(think I wrote another one for postgres anyway - I'll #check to see whats around when I get back) PLUGIN_YES="$PLUGIN_YES SQL_esqlPG" fi else PLUGIN_NO="$PLUGIN_NO ESQL_POSTGRES SQL_esqlPG" #INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.libspopc" fi if test "$Q_ESQLC" != "no" ; then if test "$DO_DISABLE" = "1" -o "$cygwin" != "1"; then ALL_DISABLED="$ALL_DISABLED ESQL_QUERIX SQL_esqlQ" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make ???'" else #Don't know how to link this on Windows...GCC not supported? #since introduction of "decimal" can't compile - must pre-process with cpp first PLUGIN_YES="$PLUGIN_YES ESQL_QUERIX" #Compile Aubit ESQL/C SQL connectivity plug-in using Querix ESQL/C compiler PLUGIN_YES="$PLUGIN_YES SQL_esqlQ" fi else PLUGIN_NO="$PLUGIN_NO ESQL_QUERIX SQL_esqlQ" #INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.querix" fi if test "$SAPDB_ESQLC" != "no"; then PLUGIN_YES="$PLUGIN_YES ESQL_SAP" if test "$DO_DISABLE" = "1" ; then ALL_DISABLED="$ALL_DISABLED SQL_esqlSAP" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make ???'" else #Compile Aubit ESQL/C SQL connectivity plug-in using SAP DB ESQL/C compiler PLUGIN_YES="$PLUGIN_YES SQL_esqlSAP" fi else if test "$COMSPEC" != ""; then PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS SQL_esqlSAP ESQL_SAP" else PLUGIN_NO="$PLUGIN_NO SQL_esqlSAP ESQL_SAP" #INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.sap.esqlc" fi fi if test "$DO_DISABLE" = "1" ; then ALL_DISABLED="$ALL_DISABLED LL_server UI_client server_gtk server_tui server_console" DISABLED_MANUAL_CMD="$DISABLED_MANUAL_CMD 'make -C lib/libui/ui_highlevel/remote_client'" #lib/libui/ui_highlevel/remote_client #libLL_server.so - A convinience library for wrapping common server stuff up #libUI_client.so - This is a UI you can use just like TUI, HL_TUI, HL_GTK etc.. A4GL_UI=client #server_gtk - This is the thin client program for displaying the output (GTK mode) #server_tui - This is the thin client program for displaying the output (TUI mode) #server_console - Not yet - but soon... fi ####################################################################### #Output created list of plugins to be created as individual variables #for use in RPM and Windows setup creation: #Can't use 'let' - standard sh don't know that... #let COUNTER=0 COUNTER=0 COUNTER_IS=0 for FILE in $PLUGIN_YES ; do #let COUNTER=COUNTER+1 COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "RPMFILE_$COUNTER='$RPM_PLUGIN_PREFIX/lib$FILE$SO_EXT'" eval "ISFILE_$COUNTER='Source: $IS_SOURCE\\$PLUGIN_DIR\lib$FILE$SO_EXT; DestDir: {app}\\$PLUGIN_DIR; Components: runtime'" done COUNTER_IS="$COUNTER" #Linkable (not dlopen-able) optional libraries (not plug-ins) #For example, IM_JABBER for FILE in $PLUGIN_YES_LINKABLE ; do #Note; even tho this libs are NOT plug-ns, we stuff them in plugin #folder so we dont have to change all makefiles and install scripts - FOR NOW COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "RPMFILE_$COUNTER='$RPM_PLUGIN_PREFIX/lib$FILE$SO_EXT_LINKABLE'" COUNTER_IS=`(expr $COUNTER_IS + 1) 2>/dev/null` eval "ISFILE_$COUNTER_IS='Source: $IS_SOURCE\lib\lib$FILE$SO_EXT_LINKABLE; DestDir: {app}\lib; Components: runtime'" COUNTER_IS=`(expr $COUNTER_IS + 1) 2>/dev/null` eval "ISFILE_$COUNTER_IS='Source: $IS_SOURCE\lib\lib$FILE$SO_EXT_LINKABLE.a; DestDir: {app}\lib; Components: runtime'" done PLUGIN_YES="$PLUGIN_YES $PLUGIN_YES_LINKABLE" PLUGIN_NO="$PLUGIN_NO $PLUGIN_NO_LINKABLE" ## ================================================================== ## Populate files lists for executables, resource files, etc: ## ================================================================== #FIXME: can't make pcode without Bison - IS THIS STILL TRUE? #if test "$BISON" != "no"; then COMP_EXE="$COMP_EXE $PCODE_EXE_NATIVE" if test "$HAVE_RPCLIB" != "0"; then COMP_EXE="$COMP_EXE $PCODE_EXE_RPC" else if test "$GCC_MINGW" != "yes"; then EXE_NO="$EXE_NO $PCODE_EXE_RPC" else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS $PCODE_EXE_RPC" fi fi #fi if test "$GTK_VERSION" = "2.0"; then RUNTIME_EXE="$RUNTIME_EXE $LIBLOGICAL_EXE_GTK2_DEPEND" else EXE_NO="$EXE_NO $LIBLOGICAL_EXE_GTK2_DEPEND" fi COUNTER=0 for FILE in $COMP_EXE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` FILE_EXE="$FILE" if test "$COMSPEC" != ""; then A=`basename $FILE $A4GL_EXE_EXT` B=`basename $FILE` if test "$A" = "$B"; then #file does not have Aubit executable extension FILE_EXE="$FILE$EXEEXT" fi fi eval "EXEFILE_$COUNTER='$RPM_EXE_PREFIX/$FILE_EXE'" #DestName: "4glc.exe"; CopyMode: alwaysoverwrite; eval "ISEXEFILE_$COUNTER='Source: $IS_SOURCE\bin\\$FILE_EXE; DestDir: {app}\bin; $COPYMODE_NORMAL; Components: compiler'" done for FILE in $RUNTIME_EXE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` FILE_EXE="$FILE" if test "$COMSPEC" != ""; then if test "`basename $FILE $A4GL_EXE_EXT`" = "`basename $FILE`"; then #file does not have Aubit executable extension FILE_EXE="$FILE$EXEEXT" fi fi eval "EXEFILE_$COUNTER='$RPM_EXE_PREFIX/$FILE_EXE'" eval "ISEXEFILE_$COUNTER='Source: $IS_SOURCE\bin\\$FILE_EXE; DestDir: {app}\bin; $COPYMODE_NORMAL; Components: runtime'" done for FILE in $RUNTIME_RESOURCE ; do COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "EXEFILE_$COUNTER='$RPM_EXE_PREFIX/$FILE'" eval "ISEXEFILE_$COUNTER='Source: $IS_SOURCE\bin\\$FILE; DestDir: {app}\bin; $COPYMODE_NORMAL; Components: runtime'" done COUNTER=`(expr $COUNTER + 1) 2>/dev/null` eval "ISEXEFILE_$COUNTER='Source: $IS_SOURCE\lib\lib4glc.dll; DestDir: {app}\bin; $COPYMODE_NORMAL; Components: compiler'" AC_MSG_RESULT(done.) ## ================================================================== ## Additional auto-install targets: ## ================================================================== if test "$DOTTOOL" = "no"; then INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.dot" fi if test "$DOXYGEN" = "no"; then INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.doxygen" fi if test "$HAS_CHECK" != "1"; then if test "$COMSPEC" = ""; then INSTALL_MISSING_OPTIONAL="$INSTALL_MISSING_OPTIONAL install.libcheck" else PLATFORM_UNAVAILABLE_OPTIONS="$PLATFORM_UNAVAILABLE_OPTIONS libcheck" fi fi ## ================================================================== ## Translate Autoconf internals into our replace tags: ## ================================================================== LTPIC="$lt_prog_compiler_pic" AC_SUBST(LTPIC) if test "$LTPIC" = "" then if test "$lt_cv_prog_cc_pic_works" = "yes"; then #WARNING: this will overwrite PIC settings from the beginning of this file #if this works OK, remove manually set ones there! #lt_cv_prog_cc_pic=' -fno-common' APIC="$lt_cv_prog_cc_pic" if test "$arch" = "x86_64" ; then APIC="-fPIC_FORCED" fi LDFLAGS_SHARED="$APIC -shared" CFLAGS="$CFLAGS $APIC" #echo "LDFLAGS_SHARED set to $LDFLAGS_SHARED" fi else LDFLAGS_SHARED="$LTPIC ${shared_flag}" CFLAGS="$CFLAGS $LTPIC" APIC="$LTPIC" fi ## ================================================================== ## Define list of third-party files to use in installer: ## ================================================================== if test "$COMSPEC" != ""; then #Add additional third-party files to installer: #Dont think we need this any longer, using PDcurses now: #;for CygWin curses to find terminfo, we have to set %HOME% to location ABOVE .terminfo directory. #;if HOME is not set, and CYGDIR is not set, curses will look only under C:\cygwin #Source: @WINDOWS_DRIVE@@CYGWIN_PATH@\usr\share\terminfo\c\cygwin; DestDir: {app}\.terminfo\c; Components: TUI if test "$COLLECT_THIRD_PARTY" = "1"; then THIRD_PARTY_FILES="$THIRD_PARTY_FILES \ util#$aubitdir/tools/cygwin/run.exe \ util#/bin/cygcheck.exe \ util#/bin/cygpath.exe \ util#/bin/regtool.exe \ " fi fi if test "$THIRD_PARTY_FILES" != ""; then COUNTER=0 for an_file in $THIRD_PARTY_FILES; do GROUP=`echo $an_file | sed -e 's/#/ /' | awk '{print $1}'` PATH_FILE=`echo $an_file | sed -e 's/#/ /' | awk '{print $2}'` DEST_NAME=`echo $PATH_FILE | sed -e 's/!/ /' | awk '{print $2}'` if test "$DEST_NAME" != ""; then PATH_FILE=`echo $PATH_FILE | sed -e 's/!/ /' | awk '{print $1}'` fi if test "$COMSPEC" != ""; then PATH_FILE=`$CYGPATH -w "$PATH_FILE"` fi if test "$enable_ac_debug" = "yes" ; then echo "Third-party file: $an_file" echo "GROUP=$GROUP" echo "PATH_FILE=$PATH_FILE" echo "DEST_NAME=$DEST_NAME" fi if test -f "$PATH_FILE"; then #let COUNTER=COUNTER+1 COUNTER=`(expr $COUNTER + 1) 2>/dev/null` if test "$DEST_NAME" = ""; then eval "IS_THIRDPARTY_$COUNTER='Source: $PATH_FILE; DestDir: {app}\bin; Components: $GROUP'" else eval "IS_THIRDPARTY_$COUNTER='Source: $PATH_FILE; DestDir: {app}\bin; DestName: "$DEST_NAME"; Components: $GROUP'" fi else if test "$enable_ac_debug" = "yes" ; then echo "#### WARNING: missing $PATH_FILE" fi fi done fi ## ================================================================== ## Define which files we will substitute @xxx@ in ## ================================================================== if test "$AUBIT_SOURCE" = "1" ; then #TODO: move this from .in to normal files, and include Makefile-common; #There is no need for them to be .in files: GENERATED_FILES="$GENERATED_FILES \ compilers/4glc/rules/Makefile \ compilers/fcompile/Makefile \ compilers/helpcompile/Makefile \ compilers/ace/Makefile \ lib/libform/form_xdr/Makefile \ lib/libform/noform/Makefile \ lib/libform/form_generic/Makefile \ lib/libmsg/msg_native/Makefile \ lib/liblex/lex_c/Makefile \ lib/liblex/lex_esqlc/Makefile \ lib/liblex/lex_perl/Makefile \ lib/libpdf/Makefile \ lib/libui/ui_console/Makefile \ lib/libui/ui_curses/Makefile \ lib/resource/Makefile \ lib/libsql/nosql/Makefile \ lib/libsql/postgresql/Makefile \ lib/libsql/sapdb/Makefile \ lib/librpc/no_rpc/Makefile \ lib/librpc/sun_rpc/Makefile \ lib/librpc/xml_rpc/Makefile \ lib/extra_libs/string/Makefile \ lib/libpacker/packed/Makefile \ lib/libpacker/mempacked/Makefile \ lib/libpacker/perl/Makefile \ lib/libpacker/xdr/Makefile \ lib/libpacker/xml/Makefile \ lib/libexdata/Makefile \ tools/misql/Makefile \ tools/loadmap/Makefile \ tools/adbload/Makefile \ tools/ide/Makefile \ tools/4glunit/Makefile \ tools/odbctest/Makefile \ tools/test/gui/Makefile \ tools/test/regression/Makefile \ tools/test/lang/Makefile \ tools/test/db/Makefile \ tools/test/db/informix/Makefile \ tools/test/db/postgresql/Makefile \ tools/test/ace/Makefile" GENERATED_FILES="$GENERATED_FILES \ etc/aubitrc \ incl/Makefile-common \ compilers/4glc/mk_states_c \ bin/aubitbuild.sh" #We refresh this files automatically when needed, so we dont need #to generate them at this point (saves time, especially on CygWin): GENERATED_AUTOREFRESH="$GENERATED_AUTOREFRESH \ etc/aubit-rpm.spec \ etc/default.apspec \ etc/aubit-InnoSetup.iss \ etc/debian/control \ etc/debian/preinst \ etc/debian/postinst \ etc/debian/prerm \ etc/debian/postrm \ etc/debian/templates \ etc/debian/changelog \ etc/debian/globals \ etc/debian/config \ lib/swig/domake \ docs/doxy/Doxyfile" else #etc/aubitrc-bin.in is a copy of etc/aubitrc.in created by 'make install' #It is renamed to prevent if from beeing seen by aubit programs #It will get installed as aubitrc under /etc/opt/aubit4gl/ or ~/.aubit4gl/ #by 'make install' when executed in binary distribution tree GENERATED_FILES="$GENERATED_FILES \ etc/aubitrc-bin \ incl/Makefile-common" fi STD_CFLAGS="$STD_CFLAGS $APIC" PHP_CONFIGURE_PART(Creating files:) #AC _OUTPUT AC_OUTPUT([$GENERATED_FILES],[ #chmod +x pdflib-config ]) if test "$LIBS" != ""; then echo "WARNING: (5) LIBS contains $LIBS" fi if test "$AUBIT_SOURCE" = "1" ; then # on MinGW we allready have native path so -d will fail if test "$INFORMIXDIR" != "" -a "$GCC_MINGW" != "yes" ; then if test -d "$INFORMIXDIR" ; then if test "$GCC_MINGW" != "yes"; then echo "Running configure for FglDoc... ($INFORMIXDIR)" export INFORMIXDIR cd tools/fgldoc; ./configure; cd - fi else echo "WARNING: INFORMIXDIR ($INFORMIXDIR) is invalid" fi fi fi ## ================================================================== ## Warnings and exit messages ## ================================================================== if test "$WARN_LEX" = "1" -a "$AUBIT_SOURCE" = "1" ; then cat< switches to | | 'configure' script, specifiying package installed in non-standard | | In most cases, you will have to add this path to your PATH | X if test "$COMSPEC" = ""; then LD_LIBRARY_PATH_LABEL="LD_LIBRARY_PATH" cat<