Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#130 Build without error on Haiku

closed-accepted
Fabian Keil
other (14)
5
2012-09-05
2012-09-04
Simon South
No

This patch changes configure.in so Privoxy will build on Haiku (http://haiku-os.org) out-of-the-box.

Haiku provides a pthreads implementation in its system library, libroot, as opposed to a separate library (libpthread). With this patch applied, autoconf will detect Privoxy is being built on Haiku and will omit the "-lpthread" option to gcc as it is not needed and causes the build to fail.

I've tested this on Haiku (hrev44584) and Linux (Fedora 17) and with the patch applied Privoxy builds on both systems without problem.

For Haiku, this is the configure command I used:

./configure --prefix=`finddir B_COMMON_DIRECTORY` \ --sbindir=`finddir B_COMMON_BIN_DIRECTORY` \ --sysconfdir=`finddir B_COMMON_ETC_DIRECTORY`/privoxy \ --localstatedir=`finddir B_COMMON_VAR_DIRECTORY` \ --datarootdir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY` \ --infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \ --with-user=user \ --with-group=root \ LDFLAGS='-L/boot/common/lib -lnetwork'

Discussion

  • Simon South
    Simon South
    2012-09-04

    If building on Haiku, don't try to link against a separate pthreads library

     
  • Fabian Keil
    Fabian Keil
    2012-09-05

    Thanks a lot for the patch, committed to CVS.

    BTW, can you comment on whether or not Privoxy's code in "#ifdef __BEOS__" sections is used on Haiku?

     
  • Fabian Keil
    Fabian Keil
    2012-09-05

    • assigned_to: nobody --> fabiankeil
    • status: open --> pending-accepted
     
  • Simon South
    Simon South
    2012-09-05

    • status: pending-accepted --> open-accepted
     
  • Simon South
    Simon South
    2012-09-05

    Thanks!

    Yes, that code is not used on Haiku:

    http://www.freelists.org/post/haiku-development/-BEOS-,1

    ...correctly, I believe, since it looks like its main purpose is to disable pthreads support (which Haiku offers, but BeOS didn't).

     
  • Fabian Keil
    Fabian Keil
    2012-09-05

    Thanks for the information.

    There is indeed no reason why Haiku should use the code and I'm pleased to learn that it doesn't.

    My main concern was that the "#ifdef __BEOS__" code (to my knowledge) hasn't been tested for years and is likely to contain regressions.

     
  • Fabian Keil
    Fabian Keil
    2012-09-05

    • status: open-accepted --> closed-accepted