Advertisement

setting platform specific Libraries with autoconf

Started by April 12, 2004 08:34 PM
0 comments, last by LonelyStar 20 years, 6 months ago
Hi everybody, I am working on an autotoolset project which should run under Linux and WIn32 (MinGW). I have problems binding in system-specific libarys. Under Linux I need: libXxf86vm and under MinGW i need: libws2_32 What I would like to do is a AC_SUBST(SYSTEM_DEP_LIB,libws2_32) on MinGW and the other way around on Linux. edit: That wy I could just do packagename_LDADD = @SYSTEM_DEP_LIB@ in my Makefile.am! But I have problems finding out on whcih system I am. Googling I found AC_CONICAL_SYSTEM but I did not find out how I could use it. So how can I find out if the system is MinGW or Linux? Beter ways of doing this are also very welcome. Thanks! [edited by - LonelyStar on April 12, 2004 9:36:23 PM]
To do that it''d go something like this:
AC_CANONICAL_HOSTcase "$host_os" in	*mingw*)		echo "Windows stuff";;	*)		echo "Unix stuff";;esac

However, a better solution is to just check for each of the libraries (with AC_CHECK_LIB) and use the one that''s found.

This topic is closed to new replies.

Advertisement