if(NOT WIN32)
    set(port_SRCS
        dummy.c
    )
else(NOT WIN32)
    set(port_SRCS
        strcasecmp.c
        getopt.c
    )
endif(NOT WIN32)

if(NOT HAVE_LFIND)
    set(port_SRCS ${port_SRCS} lfind.c)
endif(NOT HAVE_LFIND)
if(NOT HAVE_STRTOUL)
    set(port_SRCS ${port_SRCS} strtoul.c)
endif(NOT HAVE_STRTOUL)

add_library(port ${port_SRCS})