Changeset 1034

Show
Ignore:
Timestamp:
03/06/06 17:52:00 (4 years ago)
Author:
jtv
Message:

Hopefully fixes MinGW link problems

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1033 r1034  
     12006-02-07  Jeroen T. Vermeulen <jtv@xs4all.nl> 
     2 configure.ac.in: 
     3  - Replaced AC_TRY_LINK loop for socket library with AC_SEARCH_LIBS 
     4  - Should fix MinGW socket problems, thanks Bart "doesn't ring a bell" Samwel 
    152006-02-06  Jeroen T. Vermeulen <jtv@xs4all.nl> 
    26 include/pqxx/connection_base.hxx: 
  • trunk/NEWS

    r1030 r1034  
    112.6.5 
    22 - Visual C++ users: copy win32/common-sample to win32/common before editing it 
     3 - Should fix problems finding socket library on MinGW 
    34 - Even more work on Visual C++ problems 
    45 - Updated documentation for Visual C++ users 
  • trunk/README

    r969 r1034  
    99 
    1010Further information, as well as updates, a mailing list, and a bug reporting 
    11 system can be found at: 
    12  
     11system can be found at any of these URLs (they should all bring you to the same 
     12site): 
     13 
     14        http://pqxx.org/ 
     15        http://pqxx.tk/ 
    1316        http://thaiopensource.org/development/libpqxx/ 
    1417 
     
    218221with e.g. Visual C++ as your compiler. 
    219222 
    220 Before trying to compile with Visual C++, you'll at least need to edit the file 
    221 win32/common to reflect the proper paths to your PostgreSQL headers and the 
    222 libpq library.  See the win32 subdirectory for more documentation. 
     223Before trying to compile with Visual C++, you'll at least need to copy the file 
     224win32/common-sample to win32/common, and edit the latter to reflect the proper 
     225paths to your PostgreSQL headers and the libpq library.  See the win32 
     226subdirectory for more documentation. 
    223227 
    224228 
  • trunk/configure.ac.in

    r1008 r1034  
    504504 
    505505# After this check, we should be able to link socket-based programs. 
    506 AC_MSG_CHECKING([for separate socket library]) 
    507 socklibopt="" 
    508 socklibok="no" 
    509 LDFLAGS_SAVE="$LDFLAGS" 
    510 for linkopt in "" "-lws2_32" "-lwsock32" "-lws2_32 -lwsock32" "-lwinsock" "-lsocket" "-lsocket -lnsl" ; do 
    511         LDFLAGS="$LDFLAGS_SAVE $linkopt" 
    512         AC_LINK_IFELSE( 
    513         [#include <cstring> 
    514         #ifdef PQXX_HAVE_SYS_SELECT_H 
    515         #include <sys/select.h> 
    516         #else 
    517         #include <ctime> 
    518         #include <sys/types.h> 
    519         #endif 
    520         #ifdef HAVE_UNISTD_H 
    521         #include <unistd.h> 
    522         #endif 
    523         #ifdef _WIN32 
    524         #include <winsock2.h> 
    525         #endif 
    526         ${usestd} 
    527         int main(){return select(0,0,0,0,0);}], 
    528         [socklibopt="$linkopt"; socklibok="yes"; break]) 
    529 done 
    530 if test "$socklibok" != "yes" ; then 
    531         AC_MSG_RESULT([failed]) 
     506socklibok=no 
     507AC_SEARCH_LIBS(select, ws2_32 wsock32 winsock socket nsl, [socklibok=yes]) 
     508 
     509if test "${socklibok}" != "yes" ; then 
    532510        AC_MSG_ERROR([ 
    533511Could not figure out how to link a simple sockets-based program.  Please read 
    534 the config.log file for more clues as to why this failed.]) 
    535 fi 
    536 if test -z "$socklibopt" ; then 
    537         AC_MSG_RESULT([none]) 
    538 else 
    539         AC_MSG_RESULT($socklibopt) 
    540 fi 
    541  
     512the config.log file for more clues as to why this failed. 
     513]) 
     514fi 
    542515 
    543516AC_MSG_CHECKING([if select() accepts NULL fdsets])