#### Archived

This topic is now archived and is closed to further replies.

# setting platform specific Libraries with autoconf

This topic is 5151 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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]

##### Share on other sites
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.

• 10
• 19
• 14
• 19
• 15